App installation failed due to application-identifier entitlement

IosWatchkitWatchos 2

Ios Problem Overview


I am unable to install a watchOS 2 WatchKit app due to an application-identifier entitlement. This happened after turning on App Groups in the Capabilities tab.

Full error:

> App installation failed > > This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.

Screenshot 1

This is running the app in debug mode on a physical device. Running just the iOS app works fine.

I have turned App Groups off again and removed the entitlements files that were added, but same error.

Ios Solutions


Solution 1 - Ios

I had this problem with an iPhone app, and fixed it using the following steps.

  • With your device connected, and Xcode open, select Window->Devices
  • In the left tab of the window that pops up, select your problem device
  • In the detail panel on the right, remove the offending app from the "Installed Apps" list.

After I did that, my app rebuilt and launched just fine. Since your app is a watchOS app, I'm not sure that you'll have the same result, but it's worth a try.

Solution 2 - Ios

I had this problem and was not able to resolve it without deleting and reinstalling the app (messing with provisioning profiles, as some here suggested, did not help).

However, I did not lose my existing test data. Here's how to do that, for anyone having this problem in the future:

  1. Before removing the app, open the Xcode "Devices" window (that's cmd-shift-2).
  2. Select your device and find your app in the "Installed Apps" list.
  3. Click on the gear icon and select "Download Container...". This will copy all of the app's data to your Mac. Save that somewhere for now.
  4. Delete the app and reinstall it from Xcode. Kill the app from Xcode (click the stop button), so it's not running.
  5. Back in the "Devices" window, click the gear icon and select "Replace Container...". Select the data that you downloaded to your Mac in step 3.

Xcode will then restore your previously saved app data. You now have your old test data back, and the app should run.

Solution 3 - Ios

Delete any previous versions of App from your iPhone and then Clean->Build and Run again. Your app should run smoothly on your Device.

Also, please make sure you have not selected Distribution Certificate in your Project Settings while trying to run your project directly on your device.

Solution 4 - Ios

You will get this error when your AppID prefix does not match the prefix of the previously installed app. If your app is already in the App Store, you will not be able to submit updates without restoring the original AppID prefix or contacting Apple.

Apple's instructions for handling this problem: https://developer.apple.com/library/content/technotes/tn2319/_index.html#//apple_ref/doc/uid/DTS40013778-CH1-ERRORMESSAGES-UPGRADE_S_APPLICATION_IDENTIFIER_DOES_NOT_MATCH_THE_INSTALLED_APP

If you did not intend to change the AppID prefix then Xcode is signing your app with the wrong provisioning profile.

If you do intend to change the AppID prefix (because the app was transferred to a new developer, or you are migrating from an old pre-2011 AppID) you must contact Apple to migrate an existing AppID to a new prefix.

You must also add the previous-application-identifiers entitlement to your app, listing all previous AppIDs (with old prefixes). And you must ask Apple to generate a provisioning profile for you that includes the previous-application-identifiers entitlement.

Solution 5 - Ios

I solved this without deleting the app

With the project open in xcode. Project -> Build Settings -> Code Signing -> Provisioning Profiles (drop down) It is probably set to automatic and is choosing the wrong profile. Open the drop down and choose the correct one, then re-run the app.

Solution 6 - Ios

I faced the same problem and was stuck for several minutes and after a search, the simplest solution that i found is just remove the previously installed app from your device manually and try to run the app from Xcode again.

Hope it helps you. All the Best...

Solution 7 - Ios

Steps

  1. With your device connected, and Xcode open, select Window->Devices
  2. Now select the app and download the container using setting icon
  3. Delete the app
  4. Install app again using Xcode
  5. Stop from Xcode
  6. Go to Window->Device and select the app and replace the container that is backup from previous app

Solution 8 - Ios

This can be caused by App ID prefix, when you switching different developer accounts. See https://developer.apple.com/library/content/technotes/tn2311/_index.html for Apple's support.

Solution 9 - Ios

Explanation

For me, this issue happened because I have signed in with a different account than the account I have installed the app on the iPhone with.

Solution

Just delete the app from the iPhone and run it again from Xcode.

Solution 10 - Ios

I tried a few thing myself like updating/making new provisioning profiles, fixing entitlements in Apple Member Center and in project but in my case, I simply had to delete the application and re-run it.

o_O


> This application's application-identifier entitlement does not match > that of the installed application.

NOTE: it says "...does not match the installed application"

I guess it happened for me because we added a new app extension and there must have been some target related migration issues? Not sure but anyways

Solution 11 - Ios

I found that I had accidentally changed the provisioning profile to have a wildcard in it.

Ie., it went from com.companyname.appnickname to com.companyname.*

I made a new provisioning profile with the full name correctly named, downloaded it, set the Target->build settings->provisioning profile to that new profile, restarted xcode, got a bizarre error from xcode (it seemed to confuse my various app developer logins), restarted xcode again, and it worked!

I didn't want to delete the existing app, because I was trying to test what happens when a user upgraded their app to a newer version, so I had installed the app store version and then run my xcode with the newer version (which acts like 'upgrading' the app without removing any user data).

Solution 12 - Ios

I had the same error and I solved it by changing Bundle Identifier to something new. After that it build project with no problem.

My steps:

  • Open Xcode
  • Go to General tab
  • Find Identity
  • Change Bundle Identifier to something new.

Bundle identifier change

Solution 13 - Ios

I had the same issue. The bundle.identifier and the name of the project has to be the same. At least that was my issue.

Solution 14 - Ios

Uninstall the main iPhone app, Watch app and build them again solves the problem.

Solution 15 - Ios

I had the same error until I restored the watch to factory defaults as per https://forums.developer.apple.com/thread/17948

"Apparently if you have and existing WatchOS 1 app and try to update it to WatchOS 2 the bundle identifier changes and causes this error. If you update your watch you will need to do reset it if you had installed WatchOS1 app before updating that app to WatchOS2."

Solution 16 - Ios

Even though I followed some few logical steps: uninstall app, rebuild project, the only solution that worked for me was: restart XCode. (XCode 8.1)

Solution 17 - Ios

This happened when I tried installing over top of an adhoc build.

Solution 18 - Ios

In most of the responses to this issue, there's one critical aspect being overlooked that was brought up by the original asker. The app needs to be installed without deleting the existing install. In my case, the app uses an SQLite database that stores quite a bit of data for the user. Obviously, if you delete the app, then you delete the data. A solution that allowed me to test it in the same way a user will update it was a must.

In my case, the issue was Xcode using a provisioning profile automatically generated by Xcode. This probably happened because I got a new computer and didn't transfer the distribution provisioning profile over. Not to mention, I had not updated the app in almost 2 years. So my original provisioning profile (which contains the Entitlements application-identifier) was long gone. Solution: in Xcode preferences-> Accounts-> Select the appropriate Apple ID-> View Details-> Under Provisioning Profiles, right-click on the Xcode-generated profile for that app (it's prefixed with XC iOS), and select Move to Trash.

