gpt4 book ai didi

ios - Apple Watch openparentapplication : reply: receives Error Domain=FBSOpenApplicationErrorDomain Code=5

转载 作者:可可西里 更新时间:2023-11-01 05:28:19 27 4
gpt4 key购买 nike

我为 Apple Watch 创建了一个较小的项目,以与其运行的父应用程序进行通信。

所以我在我现有的 iOS 项目中创建了一个 Watch 套件扩展,但是当它从 Watch 端调用 openparent 应用程序时,它会在收到的回复 block 中调用

Error: Error Domain=FBSOpenApplicationErrorDomain Code=5 “操作无法完成。(FBSOpenApplicationErrorDomain 错误 5.)

这个错误是什么意思?有什么目标问题吗?请在下面找到代码:

watch 套件方面:

- (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 端:

-(void)application:(UIApplication *)application handleWatchKitExtensionRequest:(NSDictionary *)userInfo reply:(void (^)(NSDictionary *))reply
{
NSLog(@"Watckit call received");
reply(@{@"Score": @"234"});

最佳答案

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 Error: FBSOpenApplicationErrorDomain error 5. What does this mean?

关于ios - Apple Watch openparentapplication : reply: receives Error Domain=FBSOpenApplicationErrorDomain Code=5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29277668/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com