Xcode 7.0 Beta fails to launch a watchOS 2 App on Apple Watch

依然范特西╮ 提交于 2019-12-07 03:58:47

问题


Tried a public sample code project and my own project. Observe no problem with watchOS 1.

watchOS 2 App installs and operates successfully on the real Apple Watch and the simulator, but it won't support the debug mode launching the app on the device by Xcode.

Tried to allow the system to create the Provisioning files and manually create the Provisioning files for the development mode.

Test on 10.10, 10.11.

Steps to Reproduce:

  1. Set up the Provisioning files on build settings, watchOS 2 environment and etc.

  2. Go to the scheme on the left top of the Xcode 7.0 beta and choose the iPhone and Apple Watch device.

  3. Wait... the WatchKit App seems to be installed on Apple Watch, but the screen remains blank.

  4. The Play button on the Xcode is activated after the click. Wait 1 minute. It will be turned off without any warning.

Expected Results:

The WatchKit App will be launched on the Apple Watch.

Actual Results:

The screen remains blank.

Version:

watchOS 2 + iOS 9 (released on June 23, 2015)

Here is a similar case, but in this case there is no error message and plugging the devices directly to a Mac and rebooting all devices won't solve it.

Thank you


回答1:


Release note of Xcode 7.0 Beta 3

You may experience installation errors and issues when deploying your app to a watchOS 2 device or Watch simulator.

Workaround: Try the following methods.

  1. If an error sheet listing some FBS error shows up, just run again.

  2. Delete the iOS app an run again.

  3. Ensure that the ‘Show App on Apple Watch’ is selected in the Apple Watch app for device.

  4. Restart Xcode, the Watch and the iPhone devices/simulators.

  5. Reset the Simulator and Simulator (Watch). To reset the simulators, select the menu, Simulator -> Rest Content and Settings. Then quit them and let Xcode restart them when you Run.

  6. Restart your computer after trying the steps above if necessary.

The Watch simulator may stop taking input after a reset or reboot. If it doesn’t respond to the Home button, quit and restart the Watch simulator application. (21135676)

• If the watch never displayed the trust dialog or don't trust was selected then when you try to Build & Run on the watch, the Debug Navigator will remain empty and not show the '(e) com.xxx.xxx waiting to attach' item. Workaround: Disconnecting the iPhone from the Mac and reconnecting it should cause the trust prompt to appear on the Apple Watch.

If it still doesn't show then reboot the Apple Watch. A last workaround would be to un-pair the Apple Watch and re-do the pairing with the iPhone.

See the full details here

It didn't address the problem directly, at least I know they are working on the similar issues, probably will fix it in the future stable release. (Tried all the methods above and failed mostly to resolve this issue)




回答2:


I went through all of the steps in Kevin's answer and the one that finally solved the issue was simply toggling the "Show App on Apple Watch" from the iPhone watch app.

This should: 1.) Uninstall the watch app (or at least tell you it's being uninstalled) 2.) Re-install, or at least attempt to re-install the watch app to the watch device.

After doing this I was able to run from Xcode to the watch again



来源:https://stackoverflow.com/questions/31257474/xcode-7-0-beta-fails-to-launch-a-watchos-2-app-on-apple-watch

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