Deploying the App
Android Deployment
Generate Keystore
bashkeytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
Configure Keystore Create/update
android/key.properties
:propertiesstorePassword=<password> keyPassword=<password> keyAlias=upload storeFile=<path to keystore>
Update build.gradle In
android/app/build.gradle
:groovydef keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) android { signingConfigs { release { keyAlias keystoreProperties['keyAlias'] keyPassword keystoreProperties['keyPassword'] storeFile file(keystoreProperties['storeFile']) storePassword keystoreProperties['storePassword'] } } }
Build Release APK
bashflutter build apk --release
Build App Bundle
bashflutter build appbundle
iOS Deployment
Setup Apple Developer Account
- Enroll in Apple Developer Program
- Create App ID in Apple Developer Portal
- Create Distribution Certificate
- Create Provisioning Profile
Configure Xcode
- Open
ios/Runner.xcworkspace
- Update Bundle Identifier
- Configure Signing & Capabilities
- Set Version and Build numbers
- Open
Build for App Store
bashflutter build ios --release
Archive and Upload
- Open Xcode
- Select Product > Archive
- Use Xcode Organizer to upload to App Store
Important Notes
- Always test thoroughly before deployment
- Keep your keystore and certificates secure
- Follow platform-specific guidelines
- Consider using CI/CD for automated deployment
- Keep track of version numbers
- Test on multiple devices before release