Bump version and upload to App Store Connect
Bump the app version, build an archive, and upload to App Store Connect.
Read the current version from project.pbxproj:
MARKETING_VERSION (e.g. 2.0) — the user-facing versionCURRENT_PROJECT_VERSION (e.g. 2) — the build numberAlways increment CURRENT_PROJECT_VERSION by 1.
If $ARGUMENTS is provided, use it as the new MARKETING_VERSION (e.g. /ship 2.1).
If no argument, keep MARKETING_VERSION unchanged and only bump the build number.
Use the Edit tool to update ALL occurrences of both MARKETING_VERSION and CURRENT_PROJECT_VERSION in screenshot.xcodeproj/project.pbxproj. There are multiple occurrences (Debug/Release for main target and UI tests target) — update them all using .
replace_allxcodebuild -scheme screenshot -destination 'platform=macOS' build
If the build fails, stop and report the error. Do not proceed.
xcodebuild -scheme screenshot -destination 'platform=macOS,arch=arm64' -archivePath build/screenshot.xcarchive archive
ExportOptions.plist already exists with method: app-store-connect and destination: export. To upload:
destination from export to upload in ExportOptions.plistxcodebuild -exportArchive -archivePath build/screenshot.xcarchive -exportPath build/upload -exportOptionsPlist ExportOptions.plist -allowProvisioningUpdates
ExportOptions.plist back to destination: exportStage and commit the version changes, then create a git tag:
git add screenshot.xcodeproj/project.pbxproj
git commit -m "Bump version to <MARKETING_VERSION> (<CURRENT_PROJECT_VERSION>)"
git tag v<MARKETING_VERSION>-<CURRENT_PROJECT_VERSION>
Print a summary: