Hi everyone,
I'm attempting to export my library as a .framework to be used in iOS apps. When I link the framework into a test app (simple app, one view controller that does nothing) and attempt to install the app on a device it fails to install on the device saying "App installation failed. The application does not have a valid signature.". If I don't link the .framework it all installs fine.
After looking around at these and other forums (primarily StackOverflow), I found that looking at the device logs provides a little bit more information about the error. Device logs:
Dec 24 14:32:48 Indigos-iPhone installd[40] <Error>: 0x1005a4000 -[MICodeSigningVerifier performValidationWithError:]: 188: Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.pRDquy/extracted/LibraryTesting.app/Frameworks/Company.framework identifier = com.company.Company type = Framework> : 0xe8008019 (Application signature not valid)
Dec 24 14:32:48 Indigos-iPhone installd[40] <Error>: 0x1005a4000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Dec 24 14:32:48 Indigos-iPhone streaming_zip_conduit[256] <Error>: 0x100384000 __MobileInstallationInstallForLaunchServices_block_invoke240: Returned error Error Domain=MIInstallerErrorDomain Code=13 "Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.pRDquy/extracted/LibraryTesting.app/Frameworks/Company.framework identifier = com.company.Company type = Framework> : 0xe8008019 (Application signature not valid)" UserInfo=0x1255213d0 {LibMISErrorNumber=-402620391, LegacyErrorString=ApplicationVerificationFailed, SourceFileLine=188, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.pRDquy/extracted/LibraryTesting.app/Frameworks/Company.framework identifier = com.company.Company type = Framework> : 0xe8008019 (Application signature not valid)}
Dec 24 14:32:48 Indigos-iPhone streaming_zip_conduit[256] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
Dec 24 14:32:48 Indigos-iPhone streaming_zip_conduit[256] <Warning>: __dispatch_source_read_socket_block_invoke:203: Failed to install application at file:///var/mobile/Media/PublicStaging/LibraryTesting.app/ : Error Domain=LaunchServicesError Code=0 "The operation couldn’t be completed. (LaunchServicesError error 0.)" UserInfo=0x1255214e0 {Error=ApplicationVerificationFailed, ErrorDetail=-402620391, ErrorDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.pRDquy/extracted/LibraryTesting.app/Frameworks/Company.framework identifier = com.company.Company type = Framework> : 0xe8008019 (Application signature not valid)}All I get from those logs is that it is my framework (Company.framework) is causing the issue.
I have built the .framework by hand (as I use a build system that requires me to write the script to construct the .framework file). It's structure is:
Company.framework
Company.framework/_CodeSignature
Company.framework/_CodeSignature/CodeResources
Company.framework/Headers
Company.framework/Headers/Company.h
Company.framework/Headers/CompanyDelegate.h
Company.framework/Headers/CompanyView.h
Company.framework/Info.plist
Company.framework/Modules
Company.framework/Modules/module.modulemap
Company.framework/CompanyNote: I have tried having all of the contents in Versions/A and then symlinked through Versions/Current to the root of the .framework.
The only thing I think it could be is the Info.plist. But I have taken an Info.plist from a simple framework built by Xcode and then done minor changes (e.g. Name, package identifier) to make it applicable to my framework.
Any help would be greatly appreciated.
Cheers
Indigo