How to fix "This app contains a WatchKit app with an invalid bundle identifier" - ios

I'm trying to run the Apple sample project SimpleWatchConnectivity. I changed the bundle identifiers for all 3 parts to my company's domain (e.g. com.nemesys.simplewatchconnectivity). When I try to run on an iPhone and Apple Watch device, I get this error:
This app contains a WatchKit app with an invalid bundle identifier. The bundle identifier of a WatchKit app must have a prefix consisting of the companion app's bundle identifier, followed by a '.'.
If I add a dot (.) to the WatchKit app, then at build time, I get:
error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.
I have tried a few solutions from answers to other related questions but none worked. Someone having a similar problem to archive and upload to the App Store approved an answer that basically said:
iOS app bundle identifier: com.nemesys.simplewatchconnectivity
WatchKit App bundle identifier: com.nemesys.simplewatchconnectivity.watchkitapp
WatchKit Extension bundle identifier: com.nemesys.simplewatchconnectivity.watchkitapp.watchkitextension
But when I tried those, I got the second error, the embedded binary's bundle identifier is not prefix with the parent app's bundle identifier.

Related

This application contains an app extension with a bundle identifier that conflicts with the bundle identifier of another app

When I try to build via xcode to my iPhone, it succeed but after that it show warning "This application contains an app extension with a bundle identifier that conflicts with the bundle identifier of another app or app extension already installed". what must i do to succeed build to my iPhone?
You can't have two applications with the same bundle id installed on your phone.
Your build did succeed, that's the installation process that failed. I have two suggestions:
Change the bundle identifier of your current app so it doesn't conflict with other apps
Delete the app with the same bundle identifier
The error seems self explanatory ; you have multiple apps extensions in your solution that have the same bundle identifier.
Check all your info.plist files, and try adding .ext (for example), after the bundle identifiers in the app extensions that have the same identifier as your main app.

App installation failed: illegal Bundle identifier

I'm working on WatchKit app extension and when I run my project in the physical device I got this alert message:
However, I checked Info.plist and my bundle identifier is
com.myname.myappname
and my bundle identifier of my WatchKit extension is
com.myname.myappname.extension
Isn't this just right? I cleaned and built again and again., but it just won't work.
How can I build that in physical device?
check again,
Do something like this if there is something different,
My app identifier is - com.WTS.Siri-Extension
My extension identifier is - com.WTS.Siri-Extension.Siri
My extension Name is - Siri
Check to see if there are trailing spaces on either of your bundle identifiers.
Followed the below process. And it is worked for me.
You have to be careful when changing the bundle identifiers, here's how they should be set (you need can change each identifier in the Info.plist for the iPhone app, for the Watchkit Extension and for the Watchkit App):
iPhone Application Info.plist:
Set any bundle identifier as you like (the "Bundle identifier" property).
Example:
Bundle identifier: com.fruitcompany.orange
WatchKit App Info.plist
The bundle identifier here must be prefixed with the identifier of the iPhone application, like this(example):
Bundle identifier: com.fruitcompany.orange.watchkit
You also need to change the WKCompanionAppBundleIdentifier which must match with the iPhone application bundle identifier, like this:
WKCompanionAppBundleIdentifier: com.fruitcompany.orange
Watchkit Extension Info.plist:
The bundle identifier here must be prefixed with the identifier of the iPhone application, like this(example):
Bundle identifier: com.fruitcompany.orange.watchkit.extension
You also need to set the WKAppBundleIdentifier under the NSExtension attribute.
WKAppBundleIdentifier
The WKAppBundleIdentifier identifier must match with the WatchKit app bundle identifier like this:
WKAppBundleIdentifier: com.fruitcompany.orange.watchkit

After Removing App Extension Still Get App Installation Failed Error- This app contains an app extension with an illegal bundle identifier

"This app contains an app extension with an illegal bundle identifier.
App extension bundle identifiers must have a prefix consisting of
their containing application's bundle identifier followed by a '.'."
I used to create a widget extension in my project, after a while i deleted it, today I tried to run my app on my iPhone I got this error.
It works well on simulator. And I try to install on other iPhones it also works well. I guess it is a physical device specific problem. I tried delete and reinstall the app and restart my device it did not work, and i checked again there is no extension target or any file in my project, I am still getting the same error.
I had the same problem. Turns out that you just need to clean the project and the build folder with this shortcut command + option + shift + k
"This app contains an app extension with an illegal bundle identifier. App extension bundle identifiers must have a prefix consisting of their containing application's bundle identifier followed by a '.'."
Both the app and the app extension have their own bundle IDs. The extension's bundle ID must be the same as the app's ID plus an extension beginning with a ".". In other words, if your app's bundle ID is com.mycompany.myappname, all bundle extensions must be of the form com.mycompany.myappname.myextensionname. You can replace myextensionname with whatever you like, but the extension's ID must be, well, an extension of the app's bundle ID.
You need to look at your app bundle ID and your extension bundle ID and fix them so that they comply with this rule. Deleting and reinstalling, cleaning and rebuilding, etc, will have no effect if the bundle IDs are don't follow the rule. This is why I asked (in a comment) what your bundle IDs are-- because they are the cause of the problem, and changing them is the only way to fix it.

WatchKit app submission

I have created an app with WatchKit. I have tried with three different bundle identifier:
com.xyz.myappname
com.xyz.myappname.extension
com.xyz.myappname.extensionapp
If I set this and try to validate my app I am getting extension app and WatchKit app bundle identifier does not match.
If I keep same bundle identifier for both app then I am getting CFBundle identifier collision. Error as follows
CFBundleidentifier collision : There more than bundle with the CFBundleidentifier value com.xyz.myappname.extension under the IOS application myappname.app
Please let me know whats going wrong and how to set this to publish on AppStore
Had the same problem today!
Select your main App target, and go to Build Phases. Under "Copy Bundle Resources", I had to remove the "APPNAME Watchkit App.app".
After that, I was able to submit my App to the App Store.

iPhone app distribution building warning: This bundle is invalid

When i build my app in Xcode I got the warning below which prohibits me from uploading my app to the App Store:
This bundle is invalid. The application-identifier entitlement is not
formatted correctly; it should contain your 10-character App ID Seed,
followed by a dot, followed by your bundle identifier:
com.companyname.appname (-19053)
I have tried to change bundle indentifier to "85B9GK2627.com.companyname.appname". But I get the same warnings. Does anybody know how to resolve this problem?
When XCode says to change it to "XXXXX.com.companyname.appname" it means you should actually use the values you supplied when creating the app on iTunesConnect. ".com.companyname.appname" is just an example.
Copy the bundle identifier from portal which you have used in your distribution provisioning profile and add that to info.plist. Then perform clean and build.

Resources