ios – 升级到xcode 9后,将无法构建cordova应用程序,错误70,需要配置文件

ios – 升级到xcode 9后,将无法构建cordova应用程序,错误70,需要配置文件,第1张

概述昨天我们从 xcode 8.3.2升级到版本9.现在我们的企业分发apache cordova ios app拒绝构建. 2017-09-21 07:37:16.787 xcodebuild[70400:217569] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundl 昨天我们从 xcode 8.3.2升级到版本9.现在我们的企业分发apache cordova ios app拒绝构建.

2017-09-21 07:37:16.787 xcodebuild[70400:217569] [MT] IDEdistribution: -[IDEdistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/wj/yj3cfvh954gbc_btlhcrcx7nk7t4dj/T/App name_2017-09-21_07-37-16.786.xcdistributionlogs'.2017-09-21 07:37:16.938 xcodebuild[70400:217569] [MT] IDEdistribution: Step Failed: <IDEdistributionSigningAssetsstep: 0x7ff756bbdf70>: Error Domain=IDEdistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets Failed." UserInfo={NSLocalizedDescription=Locating signing assets Failed.,IDEdistributionSigningAssetStepUnderlyingErrors=(    "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"App name.app\" requires a provisioning profile.\" UserInfo={NSLocalizedDescription=\"App name.app\" requires a provisioning profile.,NSLocalizedRecoverySuggestion=Add a profile to the \"provisioningProfiles\" dictionary in your Export Options property List.}")}error: exportArchive: "App name.app" requires a provisioning profile.Error Domain=IDEProvisioningErrorDomain Code=9 ""App name.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="App name.app" requires a provisioning profile.,NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property List.}** EXPORT Failed **Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,App name.xcarchive,-exportoptionsplist,/Users/Shared/Workspace/github/Appname/platforms/ios/exportoptions.pList,-exportPath,/Users/Shared/Workspace/github/Appname/platforms/ios/build/device

(我为这个问题用“App name”替换了应用名称)

我已经验证所有证书和配置文件都是在xcode中设置的.并且build.Json已设置.我不是一个真正的Mac家伙,我很难接下来做什么.

-Edit,将xcode降级到8.3.3解决了这个问题.不是一个理想的解决方案,但我能做的并不多.

解决方法 如果您明确指定配置文件,就像我一样.在您的Cordova build.Json中就像这样:

"ios": {    "deBUG": {        "codeSignIDentitiy": "iPhone Developer","developmentTeam":"MYTEAMID","packageType": "developer","iCloudContainerEnvironment": "Development"    },"release": {        "codeSignIDentitiy": "iPhone distribution","provisioningProfile": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","packageType": "ad-hoc","iCloudContainerEnvironment": "Production"    }}

请注意
iCloudContainerEnvironment =只有在使用推送通知时才需要生产/开发

您需要显式设置手动签名,并在Cordova生成的Exportoptions.pList中提供配置密钥.不幸的是,Cordova目前没有生成所有必需的密钥.

这是它需要的样子,至少对我而言:

<?xml version="1.0" enCoding="UTF-8"?><!DOCTYPE pList PUBliC "-//Apple//DTD PList 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><pList version="1.0"><dict>  <key>compileBitcode</key>  <false/>  <key>method</key>  <string>ad-hoc</string>  <key>iCloudContainerEnvironment</key >  <string>Production</string>  <key>provisioningProfiles</key>  <dict>    <key>my.bundle.IDenifIEr</key>    <string>My Provisioning Profile name</string>  </dict>  <key>signingCertificate</key>  <string>iPhone distribution</string>  <key>signingStyle</key>  <string>manual</string>  <key>stripSwiftSymbols</key>  <true/>  <key>teamID</key>  <string>YOURTEAMID</string>  <key>thinning</key>  <string>&lt;none&gt;</string></dict></pList>

Cordova生成的文件@ cordova / app / platforms / ios / exportoptions.pList如下所示:

<?xml version="1.0" enCoding="UTF-8"?><!DOCTYPE pList PUBliC "-//Apple//DTD PList 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><pList version="1.0">  <dict>    <key>compileBitcode</key>    <false/>    <key>method</key>    <string>development</string>    <key>teamID</key>    <string>MYTEAMID</string>  </dict></pList>

注意它缺少Xcode 9所需的重要位.

我通过手动归档构建生成了正确的文件,然后导出它也创建了我现在用作引用的exportoptions.pList.

在深入挖掘之后,我发现在运行“Cordova add platform iOS”之后无法解决这个问题,因为它是在构建阶段动态生成的.我决定分叉Cordova-ios repo并提交拉取请求.您可以直接使用我的fork,或者等到pull请求合并.

拉请求
https://github.com/apache/cordova-ios/pull/338/commits

叉子
https://github.com/jrryhrtn/cordova-ios

来自pull请求的使用说明

请参阅下面的示例,请注意,配置文件可以是配置文件的名称或UUID.名称是maintenence的首选,因为每次UUID都会更改以重新生成配置文件.

{"ios": {    "deBUG": {        "codeSignIDentity": "iPhone Developer","developmentTeam":"YOURTEAMID","provisioningProfile": "provisioning profile name or UUID","packageType": "development"    },"release": {        "codeSignIDentity": "iPhone distribution","packageType": "ad-hoc"    }}}

我计划手动修补,直到/ a修复程序合并到下一个Cordova版本中.通过“Cordova platform rm iOS”然后“Cordova platform add~ / forks / cordova-ios”,你必须在补丁之后重新生成你的iOS平台. 〜/ forks / cordova-ios我的本地路径,使用您下载分叉Cordova-ios repo的本地机器上的路径.

更新

cordova-ios 4.5.2已正式发布!通过运行以下命令进行升级:“cordova platform rm ios”,然后“cordova platform add ios@4.5.2”

干杯!

总结

以上是内存溢出为你收集整理的ios – 升级到xcode 9后,将无法构建cordova应用程序,错误70,需要配置文件全部内容,希望文章能够帮你解决ios – 升级到xcode 9后,将无法构建cordova应用程序,错误70,需要配置文件所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/998962.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存