【发布时间】:2019-05-24 00:00:55
【问题描述】:
一段时间以来,我一直在使用命令行步骤来创建我的 iOS 应用程序 ipa。我一直害怕将我的构建系统操作系统更新到 High Sierra,因为过去每次操作系统更新以及更新的 xCode 都会破坏通过命令行自动构建的所有内容。
现在我在 High Sierra 上并使用 xCode 9.4.1,我似乎无法根据存档生成 .ipa。
以下命令是我用来生成存档的:
xcodebuild -project Unity-iPhone.xcodeproj -scheme Unity-iPhone -configuration Release clean archive -archivePath ./build/archive DEVELOPMENT_TEAM=<TEAM_ID>
这会输出一个 archive.xcarchive 文件,然后我将对其执行以下命令:
xcodebuild -exportArchive -archivePath ./build/archive.xcarchive -exportOptionsPlist ./iOS_ExportOptions_DEV.plist -exportPath ./build/adhoc -allowProvisioningUpdates
运行此命令将失败并出现此错误:
2018-06-27 11:19:59.789 xcodebuild[27042:735265] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/Unity-iPhone_2018-06-27_11-19-59.788.xcdistributionlogs'.
2018-06-27 11:20:21.364 xcodebuild[27042:735265] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7f9582c35d20>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProvisioningErrorDomain Code=23 \"There are no accounts registered with Xcode.\" UserInfo={NSLocalizedDescription=There are no accounts registered with Xcode., NSLocalizedRecoverySuggestion=Add your developer account to Xcode}",
"Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.MY.BUNDLE' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.MY.BUNDLE' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.MY.BUNDLE'.}"
)}
error: exportArchive: There are no accounts registered with Xcode.
Error Domain=IDEProvisioningErrorDomain Code=23 "There are no accounts registered with Xcode." UserInfo={NSLocalizedDescription=There are no accounts registered with Xcode., NSLocalizedRecoverySuggestion=Add your developer account to Xcode}
error: exportArchive: No profiles for 'com.MY.BUNDLE' were found
Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.MY.BUNDLE' were found" UserInfo={NSLocalizedDescription=No profiles for 'com.MY.BUNDLE' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.MY.BUNDLE'.}
** EXPORT FAILED **
再次使用此命令获取存档并导出在 Sierra 中运行 xCode 9.1 的 ipa。所有规定都在机器上以及所需的开发人员证书上。此外,我在 xCode 中使用我的开发人员帐户登录。所有这一切的最大烦恼是,我能够手动存档和创建 ipa,我可以直接在 xCode 中提交给 itunes connect 并且一切正常。
最后是我的 iOS_ExportOptions_DEV.plist 文件:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
<key>teamID</key>
<string>TEAM ID</string>
</dict>
</plist>
如果有人遇到此问题,请告诉我您是如何解决的。
【问题讨论】:
-
我也有同样的问题。我在 Xcode 上登录,我可以从 Xcode 构建和存档。如果我从命令行运行构建,我可以构建和创建 .xcarchive,但我无法导出到 .ipa 文件。我收到错误消息“您的帐户无权创建 iOS In House 配置文件。”
标签: ios xcode command-line macos-high-sierra