简体   繁体   中英

App installation failed due to application-identifier entitlement

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.

截图一

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.

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.

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.

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.

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.

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.

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

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

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.

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

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

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.

捆绑标识符更改

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.

卸载主要的 iPhone 应用程序、Watch 应用程序并重新构建它们可以解决问题。

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

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)

当我尝试在临时构建之上安装时发生了这种情况。

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 配置文件

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.

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 OK

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)

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

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.

我遇到这个问题是因为我在另一台机器上关闭了代码签名的情况下构建到手机上,因此您需要先从手机上卸载应用程序,然后再安装/构建到带有代码签名的手机上。

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

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.

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.

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.

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.

接受来自开发者网站和 iTunes Connect 网站的未决协议并在 X-Code 中重新打开项目为我解决了这个问题。

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.

使用 MacOS Catalina,您的 iPhone 将显示在 Finder 窗口的“位置”侧边栏中(只要您将 Finder 首选项设置为显示外部设备) - 然后您可以通过“文件”选项访问文件可从窗口顶部附近的栏中获得,就在标题下方(在我的情况下,我必须单击右侧的“>”)。

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.

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.

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)

单击“I”图标,然后在桌面上拖动配置文件图标

  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.

您可以尝试删除设备上的旧应用程序并重新安装它,因为您并不总是更改捆绑包 ID 或配置文件

在此处输入图像描述

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM