Apple Watch openparentapplication: answer: gets error domain = FBSOpenApplicationErrorDomain Code = 5

I created a small project for Apple Watch to interact with its parent application.

So, I created a clock set extension in my existing iOS project, but when on the Watch side it calls the openparent application in the response block, it gets

" Error: Domain Error = FBSOpenApplicationErrorDomain Code = 5" The operation could not be completed. (FBSOpenApplicationErrorDomain error 5.) ".

What does this error mean? Is there any targeted question? Please find the following code:

Clockwork Side:

- (IBAction)satusButtonClicked {

    NSLog(@"StausButtonClicked");
    NSDictionary *senddict=[[NSDictionary alloc] initWithObjects:@[@"5",@"Two",@"Three"] forKeys:@[@"1",@"2",@"3"]];
    [InterfaceController openParentApplication:senddict reply:^(NSDictionary *replyInfo, NSError *error) {
        NSLog(@"ReplyReceived : %lu",(unsigned long)[replyInfo count]);
        NSLog(@"Reply Info: %@", replyInfo);
        NSLog(@"Error: %@", error);
    }];

}

iOS side:

-(void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *))reply
{
    NSLog(@"Watckit call received");
    reply(@{@"Score": @"234"});
+4
source share
1 answer
In the info.plist, I had "Application Does Not Run in Background" set to YES. This caused the problem. Changing that setting to NO fixed it.

: iOS : FBSOpenApplicationErrorDomain 5. ?

+6

All Articles