Codesign "unknown error" on Embedded Framework
My iOS enterprise signed app failed to install in device at times. The log from device console shows that the code signing for one of the embedded framework is the issue.
<Error>: 0x16e3eb000 __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.joar7U/extracted/Payload/MyApp.app/Frameworks/MyAppFramework.framework : 0xe8008001 (An unknown error has occurred.)"
UserInfo={LibMISErrorNumber=-402620415, 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.joar7U/extracted/Payload/MyApp.app/Frameworks/MyAppFramework.framework : 0xe8008001 (An unknown error has occurred.)}
This issues doesn't come all the time, but when this happens I notice that _codesignature folder inside ipa for the framework contains 4 files. (codeDirectory, codeResources, codeSignature and codeRequirements ). On a normal case I only see CodeResources,
I tried to validate via the code sign tool using "codesign -vvv" I get the code sign is valid. It tried clean before build but the issue occurs after that too.
Any help or pointer is much appreciated.