11

Previously with Xcode 7.3.1 I was able to build directly over my app store app on my iPad and test the upgrade scenario, which worked perfectly fine. This week I upgraded to Xcode 8 and when I try the exact same approach, I keep getting this upgrade error

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

enter image description here

I tried multiple solutions posted on this thread and none of them worked. I also don't have a watch app. Just a simple iOS app target.

App installation failed due to application-identifier entitlement

I deleted my certs and provisioning profiles and recreated them and still the same problem. I then went and downloaded Xcode 7.3.1 and tried it again with the exact same problem.

Now I am stuck without being able to fully test my upgrade scenario.

PLEASE HELP !!

Community
  • 1
  • 1
ArdenDev
  • 4,051
  • 5
  • 29
  • 50
  • I also used Xcode 8 and tried their 'automatic signing' , 'manual signing' process and I still get the same error – ArdenDev Sep 22 '16 at 06:16
  • If you run `codesign -d --entitlements :- path/to/AppName.app/AppName` on both the old and new apps. Do you get the same application-identifier in the output? Maybe the AppID has a prefix that is different from your team prefix. – Mats Sep 22 '16 at 06:21
  • @Mats, I compared the 'application identifier' with team prefix for the debug app and it matches with what's on iTunes Connect. I don't think we can get the entitlement for an app that's downloaded from the App Store directly from a device. – ArdenDev Sep 22 '16 at 15:12
  • You can download an app in iTunes on a computer and extract the application identifier from there. – Mats Sep 23 '16 at 06:45
  • Please see some answers from this [enter link description here](http://stackoverflow.com/questions/32677133/app-installation-failed-due-to-application-identifier-entitlement) – handiansom Apr 11 '17 at 02:32

8 Answers8

11

I had the same issue while trying to upgrade application. And here what I've found:

I checked application-identifier entitlements of old app and new app. You can do that by running codesign -d --entitlements :- path/to/AppName.app/AppName or open file "archived-expanded-entitlements.xcent" at path "AppName.app/AppName".

Application-identifier of old app was "1234XXX5X6.com.mycompany.myapp" but in new app it was "1234XXX5X6.com.mycompany.myapp.develop".

Usually I set "Bundle Identifier" directly in Info.plist.

Info.plist Bundle Identifier property

But I didn't know that there is also a "Product Bundle Identifier" property in project Build Settings.

Build Settings Product Bundle Identifier property

The previous version of app was built with Xcode 7.3.1 and it had following settings:

  • Info.plist: com.mycompany.myapp
  • Build Settings: com.mycompany.myapp.develop
  • application-identifier: 1234XXX5X6.com.mycompany.myapp

The new version was built with Xcode 8.2.1 and it had following settings:

  • Info.plist: com.mycompany.myapp
  • Build Settings: com.mycompany.myapp.develop
  • application-identifier: 1234XXX5X6.com.mycompany.myapp.develop

Seems like new Xcode have different source for application-identifier. So I just corrected "Product Bundle Identifier" and my problem was solved.

HammerSlavik
  • 161
  • 1
  • 5
6

Remove the existing application from the device and Run again.

Vineesh TP
  • 7,755
  • 12
  • 66
  • 130
  • Why peoples are down vote without mention the reason. – Vineesh TP Jul 25 '17 at 03:52
  • 7
    I guess that it's because the question is about "upgrade" – GreatWiz Aug 17 '17 at 14:10
  • We transferred ownership of an app from Company A to Company B (us). The development device still had a version from Company A installed. Deleting the Company A app from the device and building fixed the issue as expected. – Jon Mar 29 '18 at 21:28
  • try to remove exiting profile from the xcode prerefence and add the new company profile. Build clean and Build and run again – Vineesh TP Mar 30 '18 at 00:36
  • 1
    @Jon we are doing the same. Is this only an issue when installing from xCode during testing. Will public be able to upgrade ok when the update hits the App Store? – Darren Dec 05 '18 at 12:03
3

To fix this just enable "Automatic manage signing" from general tab of project settings.

I had also problem for running app on my device directly from xcode 8. Deleting and generation profile and certificate did not worked for me. But enabling "Automatic manage signing" worked for me.

Hope this helps!

Check this question of mine: Xcode 8 shows error that provisioning profile doesn't include signing certificate

Community
  • 1
  • 1
Satish Mavani
  • 4,897
  • 2
  • 20
  • 30
  • I've attached an image of the error I'm getting which is different from the error mentioned in your link. – ArdenDev Sep 22 '16 at 15:15
3

Here is one solution if you want to upgrade over your existing App Store app without deleting it but your application-identifier entitlement does not match. Upload an archive of your new build to the App Store and then use TestFlight to download it to your device. This is not as quick as building to the device, but it will overwrite your old app with your new build while keeping your old data in place. For (relatively) quicker turn-around testing of your upgrade process once you have a new build available on TestFlight:

  1. Delete your app off of your device (assuming it was a recent build)
  2. Download your app store build and generate some data
  3. Download your TestFlight build, but don't run it
  4. Build your newest build directly to the device

The TestFlight build overwrites the entitlement without deleting the old data, so Xcode happily will install your new build over the TestFlight build, but you are still testing your upgrade process as if you were building directly on top of the App Store version of your app.

Mark A. Durham
  • 844
  • 1
  • 6
  • 18
0

I got this from an .ipa generated as a Jenkins artefact. The problem for me was that Jenkins was using a different provisioning profile.

I manually set Jenkins to use the same profile as the updated version that I was trying to install, and it started working.

trusk
  • 1,634
  • 2
  • 18
  • 32
0

Select the App Target and click on General, if you select or ticked checkbox automatically manage signing.

Untick this automatically manage signing and select appropriate signing provisioning profile and #Build and run again.

See the below photo.

enter image description here

Parth
  • 634
  • 8
  • 15
0

Solved!! Short answer - delete old app from your iPhone I went to my iPhone storage and used the search bar to find the offending app(because it wasn’t showing on the app list) and found an old version hidden, deleted it and now it works.

Sean S
  • 1
0

What worked for me was to go (within Xcode) to Window > Devices and Simulators, then select my iOS device and delete the app there. This is detailed in this Medium article.

RonH
  • 504
  • 1
  • 3
  • 12