使用xcodebuild导出为macOS应用

Snu*_*ies 5 macos xcode xcodebuild

我有一个将OS X应用程序导出到.app文件的构建脚本。这等效于进入xcode和存档,然后选择导出,然后选择“导出为macOS应用程序”。该脚本过去工作正常,直到-exportFormat从中删除了该标志xcodebuild。现在该脚本根本不起作用。我没有运气来确定新的标志应该是什么。

我已经查看了该-exportoptionsplist标志,但是我不知道该在plist中添加什么,或者这是否是正确的解决方案。脚本中的相关行如下:

#Archive the app
xcodebuild -workspace '/path/project.xcworkspace' -config Release -scheme 'Some Scheme' -archivePath ./archive archive

#Export the archive as in the APP format
xcodebuild -archivePath archive.xcarchive -exportArchive -exportPath 'exportedApp.app' -exportFormat App
Run Code Online (Sandbox Code Playgroud)

如何获得-exportFormat App以前提供的结果?

Ben*_*Uri 4

使用

xcodebuild \
-archivePath archive.xcarchive \
-exportArchive -exportPath 'exportedApp.app'\
-exportOptionsPlist exportOptions.plist
Run Code Online (Sandbox Code Playgroud)

并设置method = developer-idexportOptions.plist。