I have a build script that exports an OS X app to a .app
file. This is the equivalent of going into xcode and archiving, then choosing export, then choosing the 'Export as a macOS App'. The script used to work just fine, until the -exportFormat
flag was removed from xcodebuild
. Now the script does not work at all. I have not had any luck determining what the new flags should be.
I have looked into the -exportoptionsplist
flag, but I don't know what to put in my plist, or if this is even the correct solution. The relevant lines from the script are below:
#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
How can I get result that -exportFormat App
used to provide?
Use
xcodebuild \
-archivePath archive.xcarchive \
-exportArchive -exportPath 'exportedApp.app'\
-exportOptionsPlist exportOptions.plist
And set method = developer-id
exportOptions.plist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With