Overview
While you can configure your application’s functionality provided by the SDK, you can also extend the functionality of your mobile application with plugins you’ve already created.
We support plugins built in Flutter.
Android
The MXmobile SDK supports embedding modules using Option A — Depend on the Android Archive (AAR):
- In the root of the Flutter module, run
flutter build aar --no-debug --no-profile
. - Add the following to
proj.android/app/build.gradle
:
build.gradle
1
2
3
4
5
6
7
8
9
String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
repositories {
maven {
url '<path_to_local_maven_repository>'
}
maven {
url "$storageUrl/download.flutter.io"
}
}
- Add the following to the
dependencies
section in the samebuild.gradle
file:
build.gradle
1
releaseImplementation '<flutter_module_package_name_found_in_pubspec.yaml_(flutter.module.androidPackage)>:flutter:<module_version>:<release_or_debug>'
- Update the
compileSdkVersion
&targetSdkVersion
from 30 to 31 inbuild.gradle
. - Add
android:exported="true"
to the<activity ...>
and<receiver ...>
tags. - In
conanfile.py
, addmxflutter-Android/3.3.2-0@mx/stable
to therequires
list. This version may change over time, particularly the patch number. Contact MX for the correct version number. - In
institutions/mxmobile/config/configuration.yaml
, sethas_flutter_plugin
totrue
. - Run
./setup
, then./generate
- Contact MX to help launch your Flutter module from a custom tile, a money movement component, the Other Resources card on the dashboard panel, or the main menu.
iOS
The MXmobile SDK supports embedding modules using Option B - Embed frameworks in Xcode:
- In the root of your Flutter module, run
flutter build ios-framework --no-debug --no-profile
. You can also use... --no-release --no-profile
to build a debuggable/attachable Flutter engine, but note that debuggable flutter engines can only be run from Xcode. - Navigate to
<flutter_module_root>/build/ios/framework/Release/
or<flutter_module_root>/build/ios/framework/Debug/
if you intend to build a debuggable Flutter engine & module. - Copy all xcframework files to the same folder as
mxmobile.xcodeproj
. - Open
mxmobile.xcodeproj
in Xcode and go to the General tab for the MXmobile iOS target. Find the section labelled Frameworks, Libraries, and Embedded Content. - Select +, then Add Other…. In the dropdown menu, select Add Files …. Select all xcframework files (including
Flutter.xcframework
), then select Open. Make sure all xcframework files have the Embed & Sign option except forFlutterPluginRegistrant.xcframework
, as it is a static library that only needs to be linked against. - If you intend to use
flutter attach
to attach to a debuggable Flutter engine, add the following toInfo.plist
:
Info.plist
1
2
3
4
<key>NSBonjourServices</key>
<array>
<string>_dartobservatory._tcp</string>
</array>
- In
institutions/mxmobile/config/configuration.yaml
, sethas_flutter_plugin
totrue
. - Run
./setup
, then./generate
. - Contact MX to help launch your Flutter module from a custom tile, a money movement component, the Other Resources card on the dashboard panel, or the main menu.