Welcome back to How to Setup Gitlab CI-CD Pipeline for Flutter Applications. In Part 1, you learned how to configure a Flutter application with different flavors for both Android and iOS.
In this part, we’re going to configure our Android and iOS modules with release configurations. Let’s get started!
First, we’ll configure Android module step by step as below,
As we can see, we have to put our jks file created in step 1 in folder APP_DIR/ci-cd/android/jks/.jks
3. Next, we have to cofigure signing in app/build.gradle file.
Add code before buildTypes block, with signing configuration as below, and also update release buildType as same.
We’ll be also updating buildTypes with release configuration and optionally add debug as well as below:
That’s it. We’re done here from our side with signing configuration for Android module of our Flutter application. Now we’ll add same for our iOS module.
For iOS before we start, we need to create ExportOptions.plist file for all the schemes/flavors that we’ve defined in Part 1. We can create .plist file manually but instead of that we highly recommend to generate ExportOptions.plist file using XCode only. So, let’s see how we can generate this plist file.
2. Select develop scheme and keep Generic iOS Device aside to it as below,
Now Product menu and select archive and let it perform operations to create archive. When it’s done move to next step.
3. Select created archive and click on Export than select Development and click on next. Wait for it to create build and when asked export it to a particular location. When we’re done, we’ll move to next step.
4. In exported destination folder we’ll find ExportOption.plist file. We’ll copy this file and paste it in path specified here APP_DIR/ci-cd/iOS/develop/debug/
5. At the end, we’ll generate archive in same way for production and export build at specific destination folder. In that folder we’ll find the ExportOption.plist file for production mode. We’ll copy this file and paste in path specified here APP_DIR/ci-cd/iOS/develop/release/.
Here, we’re done with develop scheme/favour only & for production scheme select the production scheme with Generic iOS Device and repeat above 3 to 5 steps. We’ll copy development and production ExportOption.plist file under same path specified before as APP_DIR/ci-cd/iOS/production/debug/ and APP_DIR/ci-cd/iOS/production/release/ respectively.
That’s it. We’re done here from our side to add signing configuration for iOS module of our Flutter application. In next & final part, we’ll see, what configurations and changes we’ve to make on Gitlab for our Flutter Project so we can enable and run build pipeline directly from it.
So, stay tuned for the final part!
Our team of experts will review your project and give you a quote at no cost.
Businesses are forced to make compromises because of this…
When adopting AI and automation, taking the time to…
Without a strategy built by experts, your business could…
Strategically implementing AI & Automation can drive significant value,…
Data-driven businesses are not only 23 times more likely…
Our key strategies for building a profitable data ecosystem…