Xcode 9发行版本构建失败,因为新版本中exportOptions.plist的格式已更改 [英] Xcode 9 distribution build fails because format of exportOptions.plist has changed in new release

查看:376
本文介绍了Xcode 9发行版本构建失败,因为新版本中exportOptions.plist的格式已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SDK版本6.1.2和Xcode 9 beta为我的应用程序编译临时IPA(试图查看该应用程序是否在新版本中运行)。我的构建失败并显示以下错误消息:

I am trying to compile an ad-hoc IPA for my app using SDK version 6.1.2 and Xcode 9 beta (trying to see if the app works in the new version). My build is failing with the following error message:

Error Domain=IDEProvisioningErrorDomain Code=9 ""DGHospice.app" 
requires a provisioning profile." UserInfo=
{NSLocalizedDescription="DGHospice.app" requires a provisioning 
profile., NSLocalizedRecoverySuggestion=Add a profile to the 
"provisioningProfiles" dictionary in your Export Options property  
list.}

分发配置文件有效,如果我使用iOS SDK 10,则可以创建IPA。在11.0中失败。
有人可以帮助我查明问题吗?

The Distribution Profile is valid and I can create an IPA if I use iOS SDK 10. Build only fails in 11.0. Can someone help me pinpoint the issue?

推荐答案

您似乎在使用手动代码签名(由导出选项属性列表)。如果可能,您可能应该按照Apple的建议切换到自动代码签名。

It appears you using manual code signing (deduced by the Export Options property list in your error message). You should probably switch to automatic code signing as recommended by Apple if it suits your needs.

问题似乎是exportOptions.plist格式与<$ c不兼容$ c> Xcode 9 。 Xcode 9 的裸露分布列表现在看起来类似于:

The problem appears to be that exportOptions.plist format is not compatible with Xcode 9. A bare bones distribution plist for Xcode 9 now looks similar to this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
      <key>provisioningProfiles</key>
      <dict>
        <key>MY_APP_BUNDLE_ID</key>
        <string>MY_PROFILE_NAME_AS_SHOWN_BY_XCODE or UUID_FOUND_IN_MOBILEPROVISION_FILE</string>
      </dict>
      <key>signingCertificate</key>
      <string>iOS Distribution</string>
      <key>signingStyle</key>
      <string>manual</string>
      <key>teamID</key>
      <string>MY_TEAM_ID</string>
  </dict>
</plist>

您可以看到 exportOptions.plist支持的选项列表通过运行 xcodebuild -help

您可以获得有关这些东西工作原理的有用概述在 Xcode 9 中观看此视频:
https://developer.apple.com/videos/play/wwdc2017/403/

You can get a useful overview of how this stuff works in Xcode 9 by watching this video: https://developer.apple.com/videos/play/wwdc2017/403/

您也可以通过搜索获得帮助在Xcode的搜索字段中进行手动签名。

You can also get help by searching for 'Manual Signing' in Xcode's search field.

您可以按照以下步骤创建虚拟 exportOptions.plist 文件AnnaBátki在BitRise上记录的文档:
http://blog.bitrise.io/2017/08/15/new-export-options-plist-in-Xcode-9.html

You can create a dummy exportOptions.plist file by following the process documented here by Anna Bátki at BitRise: http://blog.bitrise.io/2017/08/15/new-export-options-plist-in-Xcode-9.html

您应该注意,如果使用 Xcode 9 beta 5 遵循安娜的步骤, exportOptionsPlist 无法导出。在 Xcode 9 GM 中,此行为再次起作用。

You should be aware that if you follow Anna's steps using Xcode 9 beta 5, the exportOptionsPlist will not be exported. This behavior works again in Xcode 9 GM.

要确定您的配置文件在 exportOptionsPlist 文件,您可以查看要使用的.mobileprovision文件的内容,并将密钥设置为应用程序的捆绑ID('com.foo'),并将值设置为您的.mobileprovision文件中的UUID。

To determine what the value of your provisioning profile s in the exportOptionsPlist file, you can view the contents of the .mobileprovision file you wish to use and set the key to your application's bundle id ('com.foo') and the value to the UUID of in your .mobileprovision file.

您可以在此处查看构建将使用的配置文件:
ls〜 / Library / MobileDevice / Provisioning\个人资料/

You can see the provisioning profiles the build will be using by looking here: ls ~/Library/MobileDevice/Provisioning\ Profiles/

另一个有用的工具是使用Finder的QuickLooks功能查看准备金的值个人资料而无需启动编辑器。

Another useful tool is using the QuickLooks feature of the Finder to see the values of the provision profiles without having to fire up editor.

这篇关于Xcode 9发行版本构建失败,因为新版本中exportOptions.plist的格式已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