Deploy iOS App
Prerequisites
-
Apple Developer Program membership
-
Enable App Check for iOS (see App Check setup)
-
Xcode installed on a Mac
-
App Store Connect account
Certificates & Profiles
-
Create App ID:
- Go to Certificates, IDs & Profiles
- Click ”+” to register new identifier
- Choose “App IDs” > “App”
- Enter bundle ID (e.g.,
com.yourdomain.app
) - Enable needed capabilities
-
Create Certificate:
- Go to Certificates section
- Click ”+” to create new
- Choose “Apple Distribution”
- Follow CSR creation steps
- Download and install certificate
-
Create Provisioning Profile:
- Go to Profiles section
- Click ”+” to create new
- Choose “App Store” distribution
- Select your App ID
- Select distribution certificate
- Download and install profile
Xcode Setup
-
Open
ios/Runner.xcworkspace
-
Update signing settings:
- Select Runner target
- Choose your team
- Enable automatic signing
- Verify bundle identifier
-
Configure capabilities:
- Select Runner target
- Go to Signing & Capabilities
- Add required capabilities
- Enable App Groups if needed
App Store Preparation
-
Create app in App Store Connect:
- Go to “My Apps”
- Click ”+” to create new app
- Enter app information
- Choose bundle ID
-
Configure app info:
- Privacy policy URL
- App Store category
- Content rights
- Age rating
-
Prepare assets:
- App icon (1024x1024)
- Screenshots for all devices
- App preview videos (optional)
Build for Release
-
Update version in
pubspec.yaml
:version: 1.0.0+1 # version_name+build_number -
Update
ios/Runner/Info.plist
:<key>CFBundleShortVersionString</key><string>1.0.0</string><key>CFBundleVersion</key><string>1</string> -
Build archive:
Terminal window flutter build ipa --releaseOr use Xcode:
- Product > Archive
- Wait for archive to complete
- Click “Distribute App”
App Store Submission
-
Submit build:
- Open Xcode > Window > Organizer
- Select your archive
- Click “Distribute App”
- Choose “App Store Connect”
- Follow upload steps
-
Configure release in App Store Connect:
- Select your build
- Add release notes
- Set availability date
- Configure pricing
- Submit for review
CI/CD Setup
Add this to your GitHub Actions workflow:
name: Deploy to App Storeon: push: tags: [ 'v*' ]
jobs: deploy: runs-on: macos-latest steps: - uses: actions/checkout@v3
- uses: subosito/flutter-action@v2 with: channel: 'stable'
- name: Install Apple Certificate uses: apple-actions/import-codesign-certs@v1 with: p12-file-base64: ${{ secrets.P12_BASE64 }} p12-password: ${{ secrets.P12_PASSWORD }}
- name: Install Provisioning Profile uses: apple-actions/download-provisioning-profiles@v1 with: bundle-id: com.yourdomain.app profile-type: 'IOS_APP_STORE' issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
- name: Build & Deploy env: BUNDLE_ID: com.yourdomain.app run: | flutter build ipa --release \ --export-options-plist=ExportOptions.plist
- name: Upload to App Store uses: apple-actions/upload-testflight-build@v1 with: app-path: build/ios/ipa/*.ipa issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }} api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}
TestFlight
Before App Store release:
-
Upload to TestFlight:
- Build will process automatically
- Add test information
- Create test groups
-
Internal Testing:
- Add internal testers
- Test on various devices
- Collect feedback
-
External Testing (optional):
- Create external group
- Add email addresses
- Set testing period
- Submit for beta review