xcode 临时配置文件问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26024498/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Ad Hoc profile issue
提问by
I have this error, is anyone know what is the problem? I check and I have Entitlements key in both adHoc and main provisioning profile but I do not know why I have this error
我有这个错误,有人知道是什么问题吗?我检查并在 adHoc 和主配置文件中都有 Entitlements 键,但我不知道为什么会出现此错误
DTFetchSymbols[512] <Notice>:
/System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv7s
DTFetchSymbols[512] <Notice>: kCommand_ListFilesPlist
syslog_relay[377] <Notice>: syslog_relay found the ASL prompt. Starting...
profiled[84] <Notice>: (Note ) MC: Provisioning profiles changed
mobile_installation_proxy[375] <Warning>: LaunchServices: Please include the
kCFBundleIdentifierKey in the options dictionary when installing an app.
mobile_installation_proxy[375] <Warning>: LaunchServices: installing app with unknown
bundleID
installd[384] <Notice>: 0x603000 -[MIClientConnection
_doBackgroundInstallationForPath:withOptions:completion:]: Install of
"/var/mobile/Media/PublicStaging/Test.ipa" type Customer requested by
mobile_installation_proxy (pid 375)
installd[384] <Notice>: 0x603000 -[MIInstaller performInstallationWithError:]:
Installing <MIInstallableBundle ID=test.testTest.Test; Version=3, ShortVersion=3.1.2>
misagent[378] <Error>: attempt to install invalid profile: 0xe8008012
installd[384] <Error>: 0x603000 -[MIInstallableBundle
_installEmbeddedProfileInBundle:]: Could not install embedded profile: 0xe8008012
(Unsupported device)
installd[384] <Error>: SecTrustEvaluate [leaf CriticalExtensions IssuerCommonName]
installd[384] <Error>: entitlement 'beta-reports-active' has value not permitted by
provisioning profile 'test TEST AdHoc 2015'
installd[384] <Error>: 0x603000 -[MICodeSigningVerifier performValidationWithError:]:
186: Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.asUxKy/extracted/Payload/Test.app identifier = test.Test.testTest type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)
installd[384] <Error>: 0x603000 -[MIInstaller performInstallationWithError:]:
Verification stage failed
mobile_installation_proxy[375] <Error>: 0x603000
__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.asUxKy/extracted/Payload/Test.app identifier = test.Test.testTest type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)" UserInfo=0x17566950 {LibMISErrorNumber=-402620394, LegacyErrorString=ApplicationVerificationFailed, FunctionName=-[MICodeSigningVerifier performValidationWithError:], NSLocalizedDescription=Failed to verify code signature of <MIExecutableBundle : path =
/private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.asUxKy/extracted/ Payload/Test.app identifier = test.Test.testTest type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile), SourceFileLine=186}
mobile_installation_proxy[375] <Warning>: ERROR: MobileInstallationInstallForLaunchServices returned nil
mobile_installation_proxy[375] <Error>: 0x581000 handle_install: Installation failed: Error Domain=LaunchServicesError Code=0 "The operation couldn't be completed. (LaunchServicesError error 0.)" UserInfo=0x17566a30 {Error=ApplicationVerificationFailed, ErrorDetail=-402620394, ErrorDescription=Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.asUxKy/extracted/Payload/Test.app identifier = test.Test.testTest type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)}
Thanks in advance!
提前致谢!
回答by clauswey
For me beta-reports-active was the issue: https://developer.apple.com/library/ios/qa/qa1830/_index.html
对我来说 beta-reports-active 是问题所在:https: //developer.apple.com/library/ios/qa/qa1830/_index.html
I have two Xcode archives that I can export for ad-hoc distribution. AFAIK they are based on the same code and created the same way (Xcode>Product>Archive). During the export wizard one archive shows me "beta-reports-active" under entitlements the other doesn't. I get the same error message as the OP when trying to install the ipas with the "beta-reports-active" entitlement. I did recreate the provisioning profile and reinstalled the appstore distribution profile as well before archiving again which produced the archive without the "beta-reports-active" entitlement, but i'm not sure if that was the cause.
我有两个 Xcode 档案,我可以导出它们以进行临时分发。AFAIK 它们基于相同的代码并以相同的方式创建(Xcode>Product>Archive)。在导出向导期间,一个档案在权利下向我显示“beta-reports-active”,而另一个则没有。尝试安装具有“beta-reports-active”权利的 ipa 时,我收到与 OP 相同的错误消息。在再次存档之前,我确实重新创建了配置文件并重新安装了 appstore 分发配置文件,这产生了没有“beta-reports-active”权利的存档,但我不确定这是否是原因。
回答by Yevhen Dubinin
For me, this started to happen since Xcode 7.
对我来说,这从 Xcode 7 开始就发生了。
I used to make AdHoc .ipa for over-the-air distribution via
我曾经制作 AdHoc .ipa 以通过无线方式分发
xcodebuild -exportArchive -archivePath "/path/to/My App 9-24-15, 21.21.xcarchive" -exportPath /path/to/MyApp_AdHoc.ipa -exportFormat ipa -exportProvisioningProfile "MyApp Ad Hoc Distribution Profile"
(the .xcarchive
made by Xcode)
(.xcarchive
由 Xcode 制作)
Steps, how I fixed this:
步骤,我是如何解决这个问题的:
- No longer using
xcodebuild
, but instead let Xcode do the .ipa for me via "Export..." command in the Organizer - Set up Xcode to automatically manage my provisioning profiles
- From the doc above I made one exception: in target's Build Settingsunder Code Signing IdentifyI do specify iOS Developerfor Debug builds and iOS Distributionfor Release builds
- Close Xcode
Refresh an App Store Provision Profileas described in The beta-reports-active Entitlement Technical Q&A, BUT before downloading the Provision Profile via Xcode (Step 9) I have removed it from here
~/Library/MobileDevice/Provisioning Profiles
Remove DerivedData folder
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Remove Xcode Cache (just in case)
sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode
- Launch Xcode again
- Download the App Store Provision Profilevia Preferences...-> Accounts
- Achieve
- Make sure when I "Export..." via Xcode there is NO
beta-reports-active
key under app's Entitlements (if you have one - that won't work for AdHoc builds)
- 不再使用
xcodebuild
,而是让 Xcode 通过管理器中的“导出...”命令为我执行 .ipa - 设置 Xcode 以自动管理我的配置文件
- 从上面的文档中,我做了一个例外:在代码签名标识下的目标构建设置中,我确实为调试构建指定了iOS 开发人员,为发布构建指定了iOS 分发
- 关闭 Xcode
如The beta-reports-active Entitlement Technical Q&A 中所述刷新App Store Provision Profile,但在通过 Xcode 下载 Provision Profile 之前(第 9 步)我已将其从此处删除
~/Library/MobileDevice/Provisioning Profiles
删除 DerivedData 文件夹
rm -rf ~/Library/Developer/Xcode/DerivedData/*
删除 Xcode 缓存(以防万一)
sudo rm -rf ~/Library/Caches/com.apple.dt.Xcode
- 再次启动Xcode
- 通过Preferences...-> Accounts下载App Store Provision Profile
- 达到
- 确保当我通过 Xcode“导出...”时
beta-reports-active
,应用程序的权利下没有密钥(如果你有一个 - 这不适用于 AdHoc 构建)
回答by Ocemagnuf Nimda
This started happening after upgrading from XCode 6 to 8, and what resolved the problem was adding the following:
这在从 XCode 6 升级到 8 后开始发生,解决问题的是添加以下内容:
-exportProvisioningProfile "MyApp Ad Hoc Distribution Profile"
-exportProvisioningProfile "MyApp Ad Hoc Distribution Profile"
to my xcodebuild -exportArchive command line.
到我的 xcodebuild -exportArchive 命令行。
回答by odyth
Not sure if this will help you, but what I did that solved it was I deleted my provisioning profile for the app. I then recreated it in the developer portal. Next I took the build I had just made and had XCode export it (Organizer > Export > Save for Ad Hoc Deployment), verified it was using the provisioning profile I just made and then uploaded that to testflight and I was able to install it on my phone. I am using an iPhone 6 running ios 8.0.
不确定这是否对您有帮助,但我所做的解决了我删除了该应用程序的配置文件的问题。然后我在开发人员门户中重新创建了它。接下来,我使用刚刚制作的构建并让 XCode 将其导出(Organizer > Export > Save for Ad Hoc Deployment),验证它是否使用了我刚刚制作的配置文件,然后将其上传到 testflight 并且我能够将其安装在我的手机。我正在使用运行 ios 8.0 的 iPhone 6。
回答by ehrpaulhardt
This error can occur if you build and sign your IPA from command line (CI System like Jenkins) and need to embed a mobile provisioning profile to use Apple Push Notifications:
如果您从命令行(如 Jenkins 的 CI 系统)构建和签署您的 IPA 并且需要嵌入移动配置文件以使用 Apple 推送通知,则可能会发生此错误:
xcrun [...] --sign "<<CERTIFICATE NAME>>" --embed "<</path/to/mobileprovision>>"
xcrun [...] --sign "<<CERTIFICATE NAME>>" --embed "<</path/to/mobileprovision>>"
In that case the mobile provisioning profile you are trying to embed is not the same you use in xcode.
在这种情况下,您尝试嵌入的移动配置文件与您在 xcode 中使用的不同。
The code example you provided also shows the 'beta-reports-active'
entitlement that indicates you are using a beta version. If you look here on StackOverflow you will find a lot of posts with solutions about that particular issue.
您提供的代码示例还显示了'beta-reports-active'
表明您使用的是测试版的权利。如果您在 StackOverflow 上查看这里,您会发现很多关于该特定问题的解决方案的帖子。