CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.

MSWatchKitNotifications 1.0.1

MSWatchKitNotifications 1.0.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release May 2015

Maintained by Michael Simons.



Usage

In WatchKit:

   UILocalNotification* notification = [UILocalNotification new];
   notification.alertTitle = @"Notification From WatchKit";
   notification.alertBody = @"Notification";

   [WKInterfaceController presentLocalNotificationNow:notification completion:nil];

In your app delegate’s application:handleWatchKitExtensionRequest:reply:

  BOOL notificationHandled = [MSWatchKitNotificationHandler handleNotificationsFromWatchKit:userInfo replyBlock:reply];

   if (!notificationHandled) {
      NSLog(@"Client App should handle this request");
   }

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 8.2

Installation

Both your app and WatchKit extension need to be integrated via your podfile.

Author

Mike Simons, @waltflanagan

License

MSWatchKitNotifications is available under the MIT license. See the LICENSE file for more info.