无法调试/安装Watch App Extension

时间:2016-07-21 14:06:28

标签: cocoapods watchkit watch-os-2

我已经有这个问题很长一段时间了,而且无法解决这个问题。大约90%的时间,我的手表应用程序无法安装在设备上。该应用程序将显示安装大约80%完成,然后失败并退出,在

中提供此错误

iPhone调试日志控制台

<Error>: 0x4029b000 __106-[ACXCompanionSyncConnectioninstallWatchAppWithBundleID:withProvisioningProfileInfo:completionWithError:]_block_invoke_3: Failed to install app com.mea.AppName.watchkitapp : Error Domain=ACXErrorDomain Code=17 "Got error 17 in install done from remote side (MI error ApplicationVerificationFailed ; Extended 0xe8008017 ; Desc Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.))" UserInfo={FunctionName=-[ACXServerInstallOperation receivedDictionaryOrData:], SourceFileLine=524, NSLocalizedDescription=Got error 17 in install done from remote side (MI error ApplicationVerificationFailed ; Extended 0xe8008017 ; Desc Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.))}

观看调试日志控制台,抛出这些错误。

Verification stage failed
Jul 21 09:46:59 Andrews-AppleWatch appconduitd[104] <Error>: 0x1f084000 __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.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 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.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.), SourceFileLine=142}

由于我在手表扩展程序中使用的这些pod框架(显然已被修改)。

SecTrustEvaluate  [leaf IssuerCommonName SubjectCommonName]
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/Alamofire.framework/Alamofire
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/Realm.framework/Realm
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/RealmSwift.framework/RealmSwift
Jul 21 09:46:58 Andrews-AppleWatch installd[35] <Notice>: MIS: resource modified: /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex/Frameworks/SwiftyJSON.framework/SwiftyJSON

现在,我知道这与代码签名有关(对吗?),但如何更新或验证正确的代码签名呢?

我看到其他人在产品名称中包含非alpha /非数字符号也有类似的问题,但是,我的产品名称是AppNameWatch和AppNameWatch Extension。 Apple生成扩展文件,其中包含AppNameWatch和Extension之间的空格字符,因此我认为这很好,而不是问题的原因。

我还尝试清理/重建/清理构建文件夹并删除派生数据。

非常感谢任何帮助,谢谢。

修改/更新:

看起来这是与cocoapods相关的问题。将所有框架移动到Carthage后,应用程序正在安装并运行,没有与修改后的资源相关的错误。

1 个答案:

答案 0 :(得分:0)

在我通过CocoaPods更新项目以使用动态框架后,我遇到了同样的问题。我必须转到WatchKit扩展程序并将Embedded Content Contains Swift Code更改为Yes。现在,应用程序构建并安装正常。