iosiphoneitunesad-hoc-distribution

ADHOC build disappears from phone


I've followed the suggestions from all the posts related to this. I cannot get an adhoc version of our build to install. This is the error I get from the device when attempting to install through itunes. What happens is the app installs then immediately disappears.

I have quadruple checked the bundle identifier and its correct. I have started from scratch and redone the certificates and provisioning profiles about 4 times. I have deleted them all from the iphone and the mac and started form scratch again.

It seems like some signed resource is being edited or added to the package after the signign occurs?

Here is the log:

Mar 13 15:17:43 JohnnyCs-iPod ondemandd[1093] <Error>: -[ODRBackgroundMaintenance startBackgroundMaintenanceOperations]
Mar 13 15:17:47 JohnnyCs-iPod installd[1090] <Notice>: 0x1f115000 -[MIClientConnection _doBackgroundInstallationForPath:withOptions:completion:]: Install of "/var/mobile/Media/PublicStaging/ugs_mobile_app.iOS.ipa" type Customer (LSInstallType = (null)) requested by atc (pid 35)**
Mar 13 15:17:47 JohnnyCs-iPod installd[1090] <Notice>: 0x1f115000 -[MIInstaller performInstallationWithError:]: Installing <MIInstallableBundle ID=com.flycowgames.ugsmobile; Version=1.0, ShortVersion=1.0>
Mar 13 15:17:47 JohnnyCs-iPod misagent[1063] <Notice>: MIS: attempt to install invalid profile: 0xe8008012
Mar 13 15:17:47 JohnnyCs-iPod installd[1090] <Error>: 0x1f115000 -[MIInstallableBundle _installEmbeddedProfileInBundle:]: Could not install embedded profile: 0xe8008012 (This provisioning profile cannot be installed on this device.)
Mar 13 15:17:47 JohnnyCs-iPod securityd[1055] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 13 15:17:47 JohnnyCs-iPod securityd[1055] <Error>:  secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found
Mar 13 15:17:47 JohnnyCs-iPod installd[1090] <Error>:  SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCore.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreGraphics.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreData.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftIntents.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftos.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftDarwin.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreImage.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftDispatch.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftFoundation.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreMedia.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftObjectiveC.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftQuartzCore.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftContacts.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: MIS: resource deleted: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftUIKit.dylib
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Error>: 0x1f115000 +[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:]: 142: Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app : 0xe8008017 (A signed resource has been added, modified, or deleted.)
Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Error>: 0x1f115000 -[MIInstaller performInstallationWithError:]: Verification stage failed
Mar 13 15:17:50 JohnnyCs-iPod atc[35] <Error>: 0x1f39f000 __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.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app : 0xe8008017 (A signed resource has been added, modified, or deleted.)" UserInfo={LibMISErrorNumber=-402620393, LegacyErrorString=ApplicationVerificationFailed, FunctionName=+[MICodeSigningVerifier _validateSignatureAndCopyInfoForURL:withOptions:error:], NSLocalizedDescription=Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.EZkRwi/extracted/Payload/ugs_mobile_app.iOS.app : 0xe8008017 (A signed resource has been added, modified, or deleted.), SourceFileLine=142}
Mar 13 15:17:50 JohnnyCs-iPod atc[35] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x15dbde20> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod itunesstored[96] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x167378e0> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod apsd[87] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x176a53e0> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod SpringBoard[48] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x17d251a0> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod iaptransportd[29] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x14d93490> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod passd[1114] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x17d702f0> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod BTServer[73] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x17535930> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod nsurlsessiond[108] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x1768b9b0> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod UserEventAgent[23] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x175b5e90> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod profiled[1060] <Error>: [appinstallation] LaunchServices observer: Apps Failed be installed: (
    "<LSApplicationProxy: 0x16571730> com.flycowgames.ugsmobile (Placeholder) <file:///private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F/com.flycowgames.ugsmobile.app>"
)
Mar 13 15:17:50 JohnnyCs-iPod lsd[79] <Warning>: LaunchServices: Unentitled vendor device identifier lookup for app com.flycowgames.ugsmobile by pid 35
 Mar 13 15:17:50 JohnnyCs-iPod installd[1090] <Notice>: 0x1f081000 -[MIClientConnection uninstallIdentifiers:withOptions:completion:]: Uninstall requested by atc (pid 35) for identifier com.flycowgames.ugsmobile with options: (null)
