简体   繁体   中英

iOS WatchKit - Conflicting App ID requirements for WatchKit Extension during app upload

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: 在此处输入图片说明

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: 在此处输入图片说明

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM