Why does my WatchKit extension cause a “Waiting to attach” message on an actual Apple Watch but not in a simulator?

后端 未结 6 1056
不知归路
不知归路 2021-01-05 13:01

I have a published iOS app and am trying to add a WatchKit extension for it.

For now, all I have is a watch interface.storyboard with a si

相关标签:
6条回答
  • 2021-01-05 13:40

    I was developing a findersync extension for Mac and faced similar issue with XCode 7.2.1 and i found my changing bundle identifier of the extension project, it fixes the issue. I know this is not a permanent solution but atleast it will help you keep going forward if nothing else works

    0 讨论(0)
  • 2021-01-05 13:41

    It was really never working for me.

    I was able to fix it to remove any specific architectures in the build settings of the app target and leave it to Automatic (remove ARCHS = ... in project file)

    0 讨论(0)
  • 2021-01-05 13:49

    I have the same issue I have already two watch apps in the App Store but the current project with only some Interface objects runs fine in simulator but not on the watch I get only the waiting symbol and then it switch back to the apps screen on the watch. I found the issue it was a setting of the Build architecture in the build setting. I used Xcode automatic problem solver to change the old project. Now it works fine.

    0 讨论(0)
  • 2021-01-05 13:54

    Restarting the watch solved this for me.

    1. Press and Hold the side button until you see the Power Off Slider.
    2. Drag the slider to turn off your device completely. (Note it is NOT a button to press)
    3. After you turn off your Apple Watch, press and hold the side button again until you see the Apple logo.

    From this Apple Support Page: https://support.apple.com/en-gb/HT204510

    0 讨论(0)
  • 2021-01-05 13:57

    The Waiting to attach message is bothering many people. Here are a few things that you can do:

    • Build the main iPhone app first, then stop it and build the WatchKit app
    • Wait some time for the attachment to finish (it can take 20 seconds or so)
    • I found that tapping the app icon on the Apple Watch sometimes helps to re-establish a lost connection. After tapping the app icon, the app often starts to update. So tap on your Apple Watch app after the message Waiting to attachappears.
    • If waiting does not help, stop all processes (make sure that the stop button in Xcode becomes gray) and then build and run your code again
    • Sometimes, restarting Xcode helps to solve problems
    • Force-quit your app on the Apple Watch as explained here
    • If that still does not help, deinstall and reinstall your WatchKit extension using the Apple Watchapp on your iPhone

    Other things you could try:

    • Clean your project
    • Uninstall and re-install your watch app using the Apple Watchapp on your iPhone
    • Delete your iPhone app from the device
    • Delete/recreate the target scheme
    • In the WatchKit app target settings, set "Skip Install" to NO
    0 讨论(0)
  • 2021-01-05 14:05

    I discovered that my WatchKit Bundle Names in my info.plist were not consistent. Ensure that the prefixes are exactly correct.

    0 讨论(0)
提交回复
热议问题