iOS App Provisioning is, as most will probably agree, among the most confusing and complicated subjects an iOS developer has to deal with and I'm one of them. :-)
One of our teams needs to start beta testing their app. It's a corporate app that will eventually be released in our company's app catalogue (InTune) for use with a few thousand colleagues. As far as I've seen Inhouse distribution is for this exact purpose: Deploy to a limited number of invited non-developer testers but without having to harvest their UDIDs. For this purpose I have set up:
- An Inhouse provisioning profile, based on the exact same AppId as the team's development profile.
- Set up an AppCenter beta test group and invited some colleagues as testers.
- Added a "publish to AppCenter" step in the project's build definition that deploys the .IPA file to the mentioned test group in AppCenter.
When the build runs all works fine and the app gets deployed to the test group as intended. Each tester is allowed to install the app and all looks good. But when they try to install the app they get a very non-descriptive error message saying the "the app cannot be installed".
I have checked the device log and found an error message: "The executable was signed with invalid entitlements."
I have also re-created the failed deployment from Visual Studio (Mac) by downloading the Inhouse provisioning profile (+ signing certifictate) and re-target the build/deployment to "In-house". For good measure I also selected the In-house profile manually.
When I build and deploy to a simulator all works fine but when I deploy to a physical device I get this error in Visual Studio (Mac):
ApplicationVerificationFailed: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.zveLv9/extracted/{name-of-app}.app : 0xe8008016 (The executable was signed with invalid entitlements.)
error MT1006: Could not install the application '{path-to-app}.app' on the device '{my-device-name}': Your code signing/provisioning profiles are not correctly configured. Probably you have an entitlement not supported by your current provisioning profile, or your device is not part of the current provisioning profile. Please check the iOS Device Log for details (error: 0xe8008016).
My understanding is that entitlements are enabled with the AppId and requested with the entitlemens in code (via the Entitlements.plist file). This leads med to assume that two profiles referencing the same AppId would also enabled the same Entitlements. Is this incorrect? Obviously, I am requesting the same entitlements from code as I'm compiling the exact same branch using the two different provisioning profiles.
I suspect I have misunderstood or overlooked something ...