Resigning iOS App for AppStore

Until Xcode 9.2 I could upload my iOS App archives to the App Store (for review) without problems. Trouble started when I upgraded to Xcode 9.3. Currently I use Xcode 9.4. With these versions I get an error in the re-signing phase (automatically managed) in the Organizer when I try to upload an App archive to the AppStore for review. These are the two messages I get:


(1)

Automatic signing is unable to resolve an issue with the "emstory.app" target's entitlements.

Switch to manual signing and resolve the issue by downloading a matching provisioning profile from the developer website. Alternatively, to continue using automatic signing, remove these entitlements from your entitlements file and their associated functionality from your code. Then rebuild your archive and try again.


(2)

Provisioning profile failed qualification

Profile doesn't match the entitlements file's value for the application-identifier entitlement.



More details:

  • I use automatic code signing
  • I can sign for adhoc distribution without problems
  • With Xcode 9.3 / 9.4 I can re-sign and upload an App archive built with Xcode 9.2 without problems
  • I can build and upload my App with Xcode 9.2



I found related issues on e.g. StackOverflow but none of the recipes (e.g. switch on and off capabilities) worked.

Using Xcode 9.2 for uploading to the App Store is a temporary workaround but will not work forever. Could you please help me with the issue? Thanks a lot.




Solution:


The problem was the way I had implemented running multiple versions of the App (Debug, Adhoc, AppStore) on the same device using Xcode Configurations. My way worked until Xcode 9.2 but not in newer versions.


Old implementation:

In order to distinguish between Debug, Adhoc and AppStore version, I had added suffixes to the Bundle ID in the Info.plist.

The Product Bundle Identifier in the project file however was the same for all versions.


New implementation that works:

I use different versions (with suffix) of the Product Bundle Identifier in the project file and Info.plist just references that.

This article explains the concept.

Some of those are cascade errors, with just one as the likely most actionable.


How many of the suggestions here did you try so far?

https://stackoverflow.com/questions/43972982/automatic-signing-is-unable-to-resolve-an-issue-with-the-projectname-targets


I'd do low hanging fruit first, and see if toggling auto code signing off/on, followed by a clean build folder via the Product menu helped.

Resigning iOS App for AppStore
 
 
Q