Here are some common issues you might encounter when integrating the Mapp Intelligence React Native SDK, along with suggested solutions:
Issue 1: CocoaPods Installation Failure on iOS
Problem: Running pod install fails with an error, preventing the installation of necessary iOS dependencies.
Solution:
Ensure that CocoaPods is installed correctly by running
sudo gem install cocoapods. If your project manages CocoaPods with Bundler, usebundle exec pod install.Try clearing the CocoaPods cache by running
pod cache clean --all.Delete the
Podfile.lockandPods/directory from your iOS project and runpod installagain.Check that your iOS deployment target is at least 15.1 and that you use Xcode 16.1 or later.
Issue 2: Android Build Fails with SDK or Kotlin Errors
Problem: The Android build fails with SDK compatibility errors, or with Kotlin metadata errors such as an incompatible Kotlin version.
Solution:
Check the root
android/build.gradle:minSdkVersionmust be at least 24,compileSdkVersionandtargetSdkVersionat least 36.Make sure the app uses a Kotlin 2.3 compiler. React Native's default Kotlin version is too old for the Mapp Android SDK.
Ensure that your JDK version is 21.
If you use a custom Gradle setup, make sure it provides the
com.android.library,org.jetbrains.kotlin.android, andcom.facebook.reactplugins.If you recently updated the SDK, clean your project by running
./gradlew cleanand rebuild.
Issue 3: Initialization Fails with Network Errors
Problem: The SDK fails to initialize due to network issues, such as an inability to reach the tracking domain.
Solution:
Verify that the
TRACK_DOMAINURL is correct and accessible from your development environment.Check your network connection and any firewall settings that might block outgoing requests.
Ensure that the app has the necessary permissions to access the internet on both Android and iOS platforms.
Issue 4: Data Not Appearing in Mapp
Problem: Tracking data does not appear in Mapp Intelligence.
Solution:
Ensure that the
TRACK_IDSandTRACK_DOMAINare correctly configured during initialization.Check if tracking requests are being sent by inspecting network logs or using a debugging proxy.
Verify that the
initWithConfigurationmethod has been called successfully and thatisInitialized()returnstrue.Be aware that data updates in Mapp Intelligence occur on an hourly basis. This means that there may be a delay of up to one hour before newly tracked data appears in the dashboard. If data is not visible immediately, please allow some time before checking again.
Issue 5: Changes Not Applied After Upgrading
Problem: After upgrading the SDK, the app still behaves like the old version, or the native module cannot be found.
Solution: A Metro reload does not update native code. Reinstall the iOS pods, then rebuild and reinstall both native apps. In Expo apps, run npx expo prebuild --clean before rebuilding the development build.
Issue 6: SDK Does Not Work in Expo Go
Problem: The app runs in Expo Go, but the SDK does not load or tracking calls fail.
Solution: Expo Go is not supported, because the SDK contains native code. Create a development build with expo-dev-client and open that app instead. See Expo Integration Guide.
Issue 7: Expo Prebuild Fails with a Groovy Error
Problem: npx expo prebuild stops with the message that the Mapp Expo integration requires a Groovy root build.gradle.
Solution: The config plugin only supports a Groovy root build.gradle, which is the Expo default. If your project uses a Kotlin DSL build script, configure the Kotlin Gradle plugin version in that script yourself.