[英]FBSOpenApplicationErrorDomain Code=3
I just added a Watch app to my project and try : 我刚刚在我的项目中添加了一个Watch应用程序并尝试:
override func awakeWithContext(context: AnyObject?) {
super.awakeWithContext(context)
let res = WKInterfaceController.openParentApplication(["key" : "value"]) { (replyInfo, error) -> Void in
print("replyInfo : \(replyInfo) + error \(error)")
}
print(res) // true here
}
In my AppDelegate I wrote : 在我的AppDelegate中,我写道:
func application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: ([NSObject : AnyObject]?) -> Void) {
reply(["replyKey" : "replyValue"]);
}
When I launch the Watch app I just have : 当我启动Watch应用程序时,我只有:
replyInfo : [:] + error Optional(Error Domain=FBSOpenApplicationErrorDomain Code=3 "The operation couldn't be completed. (FBSOpenApplicationErrorDomain eor 3.)")
replyInfo:[:] + error可选(错误域= FBSOpenApplicationErrorDomain Code = 3“操作无法完成。(FBSOpenApplicationErrorDomain eor 3.)”)
Is it due to the simulator ? 是由于模拟器? Do you know what am doing wrong ?
你知道做错了什么吗?
Thanks ! 谢谢 !
iOS Simulator -> Reset Contents and Settings... iOS模拟器 - >重置内容和设置...
Worked for me 为我工作
iOS Simulator -> Reset Contents and Settings... -> Reset iOS模拟器 - >重置内容和设置... - >重置
Restart simulator: 重启模拟器:
CMD + Q
CMD + Q
CMD + R
CMD + R
For those using real hardware and not the simulator, I had this issue. 对于那些使用真实硬件而不是模拟器的人,我遇到了这个问题。 The problem is I'd selected my individual developer account as my code signer.
问题是我选择了我的个人开发者帐户作为我的代码签名者。 In doing so, I had to go to:
这样做,我不得不去:
Settings > General > Profiles > Device Management > (my email) 设置>常规>配置文件>设备管理>(我的电子邮件)
and then tap the Trust (my email) to trust my individual account. 然后点击信任(我的电子邮件)以信任我的个人帐户。
After I did this, cmd-R ran my code on my watch/phone just fine. 在我这样做之后,cmd-R在我的手表/手机上运行我的代码就好了。
Try returning to the view controller and running again in the simulator; 尝试返回视图控制器并在模拟器中再次运行; it worked for me in Xcode 7.2.
它在Xcode 7.2中对我有用。
I was getting this when running on the actual watch. 当我在实际的手表上跑步时,我得到了这个。 Turned out to be caused by the developer account not being trusted on the iPhone.
原来是由于iPhone上不受信任的开发者帐户造成的。 Settings->Device Management->...
设置 - >设备管理 - > ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.