I'm trying to send a string from my WatchKit app:
I can launch the app via the lock screen fine, but when the continueUserActivity
method is called, userActivity.userInfo
contains no values, am I missing something here?
-The only value I get is the activityType
Watch:
- (void)createActivity {
self.activity = [[NSUserActivity alloc] initWithActivityType:@"com.myApp.urlSend"];
[self.activity setUserInfo:@{@"url":self.wake.href}];
[self.activity setTitle:self.wake.title];
[self.activity becomeCurrent];
}
Phone:
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler {
NSString *url = userActivity.userInfo[@"url"];
}