Reputation: 221
I am trying to sign my iOS distribution package with distribution provisioning profile and certificate. The bundle can be created and signed with no error, however, when I try to install the package through command line I get the following error.
ERROR: Install failed. Got error "ApplicationVerificationFailed" with code 0xe8008015: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.FVZk62/extracted/Payload/MYAPP.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)
I can push the application to TestFlight and the app can be installed successfully, but it crashes immediately on Splash Screen with the same error message in the device log.
I have cross checked application's entitlements and entitlements in ItunesConnect and they completely match. Furthermore, I have validated the signature of my package based on this guide and looks fine.
I ran the following command and everything looks healthy.
codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' Payload/MYAPP.app
The output:
Payload/MYAPP.app: valid on disk.
Payload/MYAPP.app: satisfies its Designated Requirement.
Payload/MYAPP.app: explicit requirement satisfied.
Has anyone faced a similar problem or know what can be the possible root cause?
Upvotes: 3
Views: 24646
Reputation: 371
I am using Flutter, I tried these:
Upvotes: 0
Reputation: 1152
I had the same problem which was caused by an outdated certificate. Try to manually delete any outdated development certificates in the macos Keychain.
Simply uninstalling the app on the iPhone did not solve the problem.
Upvotes: 0
Reputation: 101
Try deleting the app from device, and reinstalling via Xcode. This worked for me!
Upvotes: 4
Reputation: 13619
A distribution provisioning profile cannot be used to install an app on a device directly. The distribution profile and certificate are used to sign the app for distribution through the App Store or Test Flight.
If you want to install the app directly on a device, you will need to use either an iOS Developer Profile and certificate, or if you have an Enterprise account, an In House profile with a developer certificate. Get a developer profile and certificate and build with those. Note that if you are using a development provisioning profile, you will have to make sure the device ID you are trying to install on is in the profile.
However, it appears you are trying to also distribute this through TestFlight. First, your command to validate the signature will not verify anything with the provisioning profile. It just verifies that the code signing was correct. Your error is related to the provisioning profile. I would take the .app, change the extension to .zip and unzip the package. Inside the unzipped folder, you should find and embedded.mobileprovision file. That is the provisioning profile that got bundled with the app when it was built. I would open up that file in Text Edit and check the values in the file to ensure they are correct (specifically things like the app ID).
Upvotes: 4