To help familiarize yourself with our library, the tracking methods, and best practice implementation, it is recommended to download the React Native sample app.
To install the Tealium library for React Native with NPM:
Navigate to the root of your React Native project.
Download and install the tealium-react-native package with the following command:
yarn install tealium-react-native
React Native Autolinking is enabled in version 1.0.7 of the NPM package and is no longer needed to run react-native link if using version 0.60+ of React Native.
Add a reference to Tealium’s Maven repository in your Android project’s root build.gradle file as described in the Android Maven Install documentation. The project dependencies are automatically handled by the Autolinking process.
The Autolinking feature of React Native 0.60+ automatically adds the required CocoaPods dependencies into your iOS application workspace.
To install the pods, run the following commands:
// From your React Native application folder:
cd ios && pod install
In some cases, it’s necessary to enable the clang parameter to allow non-modular includes in the framework modules. To enable the clang parameter:
In Xcode, open the app’s .xcworkspace file and selecting your Pods from the navigator.
Under Targets select the tealium-react-native target, and click the Build Settings tab.
Find and update the following setting under Apple Clang - Language - Modules > Allow Non-modular Includes In Framework Modules: