Hi Ndihvhuwo,
Yes, you can integrate the Meta (formerly Facebook) SDK into a Mendix Native Mobile application.
However, this requires native React Native integration. It cannot be implemented using a regular Mendix microflow or a web-only JavaScript action.
I recommend the following approach:
The original react-native-fbsdk repository has been archived. Its maintainers recommend using a community-maintained fork:
https://github.com/thebergamo/react-native-fbsdk-next
This wrapper provides access to Meta SDK functionality, including App Events.
Install the compatible React Native package in your Native Template.
Then declare it in the JavaScript Action's native dependency declaration file (.js.json).
For example:
{
"nativeDependencies": {
"react-native-fbsdk-next": "EXACT_COMPATIBLE_VERSION"
}
}Use the exact package version compatible with your Mendix Native Template and React Native version.
Follow the package's native installation instructions for both platforms.
You need to configure:
Meta App ID.
Android application configuration and manifest metadata.
iOS application configuration and URL schemes where required.
Required native SDK initialization.
App Events and automatic event logging settings.
Make sure the configuration uses the correct Meta App ID for your application.
Create JavaScript Actions to expose the required Meta SDK functions to Mendix nanoflows.
For example:
InitializeMetaSDK
LogMetaEvent
LogPurchaseEvent
TrackAppActivation
Use the wrapper's supported APIs to implement these actions.
Meta's native SDK supports automatic app event logging and app activation tracking when configured correctly.
For example, the iOS SDK documents that app activation can record app activation and first-install events used for app acquisition measurement.
Avoid manually logging the same events if automatic logging is already enabled, as this can result in duplicate events.
Once the dependencies and native configurations are complete:
Generate/configure the Native Template.
Build a custom Android developer app.
Build a custom iOS developer app.
Test the integration on real devices.
Verify the events in Meta Events Manager before distributing the production application.
A standard Make It Native app will not automatically contain your newly added native SDK dependency.
Mendix Native Mobile App
|
v
Nanoflow
|
v
JavaScript Actions
|
v
React Native Meta SDK
|
v
Native Meta SDK
Android / iOS
|
v
Meta App Events
|
v
Meta Events ManagerImportant: App install attribution and app activation tracking are subject to Meta configuration, platform privacy permissions, and the applicable Android/iOS attribution mechanisms. Installing the SDK alone does not guarantee attribution for every install.
Official references:
Hope this helps! If you find this answer helpful, please mark it as the accepted answer.