xcodebuild -exportArchive 对 tvOS 应用程序失败
xcodebuild -exportArchive fails for tvOS apps
如果我尝试使用命令行使用 xcodebuild
从 .xcarchive
中导出 .ipa
:
xcodebuild archive -scheme "Cross" -archivePath "build/Cross.xcarchive"
xcodebuild -exportArchive -archivePath "build/Cross.xcarchive" -exportPath "build/Cross-tvOS.ipa"
失败并显示错误 "the platform is unknown: appletvos":
+ 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 **
我可以使用 Xcode 管理器成功导出 .ipa
。这是在 Xcode 版本 7.1.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>
如果我尝试使用命令行使用 xcodebuild
从 .xcarchive
中导出 .ipa
:
xcodebuild archive -scheme "Cross" -archivePath "build/Cross.xcarchive"
xcodebuild -exportArchive -archivePath "build/Cross.xcarchive" -exportPath "build/Cross-tvOS.ipa"
失败并显示错误 "the platform is unknown: appletvos":
+ 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 **
我可以使用 Xcode 管理器成功导出 .ipa
。这是在 Xcode 版本 7.1.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>