This application's bundle identifier does not match its code signing identifier

荒凉一梦 提交于 2019-12-12 10:34:43

问题


When I try to build and run the app on the device I get following error App installation failed: This application's bundle identifier does not match its code signing identifier.

I checked the signing certificates, bundle ids, provision profile, entitlements and everything is correct.

Any Ideas ?


回答1:


  1. Go into Building Phases
  2. Click the + sing and add script in New Run Script Phase
  3. Add /usr/local/bin/carthage copy-frameworks to the script box.
  4. In Input Files add a line for each Carthage framework you're using in your app: $(SRCROOT)/Carthage/Build/iOS/FrameworkName.framework
  5. If you're still having problems, also add this under Output Files for each framework: $(BUILT_PRODUCTS_DIR)/$(FRAMEWORKS_FOLDER_PATH)/FrameworkName.framework

This process fixed it for me. It can be found under Carthage documentation. You can see this process here in items 4, 5, 6. https://github.com/Carthage/Carthage#adding-frameworks-to-an-application




回答2:


In the end the error was caused by Carthage.

After removing and rebuilding all frameworks it fixed the problem.




回答3:


Are you using custom .xcconfig files?

Sometimes custom .xccofigs can override the default code-sign settings.

1) See if the project has a custom config by: --- 1) Click on project whatever the project name is called in Xcode (usually at the top)

2) On the right you'll see your project settings. In here, you can set the identifier.. If not, then you're on the wrong view. This is what you should see:

3) Change the "bundle Identifier" to something to the effect of "com.yourcompany.yourAppName". --- The com.yourcompany is your website domain name reversed.. Apple Recommend this. --- After the com.yourcompany is the app name or "nickname' your give it so. com.yourcompany.myCoolApp would be the full identifier.

4) Once you've done this, make sure that under the "Build Settings" as below:

--- That your "Code Signing Identity" is set to whatever Identity you want. For Debugging on iOS or OSX you use "iPhone Developer: Your Name xxx" or "Mac Developer: Your Name xxx".

  • Code signing resources path: reserved for advanced / command line tools
  • Other Code Signing Flags: Not sure, never had to use this
  • Provisioning Profile: IDEALLY set this to "Automatic" so Xcode handles the setting. Otherwise, when you've set a provisioning profile on the Member Centre, then specify it here (make sure you've installed it first though).



回答4:


in iTunes they changed it to have a flag for each role if he will have Access to Certificates, Identifiers & Profiles. and by default its false.

All i had to do is to:

go to iTunesConnect -> Users and Access -> edit my role by checking the box of "Access to Certificates, Identifiers & Profiles"




回答5:


To fix this, I had to set framework's Product Bundle Identifier to anything with a dot.

In my case it was because of framework, not Carthage's, but the one as target dependency in Workspace.

Before the fix Product Bundle Identifier was something like "FrameworkName", andXcode would automatically append some autogenerated ID, and Signing Identifier would become "FrameworkName-5555494493d11a8e5f473d1cb2a5d781973d171e".

When I set Product Bundle Identifier to something with dot, like "com.organization.frameworkName", Xcode stopped to auto-append anything, and everything works because ids match.

It seems that it wasn't an issue before Xcode 11 and Catalina. This debug was crazy.




回答6:


Your app is signed by a Provisioning Profile, which in turn is linked to a Certificate (which can be either for development or distribution).

Now certificates have a Bundle ID, which can be:

  1. A wildcard, such as "com.mydomain.*" OR
  2. An explicit ID, such as "com.mydomain.myapp"

Either way, the bundle identifier of your app has to match the Bundle ID of the certificate tied to your provisioning profile. A mismatch would trigger the error you're encountering.



来源:https://stackoverflow.com/questions/34642165/this-applications-bundle-identifier-does-not-match-its-code-signing-identifier

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!