Mobile Protect SDK for Flutter (pub.dev)

The Mobile Protect SDK has a dedicated integration for iOS and Android apps built using Flutter. This document will take you through the steps to integrate the SDK into your build system. For other guides, check out Mobile Protect Installation Guides

To fetch the Mobile Protect SDK via Flutter, an API key is needed. If you haven’t received an API key for Mobile Protect, please contact us.

Preface

This will involve some steps on the Flutter side as well as some steps on both iOS and Android.

Flutter Integration

Add mobile_protect as a dependency in your pubspec.yaml file.

$ flutter pub add mobile_protect

The project’s pubspec.yaml should then contain the following entry:

dependencies: mobile_protect: ^22.3.7

See Package versioning for deciding if pinning the versions is the best practice for your project.

Android Integration

  1. Follow the steps on Mobile Protect SDK for Android via Maven

  2. In the Android project, create the xml directory (flutter_app/android/app/src/main/res/xml) if it does not exist. Then, copy the mobileprotect.xml config file into the xml resources folder.

iOS Integration

  1. Follow step 1 on Mobile Protect SDK for iOS via CocoaPods (cocoapods.org)

  2. In the iOS project copy the MobileProtect.plist config file into the Flutter project's Xcode project, place it in the project root. See Add Existing Files and Folders to a Project for instructions.

Results

Please visit https://www.securetheorem.com/mobile/protect to see the list of your apps and the state of protection, along with the individual protection item details.