xcodebuild -exportArchive对于tvOS应用程序失败

时间:2015-12-01 06:20:43

标签: xcode7 xcodebuild ipa tvos

如果我尝试使用.ipa使用.xcarchivexcodebuild导出xcodebuild archive -scheme "Cross" -archivePath "build/Cross.xcarchive" xcodebuild -exportArchive -archivePath "build/Cross.xcarchive" -exportPath "build/Cross-tvOS.ipa"

+ xcodebuild -exportArchive -archivePath build/Cross.xcarchive -exportFormat app -exportPath build/Cross-tvOS.ipa
--- xcodebuild: WARNING: -exportArchive without -exportOptionsPlist is deprecated
2015-11-30 22:13:44.403 xcodebuild[42874:30912505] [MT] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-9081/IDEFoundation/Execution/Archiving/IDEArchivedApplication.m:148
Details:  Asked if we support packaging as a given format, but the platform is unknown: appletvos
Object:   <IDEArchivedApplication: 0x7f89bea3e990>
Method:   -supportsPackagingAsFormat:
Thread:   <NSThread: 0x7f89bbc320d0>{number = 1, name = main}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
error: archive at path '/Users/pol/Downloads/Cross/tvOS/build/Cross.xcarchive' cannot be exported as APP
** EXPORT FAILED **

它因错误而失败&#34;平台未知:appletvos&#34;:

.ipa

我可以使用Xcode Organizer成功导出*~.*。这是在Xcode版本7.1.1上观察到的。

1 个答案:

答案 0 :(得分:1)

事实证明错误信息具有误导性。如果您没有指定-exportOptionsPlist参数,则会发生此故障。

即使传递这样的假空.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/>
</plist>