lundi 23 mars 2015

"The UIApplicationDelegate in the iPhone App never called reply() in -[UIApplicationDelegate application:handleWatchKitExtensionRequest:reply:]"

Okay so I'm making this Apple Watch app and in my Watch App, I have a button. When you touch the button, it does this:



[WKInterfaceController openParentApplication:[NSDictionary dictionary] reply:^(NSDictionary *replyInfo, NSError *error) {
if(error) {
NSLog(@"%@",error);
}
}];


And in my App Delegate file I do this:



-(void) application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *))reply {

//Code that is not importent and is confidential
reply([NSDictionary dictionary]);


}


Yet I get this error when I press the button:


Error Domain=com.apple.watchkit.errors Code=2 "The UIApplicationDelegate in the iPhone App never called reply() in -[UIApplicationDelegate application:handleWatchKitExtensionRequest:reply:]" UserInfo=0x7fd2b9c35ae0 {NSLocalizedDescription=The UIApplicationDelegate in the iPhone App never called reply() in -[UIApplicationDelegate application:handleWatchKitExtensionRequest:reply:]}


Please help! I'm calling 'reply()' as shown above but it doesn't see that! Also, it's ignoring the other code I have in there! Please help!


Thanks in advance :)




Aucun commentaire:

Enregistrer un commentaire