Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Watchkit Extension - No matching provisioning profiles found

I have created an iPhone app that also includes a WatchKit extension, I can run this fine in the simulator but when trying to deploy to an iPhone I get a provisioning issue for the WatchKit Extention target:

"The provisioning profile specified in your build settings (“XXXX”) has an AppID of “XXXX” which does not match your bundle identifier “XXXX.watchkitextension”. Xcode can resolve this issue by downloading a new provisioning profile from the Member Center."

Xcode automatically created the WatchKit targets with the suffix .watchkitextension and .watchkitapp but this seems to cause the issues when using a provisioning profile and deploying to an iPhone.

If I remove the watchkit targets it runs fine, but this is obviously not a solution.

Thanks for your help

like image 548
Edward Jones Avatar asked Mar 02 '15 17:03

Edward Jones


People also ask

How do I fix failed to create a provisioning profile?

3. How To Fix Xcode Failed To Create Provisioning Profile Error. To fix this error is very easy, just connect your real iOS device such as iPhone to the Mac computer with a USB line, follow the popup screen on the iPhone, then you can select your iOS device in the Set the active scheme drop down list.

What is an Apple provisioning profile?

A provisioning profile links your signing certificate and App ID so that you can sign apps to install and launch on iOS devices. You must have a development provisioning profile to sign apps for use with iOS Gateway version 3.4 and later.


3 Answers

You need to create two new AppIDs in the Developer Portal with the correct bundle identifier for your Watchkit app and Watchkit extension. The bundle identifier has to extend the main apps identifier, so if your app is com.myapp it should be com.myapp.watchkitextension and com.myapp.watchkitapp

You also need to create the related Provisioning Profiles for the AppIDs, one for the extension and one for the app.
Add required add ons (like Keychain) if you are using them in your Watch app.

All in all you will need six PPs, 3 for development, 3 for archiving/store. With Xcode 6.3 team provisioning for development stopped working (for me)

Next goto Xcode > Preferences > Accounts > YOUR_ACCOUNT > View Details ..., CTRL+Click one of the Profiles and open in Finder. Move all Profiles to Trash, then refresh the Profiles.

In your targets make sure you have the correct Team set for your main App target, the Watchkit extension target and the Watchkit App target, also make sure you have the right Provisioning Profiles assigned to main App target and the Watchkit extension target (Watchkit app Provisioning Profile can not be set but will be assigned automatically Edit: With Xcode 6.3 it can has to be set).

To be sure all is fine clean build folder: In Xcode hold command and do Product > Clean build folders ...

Now you are ready to archive.

like image 56
dogsgod Avatar answered Nov 04 '22 00:11

dogsgod


Im my case I've clean all my provisioning profile as suggested by other users, then I had to delete "code signing entitlements" from "Build Settings" in both App parent and extention target and after rebuild and archive, all work fine.

code signing entitlements from build Settings

like image 32
christian mini Avatar answered Nov 03 '22 23:11

christian mini


I made 3 App IDs (for container app, watchkit extension, and watchkit app) belong with 3 provisioning profiles. (I was going to use AppGroup, so my app cannot share single App ID.) Setting 2 provisioning profiles for container app and watchkit extension, the archive of the my app could not pass the Xcode's validation process.

In my case, the critical point is to set the provisioning profile of the WATCHKIT APP. Setting it, it pass the validation process, and succeed to submit the app.

My procedure of the setting is the following:

  1. In Xcode, open "TARGET" of WatchKit App.
  2. Select the "Build Settings" tab.
  3. In the next line of the tab, choose "All" not "Basic."
  4. The you can find "Provisioning Profile" line in "Code Signing" section.
  5. Set the appropriate provisioning profile of yours.

For a while, I have believed 3rd party app developer cannot set provisioning profiles of WatchKit Apps in Xcode. Noticing that we can set it, the answer is now clear...

like image 34
sakira Avatar answered Nov 04 '22 00:11

sakira