Search code examples
iosswiftios10xcode8fastlane-match

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: target_build_settings

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'?

Thanks!!


Solution

  • 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.