测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可 | MIT |
Released最后发布 | 2015年5月 |
由Michael Simons维护。
在WatchKit
UILocalNotification* notification = [UILocalNotification new];
notification.alertTitle = @"Notification From WatchKit";
notification.alertBody = @"Notification";
[WKInterfaceController presentLocalNotificationNow:notification completion:nil];
在你的应用代理的application:handleWatchKitExtensionRequest:reply:
方法中
BOOL notificationHandled = [MSWatchKitNotificationHandler handleNotificationsFromWatchKit:userInfo replyBlock:reply];
if (!notificationHandled) {
NSLog(@"Client App should handle this request");
}
要运行示例项目,首先从仓库中克隆,然后从示例目录运行pod install
iOS 8.2
你需要通过Podfile将你的应用和WatchKit扩展进行集成。
Mike Simons,@waltflanagan
MSWatchKitNotifications遵循MIT许可。有关更多信息,请参阅LICENSE文件。