Mobile SDK

To integrate a mobile app, you normally have to:

  • Transfer business events: send the data from the mobile app code using the Maestra SDK or send them directly to the Maestra API using your server;

  • Integrate push notifications: apply the Maestra SDK to transfer the data.

Maestra SDK

This is a free library for all Maestra clients. You can find the SDK code in open source repositories.

The SDK supports:The SDK does not support:
Push notification integration: monitor tokens and permissions, render push notifications;
Event transfer to Maestra’s API;
* Data collection from Maestra API.
Loyalty program integration;
App or in-app message personalization;
* Widgets with product recommendations cannot be displayed.

The library is available for native iOS and Android apps as well as for Flutter and React Native apps.

AndroidiOS
Languages: Java / Kotlin
Android API 16+
Devices: any
SDK volume: ~ 1.5MB

Documentation
Languages: Objective-C / Swift
iOS 10+
Devices: iPhone, iPad
SDK volume: ~ 3867KB
Xcode 13

Documentation
SDK code

Github repository

Maven central package manager
SDK code

Github repository

Cocoapods package manager
FlutterSDK code
Flutter version: 2+
Languages: Dart 2.12+

Documentation
RN version: 0.60+
JavaScript / TypeScript ES2016+

Documentation
Github repository
Pub.dev package manager
Github repository
NPM package manager

Limitations

Apps are not supported if developed using the following cross-platform technologies:

  • Xamarin;
  • Native Script.

React Native EXPO is not supported.

If your app is built using one of these platforms, consult your integration manager or project manager.

Guaranteed event delivery from Maestra SDK

We have created a special mechanism that guarantees delivery. This mechanism prevents user data that is transferred using the Maestra SDK from getting lost which may happen due to some mobile internet issues.

This mechanism is based on an internal queue:

  • When the executeAsyncOperation method is called, Maestra records data in the SDK storage.

  • The first attempt to send the data to the Maestra API is made immediately for iOS and with a 10-second delay for Android.

    • If successful (status code 200 was returned), Maestra deletes this data from the storage.
    • If an error occurred or the status code 50* is returned, the data is put back into the end of the queue. Maestra will send the data in the background once permitted by the OS.

The guaranteed delivery mechanism has been tested by hundreds of thousands of requests under various conditions. Thus, we can assure that if you need to send some data through the SDK it will be delivered, but with a possible delay.

Restrictions

The SDK has two restrictions for storing unsent data:

  • No more than 10,000 records: if exceeded, older records are deleted;
  • No longer than 6 months in queue: records are deleted after 6 months.

DeviceUUID

Once initialized, Maestra’s SDK creates a DeviceUUID and saves it to persistent memory.

In the next initializations, the SDK fetches this stored value as it is assigned permanently.

A DeviceUUID value is created following this logic:

  • If a relevant advertising ID can be accessed, the Maestra SDK uses it as the device ID and stores it. If a user disables this retrieval, the Maestra SDK operation will not be affected: the value that has already been stored will be used.
  • If such this ID cannot be accessed, iOS will apply a relevant IDFV (Identifier for Vendors), and Android will generate a random UUID v4.

👍

Display the DeviceUUID in your app

We recommend giving users the option to copy DeviceUUIDs of their apps. To do this, you can display this somewhere within the app: e.g. in the Help or About sections. Otherwise, you can add a secret button which, if tapped, copies the DeviceUUID to the clipboard.

This ID will make it easier to search for users using their device in the Administrative settings section.