ADHOC 构建从 phone 中消失

ADHOC build disappears from phone

我已遵循所有与此相关的帖子中的建议。我无法安装我们构建的临时版本。这是我在尝试通过 iTunes 安装时从设备得到的错误。发生的事情是应用程序安装然后立即消失。

我已经四次检查了包标识符及其正确性。 我从头开始,重做了大约 4 次证书和配置文件。我已将它们从 iphone 和 mac 中全部删除并重新开始。

签名发生后似乎正在编辑或添加某些已签名的资源?

这是日志:

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.)

我注意到它说的是无效的配置文件,但我只是做了一个空的测试应用程序,它使用相同的证书和配置文件。

secTaskDiagnoseEntitlements MISSING keychain entitlements: no stored taskRef found

不确定这个错误是什么意思,但它可能是导致问题的原因?

编辑:

所以我 运行 这个命令来查看配置文件无效的原因,我明白了。

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

它returns这个

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

所以看起来所有 swift 框架都丢失了,但它们也被添加到 "frameworks/" 我手动打开 .app 文件并手动添加所有缺少的资源 运行再次输入密码,我明白了。

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

所以这似乎是问题所在,但我无法找到一种方法来在 ipa 构建时将这些文件复制到它。

编辑#2:

所以我想出了在手动移动它们之后如何使用框架对其进行签名的方法。但是现在我收到有关缺少权利的错误。

<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.)

我已经完成并确保在权利中启用了推送通知,它们确实是。

我不知道您是否执行此步骤,但您应该在安装应用程序的位置注册您的设备:

https://developer.apple.com/account/ios/device/

在此页面上,您需要设备的 UDID。在这里您可以获得有关如何获取设备的 UDID 的信息。

http://www.iclarified.com/52179/how-to-find-your-iphones-udid

希望对您有所帮助,

好的,事实证明这是 3 个原因造成的。

首先是最终包中缺少的框架。我能够通过存档然后打开包、添加框架和辞职来解决这个问题。

第二个问题是我的本地库绑定没有随项目一起移动。在构建期间手动移动它修复了这个(将在构建期间添加自定义命令)

第三个问题是有双重推送通知实体,一个在 info.plist 文件中,一个在 entitlements.plist 文件中。从构建设置中删除自定义权利文件修复了这个问题。