Search code examples
iosin-app-purchaseapp-storecode-signingprovisioning-profile

Adding In-App Purchase Entitlement to iOS App Messes Up Code Signing


Pulling my hair out over this. I have an iOS app. If in-app purchase is turned off under Capabilities, everything works fine. I can archive the app and submit it to the app store with no problems. Code singing in build settings is this:

enter image description here

If I turn on in-app purchases in the capabilities, I get an error in Xcode when I try to archive the app:

No matching provisioning profiles found: None of the valid provisioning profiles allowed the specified capabilities: Features: inAppPurchase..

enter image description here

If I set my provisioning profile to my distribution profile and my identity to my distribution identity, the app successfully archives in Xcode, but gives an error when submitting to the store.

enter image description here

Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues.

No matching provisioning profiles found for "Applications/AppName.app..."

enter image description here

I've tried deleting my ID under preferences>account and adding it again. I created a new distribution profile and used that. Deleted my signing identities in keychain and reinstalled them. Nothing seems to work. Why would it work when in-app purchase is turned off then not when it is turned on?


Solution

  • Doh!!! I had somehow created a development profile that I thought was a distribution profile. I created a new distribution profile and now everything works.