- Flutter Tutorial
- Flutter - Home
- Flutter - Introduction
- Flutter - Installation
- Creating Simple Application in Android Studio
- Flutter - Architecture Application
- Introduction to Dart Programming
- Flutter - Introduction to Widgets
- Flutter - Introduction to Layouts
- Flutter - Introduction to Gestures
- Flutter - State Management
- Flutter - Animation
- Flutter - Writing Android Specific Code
- Flutter - Writing IOS Specific Code
- Flutter - Introduction to Package
- Flutter - Accessing REST API
- Flutter - Database Concepts
- Flutter - Internationalization
- Flutter - Testing
- Flutter - Deployment
- Flutter - Development Tools
- Flutter - Writting Advanced Applications
- Flutter - Conclusion
- Flutter Useful Resources
- Flutter - Quick Guide
- Flutter - Useful Resources
- Flutter - Discussion
Flutter - Deployment
This chapter explains how to deploy Flutter application in both Android and iOS platforms.
Change the application name using android:label entry in android manifest file. Android app manifest file, AndroidManifest.xml is located in <app dir>/android/app/src/main. It contains entire details about an android application. We can set the application name using android:label entry.
Change launcher icon using android:icon entry in manifest file.
Sign the app using standard option as necessary.
Enable Proguard and Obfuscation using standard option, if necessary.
Create a release APK file by running below command −
cd /path/to/my/application flutter build apk
You can see an output as shown below −
Initializing gradle... 8.6s Resolving dependencies... 19.9s Calling mockable JAR artifact transform to create file: /Users/.gradle/caches/transforms-1/files-1.1/android.jar/ c30932f130afbf3fd90c131ef9069a0b/android.jar with input /Users/Library/Android/sdk/platforms/android-28/android.jar Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 85.7s Built build/app/outputs/apk/release/app-release.apk (4.8MB).
Install the APK on a device using the following command −
Publish the application into Google Playstore by creating an appbundle and push it into playstore using standard methods.
flutter build appbundle
Register the iOS application in App Store Connect using standard method. Save the =Bundle ID used while registering the application.
Update Display name in the XCode project setting to set the application name.
Update Bundle Identifier in the XCode project setting to set the bundle id, which we used in step 1.
Code sign as necessary using standard method.
Add a new app icon as necessary using standard method.
Generate IPA file using the following command −
flutter build ios
Now, you can see the following output −
Building com.example.MyApp for device (ios-release)... Automatically signing iOS for device deployment using specified development team in Xcode project: Running Xcode build... 23.5s ......................
Test the application by pushing the application, IPA file into TestFlight using standard method.
Finally, push the application into App Store using standard method.
Kickstart Your Career
Get certified by completing the courseGet Started