Code Signing
ITMS-90164
ITMS-90046
iOS Development
App Store Error

ERROR ITMS-90164/90046 Invalid Code Signing Entitlements

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

When developing iOS applications, developers often encounter various errors and challenges during the submission of their app to the App Store. One such common issue is the `ERROR ITMS-90164/90046`, which pertains to "Invalid Code Signing Entitlements." Understanding these errors, their implications, and methods to resolve them is crucial for a smooth app submission process.

Understanding Code Signing and Entitlements

Code signing is a security mechanism that ensures that only trusted applications are installed and run on Apple devices. It involves using a digital signature that verifies the start-up integrity of an app. Entitlements are special permissions within an app that define how the app interacts with iOS features, hardware, or data.

When submitting an app to the App Store, Apple performs stringent checks to ensure the app's code signing entitlements are valid and secure.

Nature of ERROR ITMS-90164/90046

The `ERROR ITMS-90164/90046` indicates a problem with the app's code signing entitlements:

  • ITMS-90164: This error often occurs when the app's code signing entitlements differ between different binary files or when the entitlements file is improperly configured.
  • ITMS-90046: This is a generic error that relates to imported entitlements in the code signing process, which do not match those specified as part of the provisioning profile.

These errors imply that there is a mismatch or invalid setting in the app's `Info.plist` file, its provisioning profile, or entitlements file, causing problems with the app submission process.

Key Causes and Solutions

Understanding the root causes and resolutions of these errors can streamline your workflow when preparing an app for submission.

CauseDescriptionSolution
Incorrect Entitlement KeysMismatched or improperly formatted keys in the entitlements file.Verify the entitlements file for any unrecognized keys. Align keys with the provisioning profile's capabilities.
Provisioning Profile MismatchThe provisioning profile does not match the app ID or entitlements.Ensure that the correct provisioning profile is selected for the build configuration. Update or regenerate profiles if necessary.
Hardcoded Entitlement ValuesHardcoded values that aren't universally applicable or are invalid for current distribution settings.Use Xcode's target settings to configure entitlements dynamically according to the build scheme.
Incorrect Team IdentifierA mismatched team identifier in the entitlements compared to the provisioning profile.Confirm that the Team Identifier in the entitlements matches the one in your provisioning profile. Update where discrepancies are found.
Keychain Sharing IssuesUsing keychain sharing without enabling it properly in the app's capabilities.If keychain sharing is used, ensure it's listed in Xcode's Capabilities and mentioned in the entitlements file.
Migrating from Manual to Automatic SigningErrors arise when switching from manual to automatic code signing, leading to misconfigurations.Clean the build folder, and reset to automatic signing to let Xcode manage profiles, ensuring no legacy settings conflict with new configurations.

Detailed Examination of Solutions

  1. Inspect Entitlements File: Open the `.entitlements` file in your project and cross-reference all the keys with the capabilities you intended to enable. Remove or correct any unintended entries.
  2. Provisioning Profile Alignment: Navigate to your Apple Developer account and verify that the profiles are accurately configured with the app ID and targeted devices. If discrepancies are found, regenerate the profiles.
  3. Configuration in Xcode:
    • In the `[YourTarget] > Build Settings`, ensure that the `Code Signing Identity` and `Provisioning Profile` are set correctly.
    • Under `[YourTarget] > Capabilities`, toggle any required capabilities, prompting Xcode to modify entitlements appropriately.
  4. Using Automatic Signing:
    • In Xcode, go to `[YourTarget] > General` and check `Automatically manage signing`. Ensure Xcode can access and automatically apply the correct settings based on your developer account.

Conclusion

Dealing with `ERROR ITMS-90164/90046: Invalid Code Signing Entitlements` involves ensuring that your app's entitlements and provisioning profile are meticulously aligned and valid. This error predominantly arises due to misaligned entitlements and provisioning mismatches, which can be efficiently resolved through meticulous verification and configuration within Xcode and Apple's Developer Portal.

Comprehending these issues and their resolutions will result in a more streamlined, error-free app submission process, ultimately contributing to a successful presence on the App Store.


Related reading
Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

Interview Questions practice on Codemia

Over 8,000 real interview questions from top companies, searchable by company and role.

Browse interview questions

All Rights Reserved.