How To Setup Mobile App Configuration

20th Jun, 2023

Android Configuration

Change Application Name

Open android/app/src/main/AndroidManifest.xml and specify your application name.


Change Application Icon

  1. Open Android Asset Studio Click here.
  2. Then Select Image and Click on the Download button to download launcher icons.



  1. Open android/app/src/main/res and replace the following folders.


 

 

Change Application ID

  1. Open Android Studio. Select File -> open -> select root folder -> android
  2. Wait for indexing
  3. Open the Android/app/build.gradle file and change YOUR_APP_ID
  4. after making changes sync your Project.


Setup Firebase

  1. For Firebase setup, you just need to change the android/app/google-services.json file.
  2. Create a new Firebase account, and register your application with your package name.
  3. Now download the google-services.json file and replace it with the current one.
  4. Refer to Link


 


Generate Signed APK & AAB

  1. Go to your project -> Tools -> Flutter -> Open for Editing in Android Studio as shown below




  1. Open Project in New Window
  2. Wait for a while until project synchronization. After that Go to Build -> GenerateSigned Bundle/APK...

 


  1. Select Android App Bundle or APK Option as per your need. (Android App Bundle is the best solution) and click the Next button.

 


  1. Select Create New. option to generate a new Signed key (When you release your app the First Time) and Fill in all options. Refer this link



6. Click the Next button and you will get the following screen...




Select Build variants - release and Signature versions both V1 and V2 respectively as shown above screenshot and click the Finish button.

 

  1. Wait for a while until the Gradle Build Running process is complete and finally, you will get the Generate Signed APK : (APKs) generated successfully. From that click on Locate option to get the Location of your Generate Signed APK Key.

iOS Configuration

Open Project in Android Studio

  1. Open Android Studio in your project.
  2. Open the terminal in android studio.
  3. flutter pub get
  4. Open terminal cd ios.
  5. pod install.
  6. run the project in Xcode.

Open Project in Xcode

  1. Open Xcode.
  2. Select Open another Project.
  3. Open the iOS directory within your app.
  4. Now, click on the Done button.

Change Bundle Name

  1. Select your project file icon in Group and Files panel.
  2. Then Select Target -> Info Tab.
  3. At last change Bundle Name.


 


Change Bundle Identifier

The bundle Id is a unique Identifier of your app on iOS and MacOS. iOS and MacOS use it to recognise updates to your app. The identifier must be unique for your app.
  1. Select your project file icon in Group and Files panel.
  2. Select General Tab.
  3. After selecting the General tab you can see the details of your application.
  4. In the Identity section, rename your Bundle identifier.




Change App Icons

  1. See How to Generate App Icons?
  2. In the Group and Files panel find the “Assets.xcassets” folder.
  3. The Assets.xcassets folder replaces AppIcon.




How to create Firebase on iOS

  1. Open the Firebase console with log in your account.
  2. Firebase Link

 


  1. Here you need to add bundle id (Apple Unique Identifier for your application.) Whatever bundle identifier you put here, you need to put the same in the iOS application.
  2. Click the Register App button.




  1. Click Download Plist file and store it on your computer, because we will need it in a second.




  1. Go to the project you downloaded and navigate to the project folder.
  2. Find the folder iOS and go inside.
  3. Find folder Runner and go inside.
  4. Replace the GoogleService-Info.plist file with the one you just downloaded.



Google Map iOS

  1. Open the "AppDelegate.swift" file and add your API key




Flutter Configuration For Rider App & Driver App

Change Base URL


Go to lib/utils/Constants.dart and change DOMAIN_URL

1 -

DOMAIN_URL="ADD_YOUR_DOMAIN_URL"

 


Change MQTT URL

Go to lib/utils/Constants.dart



Change Primary Color

li>Go to lib/utils/Colors.dart


Change One Signal Key

Go to lib/utils/Constants.dart 


How to integrate Firebase

  • Create a new project for your Firebase console.


 




Add an Android application to your Firebase project

 


  • Add package name and sha-1 key (sha-1 optional for now)








  • You have connected the Android application to your Firebase project successfully.
  • Now download the google-services.json file and replace it with the current one.





Add ios application to your Firebase project



  • Get your bundle id from \ios\Runner.xcodeproj\project.pbxproj file or search for PRODUCT_BUNDLE_IDENTIFIER and you will get the following result



 

  • Enter your ios bundle id

 



 
  • You have connected the ios application to your Firebase project successfully
  • Now download the GoogleService-Info.plist file and replace it with current one.



 

  • Go to Project setting and Add your debug and release SHA1 Key. Refer link


 


Create Firestore Database

  • Go to Firestore Database -> click on create database




  • Select Start in test mode and click on the Next button.



  • Click on Enable button and create your collection.