Mobile App Deployment
The Artbase Creator Hub mobile app allows artists to manage their stores on the go. This guide covers building and deploying the Flutter app.
Overview
The mobile app is built with Flutter, targeting:
- iOS (App Store)
- Android (Google Play)
Prerequisites
Development Environment
- Flutter SDK 3.16+
- Xcode 15+ (for iOS)
- Android Studio (for Android)
- CocoaPods (iOS dependencies)
Accounts
- Apple Developer Account ($99/year)
- Google Play Developer Account ($25 one-time)
Project Structure
apps/creator_hub/
├── lib/
│ ├── main.dart
│ ├── app/
│ ├── features/
│ └── shared/
├── ios/
├── android/
├── pubspec.yaml
└── README.md
Environment Setup
1. Install Dependencies
cd apps/creator_hub
flutter pub get
2. Configure Environment
Create environment files:
# .env.development
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
# .env.production
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-prod-anon-key
3. Platform Configuration
iOS
cd ios
pod install
Update ios/Runner/Info.plist with:
- Bundle identifier
- App name
- Required permissions
Android
Update android/app/build.gradle:
- Application ID
- Version codes
- Signing configuration
Building
Development Build
# iOS Simulator
flutter run -d ios
# Android Emulator
flutter run -d android
Release Build
iOS
flutter build ios --release
Then in Xcode:
- Open
ios/Runner.xcworkspace - Select Product > Archive
- Upload to App Store Connect
Android
flutter build appbundle --release
Upload build/app/outputs/bundle/release/app-release.aab to Play Console.
App Store Deployment
iOS (App Store)
-
App Store Connect
- Create app listing
- Set pricing (free)
- Add screenshots, description
-
TestFlight
- Upload build
- Internal testing
- External beta testing
-
Release
- Submit for review
- Typical review: 24-48 hours
Android (Google Play)
-
Play Console
- Create app listing
- Set content rating
- Add store listing assets
-
Testing Tracks
- Internal testing
- Closed testing
- Open testing
-
Production
- Submit for review
- Typical review: 1-7 days
CI/CD
GitHub Actions
# .github/workflows/mobile.yml
name: Mobile Build
on:
push:
branches: [main]
paths:
- 'apps/creator_hub/**'
jobs:
build-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- run: flutter build ios --release --no-codesign
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
- run: flutter build appbundle --release
Fastlane (Optional)
For automated store deployment:
# ios/fastlane/Fastfile
lane :deploy do
build_app(scheme: "Runner")
upload_to_app_store
end
Version Management
Versioning Scheme
MAJOR.MINOR.PATCH+BUILD
1.2.3+45
- MAJOR: Breaking changes
- MINOR: New features
- PATCH: Bug fixes
- BUILD: Incremental build number
Updating Version
In pubspec.yaml:
version: 1.2.3+45
Monitoring
Crash Reporting
Using Firebase Crashlytics:
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterError;
Analytics
Using Firebase Analytics:
await FirebaseAnalytics.instance.logEvent(
name: 'product_viewed',
parameters: {'product_id': id},
);
Troubleshooting
iOS Build Failures
# Clean and rebuild
cd ios && pod deintegrate && pod install
flutter clean && flutter pub get
Android Signing Issues
Ensure key.properties is configured:
storePassword=xxx
keyPassword=xxx
keyAlias=upload
storeFile=upload-keystore.jks