Xcode provisioning profiles under Accounts

On the developer website, create a new distribution profile with your App's ID. Download the new profile, double click and Xcode should automatically install it. Conversely, you could return to the profiles listed in Xcode and tap the Download button next to your newly created profile. Build the app and try running again. By the way, my Xcode is set to automatically manage code signing, which other than this issue works great.

Solution 19 - Ios

TLDR - delete the app from the device and run again.

In my case :

  1. I compiled and run the app on the iPhone device.
  2. I open in the setting the Capabilities and turn on the iCloud
  3. Then I try to run the app again, boom, error : "App installation failed This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed.

4.Then I deleted to app from the iPhone (after I read the answers here)
5.Everything works O.K

Solution 20 - Ios

For the people who might be part of more than one team, this can be your problem:

  • If the app's bundle id is hard coded in your Info.plist then Xcode can get confused and throw this tantrum.

To fix:

  • Make sure that the bundle id is set as:

    $(PRODUCT_BUNDLE_IDENTIFIER)

Solution 21 - Ios

The accepted answer didn't work for me. To make it work I had to reset the Apple Watch to the last available backup.

Solution 22 - Ios

I received this error after I moved from a 5s to a 6s. I recovered the new 6s from a backup of the old iPhone. Because of this on the new iPhone the old app was installed.

The old app did not show up in the 6s "Installed Apps" list! I manually deleted this old app from the 6s and everything was fine.

Solution 23 - Ios

I encountered this issue because I built to the phone with my code signing turned off from another machine, so you need to uninstall the app from the phone before installing/building to the phone with code signing on.

Solution 24 - Ios

This is solved easily by removing you previous app from your device. And start to reinstall again. This works fine for me.

Solution 25 - Ios

I faced the same issue today and resolving it by just changing the Display Name and Bundle Identifier from the previous App that also installed on my iPhone. Steps:

Xcode -> General tab -> Find Identity -> Change Bundle Identifier

So, now I have two same Apps with same functionality but with two different names and identity.

Solution 26 - Ios

In my case it was because of the certificate.

because my own certificate to sign the app wasn't part of the developper team (new employee), upgrading the app from the App Store to a new version wasn't allow.

So in case it happen to you and you can't manage to obtain a "good" certificate, just clone the git appStore version, open two Xcode projects, compile the old version, update the settings as you wish, the compile the new one and you're done.

a little bit dirty and tricky but I hope it could help someone.

Solution 27 - Ios

