React Native Expo integration
This guide helps you to add Apptics SDK with your Expo managed workflow. If you're using React Native bare flow, you can refer to our React Native SDK guide here.
Install Apptics React Native and Apptics Expo config plugin
- Use the below to install the apptics-expo plugin.
Copiednpm install @zoho_apptics/apptics-expo-plugin
- Use the below to install the React Native SDK.
Copiednpm install @zoho_apptics/apptics-react-native
Add configuration files
- Before you can add Zoho Apptics, you need to create a Project and add your app to the Apptics web.
- Download apptics-config.plist and apptics-config.json files for iOS and Android.
- Move both the files in the assets folder in your project's root directory.
Config your app.json
Add the apptics-expo-plugin to your app.json and add the path of apptics-config.json and apptics-config.plist to androidConfigPath and iosConfigPath fields respectively.
Copied[
"@zoho_apptics/apptics-expo-plugin"
{
"androidConfigPath" : "./assets/apptics-config.json",
"iosConfigPath" : "./assets/apptics-config.plist",
"mode" : "development"
}
]
Initialize Apptics SDK
- Initialize Apptics SDK as early as possible in the app lifecycle.
Copiedimport { Apptics } from '@zoho_apptics/apptics-react-native';
React.useEffect(() => {
Apptics.init();
}, []);
Follow the below guides for the next steps.
- Add in-app events - https://www.zoho.com/apptics/resources/SDK/reactnative-in_app_events.html
- Track screens - https://www.zoho.com/apptics/resources/SDK/reactnative-screens.html
- Crash tracking - https://www.zoho.com/apptics/resources/SDK/reactnative-crash-reporting.html
- In-app updates - https://www.zoho.com/apptics/resources/SDK/reactnative-in-app-update.html
- Remote config - https://www.zoho.com/apptics/resources/SDK/reactnative-remote-configuration.html
- Remote logger - https://www.zoho.com/apptics/resources/SDK/reactnative-remote-logger.html