Automate version bumping, changelog generation, and App Store releases for native iOS projects.
Adapted from flutter-automatic-deploy by Filip Kowalski.
- Universal version bumping - Works with any iOS project structure (
.xcodeproj/.xcworkspace) - Auto-changelog generation - Generates changelog from git commits using conventional commits
- iOS automation - Build IPA, upload to App Store Connect, and auto-submit for review
- Pre-release validation - Validates localization files before release
- Git integration - Auto-commit, create tags, and push to remote
git clone https://github.com/your-username/iOS-auto-deploy-and-localization.git
cd iOS-auto-deploy-and-localization
chmod +x ios_version_bump.sh submit_to_app_store.py localization_checker.pyOption A: Using .env file (Recommended)
# Copy the example file
cp .env.example .env
# Edit .env with your credentials
nano .envYour .env file should contain:
APP_STORE_API_KEY_ID=YOUR_KEY_ID_HERE
APP_STORE_ISSUER_ID=YOUR_ISSUER_ID_HERE
APP_STORE_P8_KEY_PATH=./keys/AuthKey_YOUR_KEY_ID.p8
Option B: Using shell environment (Alternative)
Add to ~/.zshrc or ~/.bashrc:
export APP_STORE_API_KEY_ID=your_key_id
export APP_STORE_ISSUER_ID=your_issuer_idPlace your App Store Connect API key (.p8 file) in the keys/ directory:
keys/AuthKey_YOUR_KEY_ID.p8
⚠️ Important: The.p8file is a secret! It's already in.gitignoreso it won't be committed.
pip3 install PyJWT requests cryptographyEdit ExportOptions.plist and replace YOUR_TEAM_ID with your Apple Developer Team ID.
# Bump patch version (1.0.0 -> 1.0.1)
./ios_version_bump.sh patch
# Bump minor version (1.0.0 -> 1.1.0)
./ios_version_bump.sh minor
# Bump major version (1.0.0 -> 2.0.0)
./ios_version_bump.sh major
# Bump build number only
./ios_version_bump.sh build
# Set specific version
./ios_version_bump.sh 1.5.0+42# Full release
./ios_version_bump.sh patch --release
# Upload without auto-submitting to App Store review
./ios_version_bump.sh patch --release --skip-submit# Auto-commit version changes
./ios_version_bump.sh patch --commit
# Create and push git tag
./ios_version_bump.sh patch --push-tag
# Full release with tag push
./ios_version_bump.sh patch --release --push-tag# See what would happen without making changes
./ios_version_bump.sh patch --dry-run| Option | Description |
|---|---|
major |
Bump major version |
minor |
Bump minor version |
patch |
Bump patch version |
build |
Bump build number only |
X.Y.Z+B |
Set specific version |
--release |
Build and upload after version bump |
--skip-submit |
Skip automatic App Store submission |
--commit |
Auto-commit version changes |
--push-tag |
Create and push git tag |
--no-tag |
Skip git tag creation |
--dry-run |
Preview without modifying files |
--scheme=NAME |
Xcode scheme to build |
--config=PATH |
Path to ExportOptions.plist |
These can be set in .env file or shell environment:
| Variable | Description | Default |
|---|---|---|
APP_STORE_API_KEY_ID |
App Store Connect API Key ID | Required |
APP_STORE_ISSUER_ID |
App Store Connect Issuer ID | Required |
APP_STORE_P8_KEY_PATH |
Path to .p8 private key | ./keys/AuthKey_{KEY_ID}.p8 |
- Go to App Store Connect > Users and Access > Keys
- Click + to create a new API key
- Give it a name and select Admin or App Manager role
- Download the
.p8file (you can only download it once!) - Note the Key ID and Issuer ID
- Place the
.p8file in thekeys/directory:keys/AuthKey_YOUR_KEY_ID.p8 - Copy
.env.exampleto.envand fill in your Key ID and Issuer ID
To test these scripts without publishing:
- Go to App Store Connect
- Click My Apps > + > New App
- Fill in:
- Platform: iOS
- Name: Your Test App Name
- Primary Language: English
- Bundle ID: Create a new one (e.g.,
com.yourname.testapp) - SKU: Any unique identifier
- The app will be in "Prepare for Submission" state
- You can upload builds and test the automation without actually submitting
Note: You don't need to fill in all App Store metadata for testing uploads.
Validate .strings files across localizations:
./localization_checker.py /path/to/ios/projectThe script generates changelog from git commits using Conventional Commits:
feat:→ Addedfix:→ Fixedrefactor:,perf:,style:,chore:→ Changed
iOS-auto-deploy-and-localization/
├── ios_version_bump.sh # Main version bump and release script
├── submit_to_app_store.py # App Store Connect API automation
├── localization_checker.py # .strings file validator
├── ExportOptions.plist # Template for IPA export
├── .env.example # Example environment file (copy to .env)
├── .env # Your credentials (git-ignored)
├── keys/ # Place your .p8 auth key here (git-ignored)
│ └── AuthKey_XXXXX.p8
├── README.md # This file
└── CHANGELOG.md # Auto-updated by script
MIT License - feel free to use in your projects!