Skip to content

Commit 277755c

Browse files
committed
docs(mobile-client): streamline deployment guide and emphasize platform specifics
- Refactor content to highlight configuration for production environment - Simplify guide overview and link to official Flutter deployment documentation - Reorganize steps to address prerequisites and platform-specific deployment - Remove redundant instructions and improve clarity for app configuration
1 parent 077d6b3 commit 277755c

File tree

1 file changed

+35
-75
lines changed

1 file changed

+35
-75
lines changed

src/content/docs/mobile-client/deployment.mdx

Lines changed: 35 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -2,98 +2,58 @@
22
title: 'Deployment: Mobile Client'
33
description: A guide to building and deploying the Flutter mobile app for Android and iOS.
44
---
5+
import { Steps, Aside } from '@astrojs/starlight/components';
56

6-
import { Steps, Tabs, TabItem, Aside } from '@astrojs/starlight/components';
7+
This guide provides a high-level overview of the tasks required to build and deploy the Flutter News App Mobile Client to the Google Play Store and Apple App Store.
78

8-
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.
9+
For detailed, step-by-step instructions, this guide will link to the official Flutter and platform documentation. These are the definitive resources and are always kept up-to-date.
910

10-
<Aside>
11-
Before you begin, ensure you have configured the app to connect to your production API server by setting the `appEnvironment` constant in `lib/main.dart` to `AppEnvironment.production`.
12-
</Aside>
11+
### Prerequisites
1312

14-
<Tabs>
15-
<TabItem label="Android">
16-
<Steps>
17-
1. **Update the Package ID**
18-
19-
The Android package ID is a unique identifier for your app. You must change it from the default.
20-
- Open `android/app/build.gradle`.
21-
- Locate the `applicationId` field and change its value to your own unique ID (e.g., `com.yourcompany.newsapp`).
22-
23-
2. **Change the App Display Name**
24-
25-
- Open `android/app/src/main/AndroidManifest.xml`.
26-
- Find the `android:label` attribute within the `<application>` tag and update its value to your app's name.
27-
28-
3. **Generate App Icons**
29-
30-
The project uses the `flutter_launcher_icons` package to generate app icons.
31-
- Replace the placeholder icon file in your project's `assets` folder with your own icon (`1024x1024` recommended).
32-
- Update the `flutter_launcher_icons.yaml` file if your icon has a different name.
33-
- Run the following command to generate the icons:
34-
```bash
35-
flutter pub run flutter_launcher_icons
36-
```
37-
38-
4. **Create a Production Keystore**
13+
Before you begin, you will need active developer accounts for the platforms you are targeting:
14+
- **Google Play Console:** [developer.android.com/distribute](https://developer.android.com/distribute)
15+
- **Apple Developer Program:** [developer.apple.com/programs](https://developer.apple.com/programs/)
3916

40-
You must sign your Android app with a private key before uploading it to the Play Store.
41-
- Follow the official Android documentation to [generate a new upload key and keystore](https://developer.android.com/studio/publish/app-signing#generate-key).
42-
- Securely store the generated `.jks` file and remember your passwords.
43-
44-
5. **Configure Gradle for Signing**
17+
<Steps>
18+
1. **Configure for Production**
4519

46-
- Create a file named `android/key.properties` (this file is in `.gitignore` and should not be committed).
47-
- Add your keystore information to this file:
48-
```properties
49-
storePassword=YOUR_STORE_PASSWORD
50-
keyPassword=YOUR_KEY_PASSWORD
51-
keyAlias=YOUR_KEY_ALIAS
52-
storeFile=path/to/your/keystore.jks
53-
```
54-
- Open `android/app/build.gradle` and ensure the signing configuration section is set up to read from this `key.properties` file.
20+
First, ensure the app is configured to connect to your live production API.
5521

56-
6. **Build the Release Bundle**
22+
- Open the file `lib/main.dart`.
23+
- Locate the `appEnvironment` constant.
24+
- Set its value to `AppEnvironment.production`.
5725

58-
Generate a production-ready Android App Bundle (`.aab`):
59-
```bash
60-
flutter build appbundle
26+
```dart title="lib/main.dart"
27+
// Use `AppEnvironment.production` to connect to a live backend API.
28+
const appEnvironment = AppEnvironment.production;
6129
```
62-
The 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.
63-
64-
</Steps>
65-
</TabItem>
66-
<TabItem label="iOS">
67-
<Steps>
68-
1. **Update the Bundle Identifier**
6930

70-
The iOS bundle identifier is a unique ID for your app.
71-
- Open the project in Xcode (`ios/Runner.xcworkspace`).
72-
- In the Project Navigator, select the `Runner` target.
73-
- Go to the "General" tab and update the "Bundle Identifier" field to your unique ID (e.g., `com.yourcompany.newsapp`).
31+
<Aside>
32+
Ensure that the `baseUrl` for the `production` environment in `lib/app/config/app_config.dart` points to the correct URL of your deployed [API Server](/docs/api-server/deployment/).
33+
</Aside>
7434

75-
2. **Update the Display Name**
35+
2. **Follow the Official Flutter Deployment Guides**
7636

77-
- In the same "General" tab in Xcode, update the "Display Name" field to your app's name.
37+
The Flutter team provides comprehensive guides that cover every aspect of building and releasing your application. Please follow the official guide for each platform you intend to deploy to.
7838

79-
3. **Generate the App Icon Set**
39+
#### **Android (Google Play Store)**
8040

81-
- In Xcode, navigate to `Runner/Assets.xcassets` and select `AppIcon`.
82-
- 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 single `1024x1024` image.
41+
The official guide covers essential steps including:
42+
- Updating the Package ID (`applicationId`).
43+
- Generating app icons.
44+
- Creating an upload keystore and configuring app signing.
45+
- Building the app bundle (`.aab`) for release.
8346

84-
4. **Configure Signing & Capabilities**
47+
**[Official Guide: Build and release an Android app](https://docs.flutter.dev/deployment/android)**
8548

86-
- In Xcode, go to the "Signing & Capabilities" tab.
87-
- 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.
49+
#### **iOS (Apple App Store)**
8850

89-
5. **Build the Release Archive**
51+
The official guide covers essential steps including:
52+
- Updating the Bundle Identifier and Display Name in Xcode.
53+
- Generating the app icon set.
54+
- Configuring app signing with your Apple Developer account.
55+
- Building the release archive (`.ipa`) for upload.
9056

91-
Create a build archive to upload to App Store Connect.
92-
```bash
93-
flutter build ipa
94-
```
95-
This command will create an `.ipa` file inside the `build/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.
57+
**[Official Guide: Build and release an iOS app](https://docs.flutter.dev/deployment/ios)**
9658

9759
</Steps>
98-
</TabItem>
99-
</Tabs>

0 commit comments

Comments
 (0)