I just configured WatchKit in my project on iPhone devices. Push notification while working properly, currently my requirement sends push notifications to Watch also through server ...
I'm currently trying to get a notification from the payload (static), I want to do this from the server, can anyone help me?
- (void)didReceiveRemoteNotification:(NSDictionary *)remoteNotification withCompletion:(void(^)(WKUserNotificationInterfaceType interface)) completionHandler {
NSDictionary* apsDict = [remoteNotification objectForKey:apsKeyString];
NSString* titleString = [apsDict objectForKey:titleKeyString];
[self.titleLabel setText:titleString];
completionHandler(WKUserNotificationInterfaceTypeCustom);
}
user5048032
source
share