My problem was the App ID in combination with the certificate used to create the provisioning profiles. None of my provisioning profiles were working because none of them were "Elgible" (created with a certificate that matched the App ID). I had moved development to a new machine, so perhaps this was the deeper reason. At any rate I had to create a new certificate, then new provisioning profiles with that certificate being careful to choose the right App ID when creating them. Good luck.

Solution 28 - Ios

None of the answers above worked for me. My problem: I had installed an App Version from Testflight, so, I just deleted both, the old app and the Testflight version, and is working again.

Solution 29 - Ios

Accepting the pending agreements from the developer website and iTunes Connect website and reopening the project in X-Code solved the situation for me.

Solution 30 - Ios

For me, this occurred after updating to XCode 11, like the others have said, it is a signing issue. What fixed it for me was to go to Developer portal > Certificates & Identifiers Edit the provisioning profile you are using

List of certificates Screenshot

You'll see that there's certificate for XCode 11 (as seen on screenshot) Just tick that box, re download the profile, and update your projects signing with the new profile.

Solution 31 - Ios

With MacOS Catalina, your iPhone will be displayed in the 'Locations' sidebar of Finder windows (as long as you've got the Finder preferences set up to show external devices) - you can then access the files via the 'Files' option which is available from the bar near the top of the window, just below the title (in my case I had to click the '>' at the right).

Solution 32 - Ios

Here's what finally fixed it for me (Xcode 11). Ran into this issue running Apple's sample project "CoreDataCloudKitDemo" (WWDC 2019 session 202).

I unchecked the "Mac" deployment option in the project's "General" settings, and kept "Automatically manage signing". Now that it was an iPhone/iPad app, the error went away and I could build.

I then re-checked the "Mac" option, and Xcode asked it it should do it's magic to manage entitlements, etc.; I agreed, and Xcode resolved all the issues, and I was able to build the Mac version.

Solution 33 - Ios

My solution solved the problem in just 2 steps and without losing data or need to uninstall app.

  1. Download the provisioning profile from the mac that did install the app previously (click on "I" icon, then drag the provisioning profile icon on the desktop)

click on

  1. copy the provisioning profile to new mac and open it in Xcode (double click).

Xcode on new mac will update provisioning, allowing installation on the device without any other action and without losing any saved data.

Solution 34 - Ios

You can try to delete the old app on the device and reinstall it since you dont always to change the bundle id or provisioning profiles

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRic SantosView Question on Stackoverflow
Solution 1 - IosJohn NesbittView Answer on Stackoverflow
Solution 2 - IosTom HarringtonView Answer on Stackoverflow
Solution 3 - Iosn.by.nView Answer on Stackoverflow
Solution 4 - IosDarrenView Answer on Stackoverflow
Solution 5 - IosDustinView Answer on Stackoverflow
Solution 6 - IosKunal GuptaView Answer on Stackoverflow
Solution 7 - IosKirit VaghelaView Answer on Stackoverflow
Solution 8 - IoswzzhuView Answer on Stackoverflow
Solution 9 - IosEssam FahmiView Answer on Stackoverflow
Solution 10 - IosstaticVoidManView Answer on Stackoverflow
Solution 11 - IosarinmorfView Answer on Stackoverflow
Solution 12 - IosF_BorisView Answer on Stackoverflow
Solution 13 - IosRawand SaeedView Answer on Stackoverflow
Solution 14 - IosoOEricView Answer on Stackoverflow
Solution 15 - IosPiotr FarbiszewskiView Answer on Stackoverflow
Solution 16 - IosIspas ClaudiuView Answer on Stackoverflow
Solution 17 - IosKelseyView Answer on Stackoverflow
Solution 18 - IoshoptownView Answer on Stackoverflow
Solution 19 - Iosuser1105951View Answer on Stackoverflow
Solution 20 - IosJuan Carlos Ospina GonzalezView Answer on Stackoverflow
Solution 21 - Iosuser3903523View Answer on Stackoverflow
Solution 22 - IosRonald HofmannView Answer on Stackoverflow
Solution 23 - IosgollumullogView Answer on Stackoverflow
Solution 24 - Iosuser6217789View Answer on Stackoverflow
Solution 25 - IosIrfanView Answer on Stackoverflow
Solution 26 - IosKeuhaView Answer on Stackoverflow
Solution 27 - IosAlyoshakView Answer on Stackoverflow
Solution 28 - IosNEOlineView Answer on Stackoverflow
Solution 29 - IosVishal ChaudhryView Answer on Stackoverflow
Solution 30 - IosmarviosView Answer on Stackoverflow
Solution 31 - IosSomaManView Answer on Stackoverflow
Solution 32 - IosTim NewtonView Answer on Stackoverflow
Solution 33 - Iospw2View Answer on Stackoverflow
Solution 34 - IosiosMentalistView Answer on Stackoverflow