App installation failed due to application-identifier entitlement
Asked Answered
H

37

346

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.

Housen answered 20/9, 2015 at 7:58 Comment(5)
Were you able to find the fix?Sophist
Yes, the answer from @john-nesbitt did the trickHousen
As to 'why' it happens (might be helpful to list), in my case, on developer account change. Was installed on account A and was trying to run after changing to account B. (I do not have entitlement file in the project).Calipash
Check out the second answer first, it is more comprehensive and won't result in data loss.Tantalum
A given app has an an app name + bundleId. If you use the same app name, but with a different bundle id, then you'd get this error. That's how I got it! Luckily the solution is simple. Either use the old bundleId. Or delete the old app, so the new app name + bundle-id can work together. As for why it can't just re-install, with old app name-new bundleId, I suppose the entitlements are stored elsewhere and you need to somehow have that entitlement removed from the device. Only then you can install the app with a different bundleIdLicking
D
865

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.

Discombobulate answered 25/9, 2015 at 18:5 Comment(14)
That will erase the app and all it's content. I need to upgrade and not loose all my data in the process if possible.Lianne
Didn't solve for me. I'm stuck even turning off App Groups, deleting entitlements, cleaning and cleaning build folder. Also removed the app and rebooted Apple Watch...Debbi
So you deleted the appPersonage
My app wasn't displayed in the Windows->Devices list, but I deleted it from the phone (by pressing and holding on the icon) which fixed the problem. Thanks John.Awlwort
I want to test app migration to the new version, and I can't do that if I delete existing app (AppStore version) from the device.Bookseller
Sure that works, but in my case the problem is, that I have to do this every time a different person form the team uses the same device, which is annoying, so deletion isn't a good solution!Musky
For some reason the app wasn't listed for me. Deleting the app directly on the phone worked though.Valladares
That works. Good.State data for the app was also deleted. Bad.Guanine
check this, if don't want to lost the app data : https://mcmap.net/q/93043/-app-installation-failed-due-to-application-identifier-entitlementStar
Just change Bundle identifier. This is works for me.Romain
@Romain Change Bundle identifier? Change it to what, exactly?Gettogether
For me the app wasn't on the phone, it's a new phone and I last touched the sample app in question nearly 12 months ago, and nothing came up when searching the phone. However, it was in the Installed Apps list, and deleting it there as described fixed the issue for me! Quite bizarre.Rebeca
I had to remove the testflight appWorl
In my case I was having trouble with imessage app and this was only option to delete it and reinstall it.Preliminary
R
115

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.

Raphael answered 10/8, 2016 at 17:22 Comment(8)
This works particularly well when using the "automatic provisioning" feature in Xcode 8.Faires
I truly wish that I had read this before using the answer. Then the state data would have been preserved. (See my comment above).Guanine
This should be the selected answer.Penhall
100% the right answer IF YOU DON'T WANT TO LOSE YOUR DATA. Should be accepted answer.Tantalum
I have same scenario but my useful data is in Userdefaults Can we recover that anyway? Help is appreciatedKunzite
Unfortunately you still lose keychain items with this method.Goatskin
This is the correct answer!!! Thanks!!! I avoided to loose about 4 years of data!!!Decarbonize
OMG, thank you! I almost deleted 7 years of data! Actually i think i have a backup from a year ago but still! Do NOT do John Nesbitt's answer without reading the fine print. Better yet, just do Tom Harrington's.Remindful
M
32

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.

Milson answered 21/11, 2016 at 20:18 Comment(2)
My wildcarded profile that I used for development expired and I mistakenly created an app-specific one. After reading your post, I created a new wildcarded profile and used it. Worked like a charm. Yours is the most accurate post and should be the accepted answer. Deleting the app and losing the data is not a good option for many of us. Thanks!Remindful
previous-application-identifiers is not needed anymore. Debug builds won't install, but production builds through Testflight will update automagically. I contacted Apple about this identifier and they were clueless about this old mechanism.Austin
M
31

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.

Massproduce answered 19/11, 2015 at 13:30 Comment(0)
N
18

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.

Nealy answered 26/1, 2016 at 14:48 Comment(1)
I at first tried deleting and reinstalling the app. Didn't work. Then I scrolled down and saw this answer. The build was failing with this error only for automated UItests but not for the regular build, and it turns out the right provisioning profile was selected for the regular build but not the automated UItests build. So, updating that fixed the problem..Tousle
D
6

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...

