Sajjon Sajjon - 1 month ago 291x
iOS Question

Xcode 8 cannot run on device, provisioning profile problems mentioning Apple Watch

I am running OS X El Capitan and using the Xcode 8 GM seed (8A218a) and I am trying to run my app on my iPhone 6 with iOS 10 GM seed, 10.01 (14A403), which is paired to my Apple Watch running watchOS 3 GM seed (14S326).

I am using Match for handling provisioning profiles and certificates, it has been working beautifully so far.

I recently changed the bundle identifier, so created a new App Id in member center and reconfigured match etc. I have the development certificate and provisioning profile installed on my Mac. I have deleted the old certificates and the old provisioning profiles.

Everything is just working fine running on the simulator. But when I try to run it on my iPhone Xcode 8 is displaying on error:

Provisioning profile "match Development com.XXX.YYY" doesn't include the currently selected device "ZZZ's Apple Watch".

It shows another error as well:

Code signing is required for product type 'Application' in SDK 'iOS 10.0'

This is under Target -> General:
enter image description here

Target -> Build Settings looks like this:

I don't have an Apple Watch extension for this app. So why is Xcode 8 giving me errors relating to my Apple Watch?

Also what does the second error mean? Code signing is required for product type 'Application' in SDK 'iOS 10.0'?



So I solved it myself, by going to Devices and then under Paired Devices, I noted the UDID of my Apple watch. There is no way to copy it, at least not what I could find, so I hade to copy it "manually",

  1. Quit Xcode
  2. I added the UDID of my Apple Watch to Member center.
  3. I updated my provisioning prfiles using match development --force
  4. Deleted derived data rm -rf ~/Library/Developer/Xcode/DerivedData
  5. Started Xcode and performed a clean
  6. Tada! Now it worked