Client

Configuration and compilation of the client side (Flutter)

In order to watch the video tutorial for this section please head to the customer panel at: https://support.ridy.io

First, we will proceed with the necessary updates for both the Android and iOS apps.

Android

To begin, we need to create release keystores for signing the APKs or aab bundles. You can use the command provided below, replacing [key_alias_name] with the desired alias name of your choice:

keytool -genkey -v -keystore keystore.jks -alias [your_alias_name] -keyalg RSA -keysize 2048 -validity 10000

Ensure you have copied this file to the driver's and rider's frontend folders. Then, open the key.properties file located in the android folder and enter the alias name and password you have chosen for the keystore in the appropriate fields.

Now, execute the following command to display the signature of both your system's debug keystore and the release keystore. Take a copy of the SHA-1 and SHA-256 values, as we will need them later.

../gradlew signingreport

Next, open the build.gradle file located in the app folder. Inside this file, you will find the line that specifies the applicationId. Update this line to match the application identifier of your own brand.

android {
    compileSdkVersion 33

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID 
-       applicationId com.ridy.taxi.rider
+       applicationId com.yourCompanyName.taxi.driver

iOS

Next, we will do the same for iOS apps. Please open the Runner.xcworkspace in either rider-frontend/driver-frontend's ios folder. Next click on the Runner project in the left panel so the project settings would appear. Then under the Signing and Capabilities tab, you can change the bundle identifier:

Firebase

You can now head to the Firebase console and create a Flutter Firebase app on the project created during the first Firebase setup.

During the flutter application creation, you will be instructed on how to install Firebase CLI & FlutterFire tool:

Once you have installed those tools, Firebase will prompt you to connect your apps to the Firebase project. This process is seamless and can be accomplished by executing a command similar to the one provided below by Firebase:

f

When you run this command, you will be presented with the option to configure which apps you want to connect with Firebase. You can uncheck macOS since ridy does not support macOS client officially.

Pointing to the server

In order for the apps to communicate with your server's backend, you need to modify the constants.dartfile in the libs/flutter_common/lib/config/constants.dart project. Open the file and locate the variable that specifies the server IP. If you access your admin panel at 1.1.1.1:4003, remove the:4003 part and update the variable's value accordingly. Here's an example of how to edit the variable:

- static const String serverIp = "x.x.x.x";
+ static const String serverIp = "1.1.1.1";

With the above steps completed, you can now compile either the driver or rider app using Flutter's standard build commands.

// Build with debug keystore
flutter build apk
flutter build appbundle

// Build with release keystore
flutter build apk --release
flutter build appbundle --release

Last updated