App Install on device fails with Xcode 8

When using Xcode 8, we are unable to install our app on a non-connected device.


With Xcode 7, we can create a developer build archive, or a release build archive (for ad-hoc or enterprise distribution) and then create an IPA file which can be distributed via Fabric/Crashlytics, or iTunes to individual users.


When we use Xcode 8, the build, the codesign, the archive and export to IPA file work flawlessly and report no problems.


Then, when we attempt to install the app on a device, we get the following error as viewed on the device console log:

Oct 14 16:47:30 iPhone-6 installd[3591] <Error>: 0x16e12f000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.GEf0BN/extracted/Payload/MyBigApp.app/Frameworks/CAP.framework : 0xe8008019 (The application does not have a valid signature.)

Oct 14 16:47:30 iPhone-6 installd[3591] <Error>: 0x16e12f000 -[MIInstaller performInstallationWithError:]: Verification stage failed

Oct 14 16:47:31 iPhone-6 atc[3044] <Error>: 0x16e087000 __MobileInstallationInstallForLaunchServices_block_invoke222: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.GEf0BN/extracted/Payload/MyBigApp.app/Frameworks/CAP.framework : 0xe8008019 (The application does not have a valid signature.)" UserInfo={LibMISErrorNumber=-402620391, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=142, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], NSLocalizedDescription=Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.GEf0BN/extracted/Payload/MyBigApp.app/Frameworks/CAP.framework : 0xe8008019 (The application does not have a valid signature.)}


We have followed the codesign debugging steps which suggest codesign --verify, -dvvv, -vvv and -vvvv PATH, where PATH is the path to the .app or the specific .framework component, and the results are as expected (the app or framework is signed correctly)


  • valid on disk
  • satisfies its Designated Requirement
  • explicit requirement satisfied


We notice that with the exception of the Accellerate.framework the framework designated in the error message sorts alphabetically 1st. We've also rebuilt the framework and added it back into our project signed and unsigned by the framework team and it makes no difference. The builds go fine, and the installation fails.


The steps to repeat are straight forward.

  • Create an archive (developer or distribution)
  • export the app to an IPA file
  • install the IPA file on your iPhone

This last step fails every time when using Xcode 8, and it works just fine when using Xcode 7.


We have tested this both with automatic signing enabled and disabled.

We have tested this using our default configuration and provisioning profiles as well as setting specific code signing and profiles in the build settings tab.


We have even revoked and recreated our distribution certificates and provisioning profiles to see if there is an issue between those installed by Xcode 7 or Xcode 8. No differences were seen in the installation failures.


Of course, the exact sources are not the same between what we build in Xcode 7 and Xcode 8, but minimally the differences are those created by using the Xcode 8 migration feature to upgrade the project to Swift 2.3 from Swift 2.2.


Any help or tips on how to get past this would be appreciated. Right now, we can only distribute Xcode 8 builds by connecting a device to a development computer. This prohibits us from sending builds to our distributed testing team(s).

Hello reststopatintel,


Did you ever find a solution?

I am having this problem.


Thanks.

I'm experiencing the same thing. Deployed perfectly fine under Xcode 7.3 but now under 8.1 it won't deploy to a device even during development. The target shows "Provisioning Profile: Xcode Managed Profile" and clicking on the icon shows it is all still valid. I can archive and export the IPA and then download it from our Enterprise store and the app works fine. I just cannot deploy directly from Xcode 8.1

I'm experiencing the same issue since upgrading to Xcode 8. I have no permantent solution, but a temporary work-around is to clean the build folder (Hold the option key down and open the Product menu, then select "Clean Build Folder").


Unfortunately, it continues to happen on subsequent install attempts. It used to be somewhat rare, but now it happens on almost every install.

App Install on device fails with Xcode 8
 
 
Q