Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create build(.ipa or .app) in Apple Watch

Hi I am developing a app with iWatch extension, But I was unable to create build. Every time faceing some error like :

Code Sign warning: Specified PROVISIONING_PROFILE (***********************) not found and no CODE_SIGN_IDENTITY specified. Ignoring PROVISIONING_PROFILE for now. This will become an error in the future.

CodeSign error: code signing is required for product type 'WatchKit Extension' in SDK 'iOS 8.2'

Is there any option in apple deveoper account (in bundle identifier or provision profile) to select for iWatch Extension ?

Please suggest.

Thanks in advance

like image 382
Abhishek Sinha Avatar asked Mar 30 '15 11:03

Abhishek Sinha


2 Answers

I Got MY ANSWER:

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 93
Abhishek Sinha Avatar answered Sep 30 '22 11:09

Abhishek Sinha


For the Apple watch, you have to create following on apple account:

  • App ID (For watch and watch extension both)
  • Provisioning profile (for the watch and watch extension both)

enter image description here

Note: You don't need to do any change on iTunes connect. If you will upload application with Apple watch then it will automatically appear on iTunes.

like image 35
Alok Avatar answered Sep 30 '22 10:09

Alok