SnapReels Flutter App Setup (Android & iOS)
Complete step-by-step documentation to configure, build, and publish the SnapReels cross-platform Flutter application for both Google Play Store and Apple App Store.
Prerequisites & Environment Setup
Before building the app, make sure you have installed the necessary developer tools:
- Flutter SDK: Version
3.24.0or newer (Stable channel). - IDE: Visual Studio Code (with Flutter extension) or Android Studio.
- For Android: Android Studio, Android SDK (API 34+), and Java JDK 17+.
- For iOS: macOS computer with Xcode 15+ and CocoaPods installed.
Verify Environment
Run flutter doctor in your terminal to ensure Flutter, Android toolchain, and Xcode are properly installed.
Connect Flutter App to Your SaaS Backend
Open the flutter_app folder in your code editor and navigate to:
lib/config/app_config.dart
Update the configuration with your website domain and API Key:
class AppConfig {
// Replace with your production website URL (without trailing slash)
static const String baseUrl = "https://yourdomain.com";
// Replace with the API Key configured in Admin Panel -> Settings -> Mobile Settings
static const String apiKey = "YOUR_SECURE_API_KEY";
static String get apiUrl => "$baseUrl/api/mobile/v1";
}
Where to find your API Key?
Log in to your Admin Panel -> Settings -> Mobile Settings. Copy the API Access Key and paste it into app_config.dart.
Firebase Setup (Authentication & Push Notifications)
SnapReels utilizes Firebase for user authentication (Email/Password, Google Sign-In, Apple Sign-In) and Push Notifications.
Go to the Firebase Console and create or select your project:
A. Android Setup:
- Add an Android App in Firebase Console with your package name (e.g.
com.yourbrand.snapreels). - Add your SHA-1 Fingerprint (required for Google Sign-In).
- Download
google-services.jsonand place it inside:flutter_app/android/app/google-services.json.
B. iOS Setup:
- Add an iOS App in Firebase Console with your iOS Bundle Identifier.
- Download
GoogleService-Info.plistand place it inside:flutter_app/ios/Runner/GoogleService-Info.plist. - Open
flutter_app/ios/Runner/Info.plistand make sure your REVERSED_CLIENT_ID (found insideGoogleService-Info.plist) is added underCFBundleURLSchemes:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<!-- Paste your REVERSED_CLIENT_ID from GoogleService-Info.plist -->
<string>com.googleusercontent.apps.YOUR-REVERSED-CLIENT-ID</string>
</array>
</dict>
</array>
Change Package Name, App Name & Icons
1. Change App Name:
Android: Open android/app/src/main/AndroidManifest.xml and update android:label="Your App Name".
iOS: Open ios/Runner/Info.plist and update CFBundleDisplayName.
2. Change Package Name / Bundle ID:
Android: Update applicationId in android/app/build.gradle.
iOS: Open the project in Xcode, click on Runner, and update Bundle Identifier under General / Signing & Capabilities.
3. App Icons & Splash Screen:
Replace the icon images inside:
android/app/src/main/res/mipmap-*/ios/Runner/Assets.xcassets/AppIcon.appiconset/
Or use the flutter_launcher_icons package to automatically generate all icons from a single 1024x1024 PNG image.
In-App Purchases (Google Play & Apple Pay / StoreKit)
SnapReels includes seamless native In-App Purchases for buying coins and VIP passes:
- Google Play Billing (Android): Users pay via Google Play in 1-tap.
- Apple In-App Purchase (iOS): Users pay via Apple ID / FaceID / TouchID in 1-tap.
Matching Product IDs:
Ensure that the Coin Pack IDs you create in your Admin Panel -> Monetization -> Coin Packs exactly match the Product IDs in Google Play Console (In-app products) and Apple App Store Connect (In-App Purchases -> Consumable).
Building the Release Applications
A. Build for Android (Google Play Store):
flutter build appbundle --release
The generated .aab file will be at: build/app/outputs/bundle/release/app-release.aab.
To generate an APK for direct testing:
flutter build apk --release
B. Build for iOS (Apple App Store):
flutter build ipa --release
Or open ios/Runner.xcworkspace in Xcode, select Product -> Archive, and use the Organizer to upload your build directly to App Store Connect / TestFlight.