MSWatchKitNotifications 1.0.1

MSWatchKitNotifications 1.0.1

测试已测试
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文件。