-1

I decided to support both WatchOS 1 and WatchOS 2. Initially, my bundle IDs for the watch targets are created as follows:

WatchKit App: com.company.myapp.watchkitapp

WatchKit Extension: com.company.myapp.watchkitextension

With this setup, build fails with the following error message: enter image description here

So I changed the bundle IDs to the following format, so that extension's bundle ID is prefixed with watchkit app's bundle ID:

WatchKit App: com.company.myapp.watchkitapp

WatchKit Extension: com.company.myapp.watchkitapp.watchkitextension

Build succeeds. I then try to upload the build to Testflight in preparation for the release, but during the upload process I got the following error: enter image description here

The error message is clear: I have two periods after the application's bundle ID.

This is very confusing to me. How is it possible that the bundle ID of my extension should be prefixed with watchkit app's bundle ID, and contain only one period after the parent app's bundle ID? The prefix will already have used that one period. How can I satisfy these two conflicting requirements at the same time?

Things I have already tried but not working:

  1. Starting from scratch, creating brand new app ids and provisioning profiles; Deleting all old provisioning profiles from local, re-downloading, then setting the correct code signing and provisioning profiles in target Build Settings in Xcode.

  2. Changing the name of the App ID to match the format of "XC com company myapp", in Member Center.

  3. Quit & restart & clean & rebuild.

SeaJelly
  • 1,738
  • 1
  • 15
  • 30

1 Answers1

0

opening Xcode Preferences (+,), going to Accounts → View Details. Then select all provisioning profiles and delete them with backspace (note: they can't be removed in Xcode 7.x). Restart Xcode, else the list doesn't seem to update properly.

Now click the Download all button, and you should have all provisioning profiles that you defined in the Member center back in Xcode. Don't worry about the Xcode-generated ones (Prefixed with XC:), Xcode will regenerate them if necessary. Restart Xcode again.

Now go to the Code Signing section in your Build Settings and select the correct profile and cert.

for more

Community
  • 1
  • 1
Anupam Mishra
  • 3,408
  • 5
  • 35
  • 63
  • I have already done these steps; app has always built and run fine on Dev profiles & Release profiles if I use bundle ID "com.company.myapp.watchkitapp.watchkitextension" for the watchkit extension, but submission will fail with the error "bundle ID cannot contain more than one period after app id". If I use "com.company.myapp.watchkitextension" then build will fail with error "embedded bundle identifier is not prefixed with the parent app's bundle identifier". I know exactly how provisioning works... the short question is simply "What should the bundle identifier be for a watchkit extension" – SeaJelly Jul 09 '16 at 06:22
  • yourmobileappBundleId.watchkitextension so if yr mobile app bundle id is 'com.company.myapp' then your watchkit extension ID should be like 'com.company.myapp.watchkitextension' – Anupam Mishra Jul 09 '16 at 06:38
  • That will give me the first error mentioned in the post; i.e., the bundle ID of the WatchKit App needs to be the prefix of the bundle ID of the WatchKit App Extension. So 'com.company.myapp.watchkitextension' gives error, but 'com.company.myapp.watchkitapp.watchkitextension' is fine. – SeaJelly Jul 09 '16 at 17:51