Deployment
Building and deploying the app to Web, Android, and iOS
Deployment
BabyShopHub is built with Flutter and supports cross-platform deployment. Follow these steps to generate release builds for production.
Prerequisites
- Ensure all environment variables and API keys (Firebase, Groq, Cloudinary) are set for production.
- Run
flutter cleanandflutter pub getto ensure a fresh environment.
Web Deployment
Flutter Web builds a highly optimized single-page application (SPA).
-
Build Command:
Note: We use CanvasKit for better performance and fidelity, though it increases the initial load size.
-
Hosting: The output is generated in
build/web/. You can deploy this directory to Firebase Hosting, Vercel, or any static file server.
Android Deployment
-
Update Version: Update the
versionfield inpubspec.yaml(e.g.,1.0.0+1). -
Sign the App: Ensure you have configured
key.propertiesand yourbuild.gradleis set up to sign the release APK/AAB with your production keystore. -
Build Command:
iOS Deployment
Building for iOS requires a macOS machine with Xcode installed.
-
Update Version: Update the
versioninpubspec.yaml. -
Xcode Setup: Open
ios/Runner.xcworkspacein Xcode.- Set your Team and Provisioning Profile in the "Signing & Capabilities" tab.
- Increment the Build Number if necessary.
-
Build Command:
-
Distribution: Upload the generated
.ipafile using the Transporter app or Xcode's Organizer to App Store Connect.