I\'m trying to build an extension project and Xcode keeps throwing the error in subject.
The solution is already covered in a lot of answers:
Containing App Bundle Id: com.alphabet.gmail
and
Extension app bundle id: com.alphabet.gmail.notificationServiceExtension
Because Apple wants communication between apps to be by the containing app's bundleId and avoid devs having to go around and send messages to the bundleID of the app Extension.
For example, your server must send a field named apns-topic to send a push notification to APNS so the app can download an image. The value of that topic is the bundleID.
But it's not the bundle ID of the service extension. It's the bundleId of the main app itself.
However on the actual physical phone, both the bundleIDs (com.alphabet.gmail.notificationServiceExtension
and com.alphabet.gmail
exist).
My understanding is that the OS looks for a target that:
com.alphabet.gmail
example: Extension app bundle id: com.alphabet.gmail.notification
NSExtensionPointIdentifier
set to com.apple.usernotifications.service
. You should not touch this value. It's just a pre-defined value by Apple. I tried most of the solutions given here, but it did not helped me to fix the issue in Xcode 9.4
This SO Answer helped me fix the issue.
What i did is simply
Unchecking the Automatically manage signing for all the targets and the project
In code signing making it iOS Developer for all the targets and the project.
Clean the project, then close the project and open it.
Now Enable the Automatically manage signing for the target and choose the developer account. Then build it.
It fixed me the error. I don't know when Apple will fix these type of issues. It eats lot of hours.
Edit: I am using This answer too, That my target bundle id is com.companyname.projectname and for the extension bundle id com.companyname.projectname.myextension
Make sure bundle identifier of Extension have prefixed with app bundle identifier. If its same and still giving error, then go to the .plist file of Extension and change their Bundle Identifier.
The problem is likely that you added a folder using "Create folder references" when adding it to your project (like I did). @Jacob's fix didn't work for me :(
I had to delete the folder reference I added to my project, then clean and build, and that fixed it for me.
I had to manually change the BundleID in the extension's info.plist to what I needed.
I filed a radar : rdar://17487465
when we develop watch app then there is 3 target associate with the app. Their target must have the following style of bundle identifier.
In info.plist for watch target, it must have
WKCompanionAppBundleIdentifier = com.company.app
and in info.plist for watch app extension, it must have
NSExtension > NSExtensionAttributes > WKAppBundleIdentifier = com.company.app.watch