1

I'm trying to publish my WatchKit application to the iTunes Store. I encountered the following error: Bad bundle identifier. Below is the screenshot of the error detail. Can anyone help me fix this problem? enter image description here

Michael Woyo
  • 138
  • 2
  • 15
  • 1
    Change the Bundle Identifier value and republish it since first error message states CFBundleIdentifier value 'com.an.SmartConverter' already exists. – Jayprakash Dubey Apr 02 '15 at 06:45
  • all 3 identifiers should be same? – Michael Woyo Apr 02 '15 at 07:27
  • Which 3 identifiers are you talking about? There is just `com.an.SmartConverter`. – Alex Cio Apr 02 '15 at 12:16
  • Whats the name of the app which communicates with your watchkit app? Found a post which tells the bundle identifier should include the extension .watchkitextension http://stackoverflow.com/questions/28634443/watchkit-extension-bundle-id-unavailable – Alex Cio Apr 02 '15 at 12:18
  • See my answer here: http://stackoverflow.com/questions/28816339/watchkit-extension-no-matchin-provisioning-profiles-found/29272260#29272260 – dogsgod Apr 09 '15 at 05:26

3 Answers3

2

Try to change the bundle identifier of the watch extension to yourapp identifier.watchkitextension

Not sure whether this works.

fredpi
  • 8,414
  • 5
  • 41
  • 61
  • Consider spending more investigation into if this actually works or not. Writing a one-line answer and adding `Not sure wether this works` is no helpful contribution for any future person seeing this answer. – return true Jul 11 '16 at 12:28
0

Have a look at this hint, maybe this helps you:

If you set the bundle ids later you should:

check all three .plist files bundle ids so that it looks something like:

  • com.company.appname
  • com.company.appname.watchkitextension
  • com.company.appname.watchapp

Make sure your AppleWatch app .plist (3) СompanionAppBundleIdentifier” value is the containing app bundle id. (The target number 1 bundle id) Otherwise, you’ll get either a compiler error “Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.”, or some weird simulator error Watchkit LaunchServicesError code=0.

Found on this website

Alex Cio
  • 6,014
  • 5
  • 44
  • 74
0

In fact, this is a duplicate, there are a number of similar questions already answered. For your convenience I post my answer again.

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.

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

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.

dogsgod
  • 6,267
  • 6
  • 25
  • 53