Deployment: Mobile Client
This guide covers the essential pre-release tasks for building and deploying the Flutter News App Mobile Client to the Google Play Store and Apple App Store.
-
Update the Package ID
The Android package ID is a unique identifier for your app. You must change it from the default.
- Open
android/app/build.gradle
. - Locate the
applicationId
field and change its value to your own unique ID (e.g.,com.yourcompany.newsapp
).
- Open
-
Change the App Display Name
- Open
android/app/src/main/AndroidManifest.xml
. - Find the
android:label
attribute within the<application>
tag and update its value to your app’s name.
- Open
-
Generate App Icons
The project uses the
flutter_launcher_icons
package to generate app icons.- Replace the placeholder icon file in your project’s
assets
folder with your own icon (1024x1024
recommended). - Update the
flutter_launcher_icons.yaml
file if your icon has a different name. - Run the following command to generate the icons:
Terminal window flutter pub run flutter_launcher_icons
- Replace the placeholder icon file in your project’s
-
Create a Production Keystore
You must sign your Android app with a private key before uploading it to the Play Store.
- Follow the official Android documentation to generate a new upload key and keystore.
- Securely store the generated
.jks
file and remember your passwords.
-
Configure Gradle for Signing
- Create a file named
android/key.properties
(this file is in.gitignore
and should not be committed). - Add your keystore information to this file:
storePassword=YOUR_STORE_PASSWORDkeyPassword=YOUR_KEY_PASSWORDkeyAlias=YOUR_KEY_ALIASstoreFile=path/to/your/keystore.jks
- Open
android/app/build.gradle
and ensure the signing configuration section is set up to read from thiskey.properties
file.
- Create a file named
-
Build the Release Bundle
Generate a production-ready Android App Bundle (
.aab
):Terminal window flutter build appbundleThe output file will be located at
build/app/outputs/bundle/release/app-release.aab
. You can now upload this file to the Google Play Console.
-
Update the Bundle Identifier
The iOS bundle identifier is a unique ID for your app.
- Open the project in Xcode (
ios/Runner.xcworkspace
). - In the Project Navigator, select the
Runner
target. - Go to the “General” tab and update the “Bundle Identifier” field to your unique ID (e.g.,
com.yourcompany.newsapp
).
- Open the project in Xcode (
-
Update the Display Name
- In the same “General” tab in Xcode, update the “Display Name” field to your app’s name.
-
Generate the App Icon Set
- In Xcode, navigate to
Runner/Assets.xcassets
and selectAppIcon
. - Drag and drop your prepared app icons (
.png
files of various required sizes) into the appropriate slots. You can use an online tool to generate these sizes from a single1024x1024
image.
- In Xcode, navigate to
-
Configure Signing & Capabilities
- In Xcode, go to the “Signing & Capabilities” tab.
- Select your development team and ensure a provisioning profile and signing certificate are correctly configured. This is required for deploying to a real device or the App Store. You will need an active Apple Developer account.
-
Build the Release Archive
Create a build archive to upload to App Store Connect.
Terminal window flutter build ipaThis command will create an
.ipa
file inside thebuild/ios/ipa/
directory. You can then upload this archive to App Store Connect using Xcode’s Organizer or the Transporter app for testing via TestFlight or submission to the App Store.