Mar 13 15:17:51 JohnnyCs-iPod installd[1090] <Notice>: 0x1f081000 -[MIUninstaller _uninstallBundleWithIdentifier:error:]: Uninstalling identifier com.flycowgames.ugsmobile
Mar 13 15:17:51 JohnnyCs-iPod installd[1090] <Notice>: 0x1f081000 -[MIUninstallNotifier performRemovalWithCompletionBlock:]: Destroying container with identifier com.flycowgames.ugsmobile at /private/var/containers/Bundle/Application/A51E6B3F-7B44-465F-9F12-63DDBE14E70F
Mar 13 15:17:51 JohnnyCs-iPod installd[1090] <Notice>: 0x1f081000 -[MIUninstallNotifier performRemovalWithCompletionBlock:]: Destroying container with identifier com.flycowgames.ugsmobile at /private/var/mobile/Containers/Data/Application/BE88138E-9124-466E-9C4F-A3EC138B5A88


MIS: attempt to install invalid profile: 0xe8008012

Could not install embedded profile: 0xe8008012 (This provisioning profile cannot be installed on this device.)

I noticed it is saying invalid provisioning profile But I just did an empty test app and it works with the same cert and provisioning profile.

secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found

Not sure what this error means but it could be causing the issue?

EDIT:

So I ran this command to see the reason why the profile is invalid and I get this.

codesign --verify --verbose - ugs_mobile_app.IOS.app

and it returns this

Dereks-iMac:Release derek$ codesign --verify --verbose ugs_mobile_app.iOS.app
ugs_mobile_app.iOS.app: a sealed resource is missing or invalid
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreGraphics.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftFoundation.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftDispatch.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftObjectiveC.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftDarwin.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftos.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCore.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreData.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftContacts.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftIntents.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreImage.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftQuartzCore.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftCoreMedia.dylib
file missing: /Users/derek/ugs-mobile-app/ugs-mobile-app/ugs_mobile_app.iOS/bin/iPhone/Release/ugs_mobile_app.iOS.app/SwiftFrameworksSimulator/libswiftUIKit.dylib

So it looks like all the swift frameworks are missing but they also get added in "frameworks/" I manually opened the .app file and added all the missing resources manually and ran the code again and I got this.

ugs_mobile_app.iOS.app: valid on disk
ugs_mobile_app.iOS.app: satisfies its Designated Requirement

So it seems this is the issue, but I cant find a way to get these files to be copied over to the ipa when it gets built.

Edit #2:

So I've figured out how to sign it with the frameworks after moving them over manually. But now I get an error about missing entitilements.

<Notice>: entitlement '<private>' has value not permitted by provisioning profile '<private>'
 Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.qNoMzx/extracted/Payload/ugs_mobile_app.iOS.app : 0xe8008016 (The executable was signed with invalid entitlements.)

I've gone through and made sure the push notifications were enabled in the entitlements and they are.


Solution

  • Okay so it turns out that it was 3 things causing this.

    The first was the missing frameworks in the final package. I was able to solve this by archiving and then opening the package, adding the frameworks and resigning.

    The second issue was my native library bindings wasn't being moved over with the project. Manually moving this over during the build fixed this( going to add a custom command during build)

    The third issue was there was double push notification entititlments one in the info.plist file and one inside of the entitlements.plist file. deleting the custom entitlements file from the build settings fixed this.