What is the very reason for WatchKit2 error code 7007 “session on paired device is not reachable”

孤者浪人 提交于 2019-12-04 00:12:49

Make sure the debugger is attached only to the Watch app and the iPhone app is run directly from the simulator.

So, run the iPhone app to have the latest code, then stop the execution. Next, run the Watch app and open the iPhone simulator and open the iPhone app. After both apps started (with the debugger attached only to the Watch app) the sendMessage:replyHandler:errorHandler:'s error callback should not be called and the message should send succesfully.

Try to use

WCSession.defaultSession().reachable

in swift to check if it's reachable.

Objective C [WCSession.defaultSession] isReachable].

If it's return false/NO choose Debug -> Attach to Process then find the application you want to attach then select it, should works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!