Bundle ID for watch extension not matching parent app

I have an iPhone app with watch app and extension. I'm getting the following error when building: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.


I've followed the instructions as set out here: https://developer.apple.com/library/ios/technotes/tn2410/_index.html


The iPhone app bundle ID is 'com.myname.appname'

The watch app bundle ID is 'com.myname.appname.watchkitapp' (the 'parent' app bundle ID mentioned in the error)

The watch extension bundle ID is 'com.myname.appname.watchkitextension' (the embedded bundle ID mentioned in the error)


I've set the NSExtensionPointIdentifier to com.apple.watchkit


I've created three separate app IDs and three separate provisioning profiles.


Any help is appreciated.


Grant.

Answered by ukaussie in 64709022

I've solved the issue.


For those interested the extension bundle IDs should be as follows:


iPhone app bundle ID: com.myname.myapp

Watch app bundle ID: com.myname.myapp.watchkitapp

Watch extension bundle ID: com.myname.myapp.watchkitapp.watchkitextension


Cheers

Grant.

Accepted Answer

I've solved the issue.


For those interested the extension bundle IDs should be as follows:


iPhone app bundle ID: com.myname.myapp

Watch app bundle ID: com.myname.myapp.watchkitapp

Watch extension bundle ID: com.myname.myapp.watchkitapp.watchkitextension


Cheers

Grant.

After much trial and error, I landed on this. The prior replies helped but I needed a slight modification:

  • iPhone app bundle ID: com.myname.myapp
  • Watch app bundle ID: com.myname.myapp.watchkitapp
  • Watch extension bundle ID: com.myname.myapp.watchkitextension

In WatchOS Info.plist

<key>WKCompanionAppBundleIdentifier</key>
<string>com.myname.myapp</string>

In watcOS Extension Info.plist

<key>NSExtension</key>
	<dict>
		<key>NSExtensionAttributes</key>
		<dict>
			<key>WKAppBundleIdentifier</key>
			<string>com.myname.myapp.watchkitapp</string>
            ...
		</dict>
Bundle ID for watch extension not matching parent app
 
 
Q