Skip to content

Instantly share code, notes, and snippets.

@chbeer
Created September 10, 2020 12:41
Show Gist options
  • Save chbeer/f3c75194e892f7cf1de490b268dfa68d to your computer and use it in GitHub Desktop.
Save chbeer/f3c75194e892f7cf1de490b268dfa68d to your computer and use it in GitHub Desktop.
Shell script to deploy to AppStoreConnect
#!/bin/bash
if [[ ! -e build ]]; then
mkdir build
fi
WORKSPACE=XcodeWorkspaceName
SCHEME=SchemeName
xcrun agvtool next-version -all
xcrun xcodebuild -quiet -workspace $WORKSPACE.xcworkspace archive -scheme $SCHEME -archivePath build/$SCHEME.xcarchive
xcrun xcodebuild -quiet -exportArchive -archivePath build/$SCHEME.xcarchive -exportOptionsPlist ExportOptions.plist \
-exportPath build/deploy
<?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_TEAM_ID</string>
<key>destination</key>
<string>upload</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment