I'm using Xcode 11 and Xcode server to try build and upload my app to TestFlight. Now i've hit a point where I can't get even a basic build/export to work.
I was trying to use a custom ExportOptions.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>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>YOUR_TEN_CHARACTER_TEAM_ID</string>
<key>destination</key>
<string>upload</string>
</dict>
</plist>
But then I get an error saying "Upload" is not supported by Xcode server. Suggestions online are to leave it as "Export" and use this to upload in a post-integration script:
altool --upload-app -f $XCS_PRODUCT -u <username> -p <app-specific password>
So I did that and I've tried setting the bot to use either:
- Archive export: Installable Product
- Archive export: Installable Product & Thinned Variants
instead of the custom plist. But now my Archive step is failing with the below error before even getting to the trigger:
Build Service Error: exportArchive: exportOptionsPlist error for key 'destination': expected one of {upload}, but found export
I've tried removing the trigger to see if that was causing an issue, but its not. Now my bot is simply trying to archive and export the project and i'm getting this error about destination should be upload ... which isn't supported.
Archiving the app and uploading from the "Distribute app" button manually works fine. So there are no cert issues
Any help would be appreciated. I was hoping to do this without adding more tools as it should be possible on its own.
Asked the same question here: https://stackoverflow.com/questions/59965783/xcode-server-error-for-key-destination-expected-upload-found-export
Someone else facing the same issue got around it by telling the bot not to export and then writing the export command in the post integration script, before the upload. All working now