Xcode 8 cannot run on device, provisioning profile problems mentioning Apple Watch
This did work for me:
- Disable bluetooth on the iPhone
- Disconnect & reconnect iPhone
- Build and Run
- Enable bluetooth again when you are finished with the debugging session
I had the same issue today - XCode Version 8.0 (8A218a) - and fixed it with two simple steps (instead of the more complicated approach above:
- add the Apple Watch to member center (did not find a copy&paste option either)
- edit the development provisioning profile and add the watch to devices, save
- go to XCode prefs, move the old provisioning profile to trash (right click on the name) and download the new version
- set the new provisioning profile in project editor
No restart, clean or anything else needed. Worked like a charm.
After putting my Apple Watch on Power Reserve (or turning it off, or Airplane mode, or...) and waiting a bit for Xcode to realize it was gone, I was able to run the app on my phone again.
Airplane mode is easiest.
I have the same issue with Version 8.0 (8A218a). It seems to go away when I:
- Reselect the certificate (via UI)
- Clean all (ctrl+cmd+shift+k)
- Restart Xcode
- Run the projet (which is possible after 1-3)
If I change the code, I get the same error again. Do not be fooled by Xcode actually indicating that everything is ok in the UI - but still gives the error. Its 1-4 again.
Regarding the 2. error. Looking at your screenshot I see no matching "Signing certificate" - which the message indicates is required. The above 1-4 also removed that error for me.
I really do hope there is a better solution to this issue and that we are missing something obvious! The restart-run cycle is not that efficient ;-)