4

I have created a smaller project for Apple watch to communicate with it’s parent application it’s worked.

So I have created a Watch kit extension in my existing iOS project but when from Watch side it call openparent application in reply block it receives

Error: Error Domain=FBSOpenApplicationErrorDomain Code=5 "The operation couldn’t be completed. (FBSOpenApplicationErrorDomain error 5.)”.

What does this error means? Is there any target issue? Please find the code below:

Watch kit 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"});
Mike Phils
  • 3,475
  • 5
  • 24
  • 45

1 Answers1

6
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.

Answered from here: iOS Error: FBSOpenApplicationErrorDomain error 5. What does this mean?

Community
  • 1
  • 1
AndyDunn
  • 1,074
  • 1
  • 12
  • 19
  • Thanks for the answer. Another team added this property to the pilst which broke our WK openParent calls. Without your post we would have spent hours figuring out what changed. – John G Mar 30 '15 at 18:34