Dekameter answered 13/4, 2016 at 5:34 Comment(1)
Yes! If the app is offloaded then you must remove it by hand - won't find it in Xcode.Disbelieve
T
5

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.

Taffy answered 21/9, 2020 at 19:57 Comment(0)
S
4

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
Star answered 21/4, 2017 at 7:12 Comment(1)
Container steps are not necessary but nice if you wish to maintain the data. Thank you.Rechabite
L
3

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.

Limonite answered 5/8, 2017 at 4:6 Comment(0)
M
2

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

Megaphone answered 28/9, 2015 at 11:27 Comment(1)
yes, delete the installed app in your device and re-run from Xcode. I had this problem because I added a target in Xcode.Vestige
T
2

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).

Tolley answered 3/12, 2015 at 16:58 Comment(1)
You just need to make sure you are using the same Provisioning profile you originally built the app with.Astronomical
G
2

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

Glutinous answered 21/12, 2015 at 10:51 Comment(2)
This doesn't work if you would like to test an app update.Liard
By changing the bundle ID, you've effectively created a brand new app.Faires
S
2

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

Shlomo answered 10/1, 2017 at 21:38 Comment(0)
O
2

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.

Oldfangled answered 26/2, 2017 at 14:22 Comment(0)
T
2

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.

Trioxide answered 13/12, 2018 at 8:19 Comment(0)
R
1

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."

Rate answered 1/11, 2015 at 5:55 Comment(1)
I also had to restore the watch to factory defaults. Had tried all the other relevant suggestions, but to no avail. Had also regenerated all the provisioning profiles to make sure they were consistent with the entitlements. My situation was just as described here: Had an existing WatchOS 1 app, that I was trying to update to WatchOS 2.Algar
A
1

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)

Adipocere answered 8/12, 2016 at 11:21 Comment(0)
M
1

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

Miamiami answered 16/10, 2018 at 15:41 Comment(0)
B
1

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)

Baden answered 3/12, 2018 at 15:33 Comment(0)
L
1

A given app has an an app name + bundleId. If you use the same app name, but with a different bundle id, then you'd get this error. That's how I got it!

Luckily the solution is simple. Either:

  • use the old bundleId.
  • delete the old app, so the new app name + bundle-id can work together.

As for why it can't just re-install, with old app name-new bundleId, I suppose the entitlements are stored elsewhere and you need to somehow have that entitlement removed from the device. Only then you can install the app with a different bundleId

Licking answered 31/1, 2023 at 20:3 Comment(0)
D
0

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

Debbi answered 9/10, 2015 at 20:26 Comment(0)
G
0

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

Gaiseric answered 27/10, 2015 at 6:30 Comment(0)
G
0

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.

Gallows answered 25/12, 2015 at 1:40 Comment(0)
E
0

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.

Entellus answered 15/1, 2016 at 21:12 Comment(0)
L
0

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.

Lindi answered 17/11, 2016 at 6:19 Comment(0)
W
0

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.

Wuhu answered 24/5, 2017 at 10:2 Comment(0)
C
0

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.

Caudle answered 7/6, 2017 at 23:26 Comment(0)
C
0

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.

Capers answered 6/3, 2018 at 14:36 Comment(0)
P
0

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

Plurality answered 20/5, 2018 at 16:10 Comment(0)
R
0

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.

Raspy answered 23/9, 2019 at 8:35 Comment(0)
V
0

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).

Vintner answered 21/10, 2019 at 13:59 Comment(0)
S
0

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.

Shiau answered 13/11, 2019 at 17:55 Comment(0)
S
0

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 "I" icon, then drag the provisioning profile icon on the desktop

  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.

Skunk answered 11/3, 2021 at 8:28 Comment(0)
R
0

In my case first I was using two different teams.

The build in the device was built using Team A(Signing & Capabilities) and I was trying to reinstall the build using Team B without deleting the previous build. Changing back to Team A solved the issue for me.

Residuum answered 20/9, 2022 at 7:27 Comment(0)
C
-1

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

Curmudgeon answered 18/4, 2016 at 2:57 Comment(0)
A
-1

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

Aliment answered 29/11, 2021 at 13:48 Comment(0)
A
-1

enter image description here

Change the build number & version and if there is previous application installed in the device make sure you delete all installed apps in the real device through

open xcode -> window -> devices

Analemma answered 4/9, 2022 at 8:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.