Stop the war

Stand with Ukraine flag

Support Ukraine

Try it now Pricing
Mobile Application
Community Edition Professional Edition Cloud Edge PE Edge IoT Gateway License Server Trendz Analytics Mobile Application PE Mobile Application MQTT Broker
Documentation > Publish your app
Getting Started
On this page

Build and release ThingsBoard Mobile Application

Before publishing your app, you may want to polish it. Each app should have its own identification. Therefore, we recommend setting a unique label name, package name, and app launch icon before releasing it to the world.

Change App Name

Here are the simple steps to change the label name of your Android app:

  1. Open your AndroidManifest.xml file located in the android/app/src/main directory

    image

  2. Find the <application> tag
  3. Change the android:label attribute to the desired name for your app:

    1
    2
    3
    4
    5
    6
    
    <application android:requestLegacyExternalStorage="true"
        android:label="YourAppName" 
        android:networkSecurityConfig="@xml/network_security_config" 
        android:icon="@mipmap/launcher_icon">
        ...
    </application>
    

Change Package Name

  1. Open build.gradle located in android/app directory
  2. Change the applicationId under the defaultConfig to your desired package name:

    1
    2
    3
    4
    5
    6
    7
    
     defaultConfig {
       applicationId "org.yourappname.app" // usually reversed company domain
       minSdkVersion 21
       targetSdkVersion 33
       versionCode flutterVersionCode.toInteger()
       versionName flutterVersionName
     }
    
Doc info icon

Please note: You can also modify BundleId and AppName using the rename package and following the provided documentation.

Change Launcher Icon

The Flutter app comes with a launcher icon. To change it with your custom one, please follow the instructions:

  1. Add flutter_launcher_icons plugin to your project via command line

    1
    
     flutter pub add dev:flutter_launcher_icons 
    

    Or by adding it directly to your pubspec.yaml (don’t forget to check for the latest available version)

    1
    2
    
     dev_dependencies:
       flutter_launcher_icons: ^0.13.1
    
  2. Prepare an icon image and place it in the assets/images folder. Replace the default launcher icon with the new one

    1
    2
    3
    4
    5
    
     flutter_icons:
       android: "launcher_icon"
       ios: true
       remove_alpha_ios: true
       image_path: "assetshttps://img.thingsboard.io/yourIcon.png"
    

    image

  3. In the terminal, execute the following commands:

    1
    2
    3
    
     flutter pub get
            
     flutter pub run flutter_launcher_icons
    

Commands will fetch the dependencies and then run the flutter_launcher_icons script to generate app icons for both Android and iOS platforms.

Build and release an Android version

When preparing a release version of your app, for example, for publishing it on the Google Play, follow the “Build and release an Android app” article.

Doc info icon

Improtant notice: While preparing the app for release, for example, when building an app bundle, you must provide —-no-tree-shake-icons flag to your build command:

1
   flutter build appbundle --no-tree-shake-icons

   

Change iOS Bundle Name and Identifier

To change the bundle name and identifier for iOS, follow these steps:

  1. Open Info-Release.plist located in ios/Runner directory. Note: there is also Info-Debug.plist which is used for debugging purposes only

    image

  2. Update CFBundleName key to the desired name for your app

    1
    2
    
    <key>CFBundleName</key>
    <string>YourAppName</string>
    
  3. Update the CFBundleIdentifier key to your bundle identifier:

    1
    2
    
    <key>CFBundleIdentifier</key>
    <string>org.yourappname.app</string> 
    

Build and release an iOS version

When preparing a release version of your app for publishing it on the App Store and TestFlight, follow the “Build and release an iOS app” article.

Doc info icon

Improtant notice: While preparing the app for release, for example, when producing a build archive, you must provide —-no-tree-shake-icons flag to your build command:

1
   flutter build ipa --no-tree-shake-icons