Build and release ThingsBoard Mobile Application
Build and release the ThingsBoard mobile app version 1.7 or later for iOS and Android.
Before you start
Section titled “Before you start”This guide assumes you have already:
- Cloned the app source code and created an app bundle in the Mobile Center, as described in the Getting started guide.
- Placed the downloaded
configs.jsonfile in the project root. - Installed the Flutter version that matches your app version. It is listed in the compatibility matrix and in the
.fvmrcfile in the project root.
If you need to change any settings, update them in the Mobile Center, re-download configs.json, and replace the file in your project.
App ID, name and version
Section titled “App ID, name and version”You don’t need to rename the app in the source code. The build reads the app ID and name from configs.json:
| Platform | App ID | App name |
|---|---|---|
| Android | androidApplicationId (the application ID) |
androidApplicationName |
| iOS | iosApplicationId (the bundle ID) |
iosApplicationName |
These values come from the application you added to the bundle in the Mobile Center. Without --dart-define-from-file configs.json, the build falls back to the default ThingsBoard app ID, which you can’t publish under your account.
The version shown in the stores comes from the version field in pubspec.yaml (for example, 1.9.1+16 is version 1.9.1, build 16). App Store Connect and Google Play reject an upload whose build number was already used, so raise it for every upload, either in pubspec.yaml or with the --build-name and --build-number build options.
iOS — build and release
Section titled “iOS — build and release”Follow the official Build and release an iOS app guide to prepare your app for the App Store and TestFlight.
Configure signing
Section titled “Configure signing”- Run any iOS build once, for example
flutter build ios --no-codesign --no-tree-shake-icons --dart-define-from-file configs.json. It generatesios/Flutter/AppConfig.xcconfigwith the bundle ID fromconfigs.json, so Xcode shows your bundle ID instead of the default one. - Open
ios/Runner.xcworkspacein Xcode (notRunner.xcodeproj). - Select the Runner target, open the Signing & Capabilities tab, and select your Team.
Build the archive
Section titled “Build the archive”flutter build ipa --no-tree-shake-icons --dart-define-from-file configs.jsonThe .ipa file is written to build/ios/ipa/. Upload it to App Store Connect with the Transporter app, or open the archive from build/ios/archive/ in Xcode and click Distribute App.
Android — build and release
Section titled “Android — build and release”Follow the official Build and release an Android app guide to prepare your app for Google Play.
flutter build appbundle --no-tree-shake-icons --dart-define-from-file configs.jsonThe app bundle is written to build/app/outputs/bundle/release/app-release.aab. Upload it to the Google Play Console.
After the first upload, copy the SHA-256 certificate fingerprint of the app signing key from the Google Play Console (Release → Setup → App Integrity → App Signing) to the Android application in your Mobile Center bundle. App links and QR code login need it.
Build flags
Section titled “Build flags”--no-tree-shake-icons — prevents Flutter from removing icons that the code doesn’t reference directly. The app picks some icons at runtime by name: the icons set in the Mobile Center layout and in notification templates. Without this flag, those icons are missing or shown as empty boxes.
--dart-define-from-file configs.json — loads the mobile app configuration from the JSON file downloaded from the Mobile Center: the server address, app ID and name, app secrets and app links settings. Without it, the build uses the default ThingsBoard settings.
Was this helpful?