Getting Started
Requirements
- React Native: 0.70+
- Node.js: 18+
- TypeScript: 4.0+ (optional but recommended)
- iOS: iOS 15.0+
- Android: API level 24+ (Android 7.0)
Upgrading from v3? Version 4.0.0 raises the minimum versions to iOS 15.0 and Android API 24. Every v3 call works unchanged. See Migration Notes.
Install the SDK
Install the package using npm or yarn:Install Peer Dependencies
The SDK requires five peer dependencies. Install them alongside it:react-native-safe-area-context is optional. When your app has it, in-app messages sit exactly clear of the notch and the home indicator.
iOS Setup
Navigate to the iOS folder and install pods:ios/Podfile:
IPHONEOS_DEPLOYMENT_TARGET to 15.0 for your app target in Xcode as well.
Android Setup
EnsureINTERNET permission is declared in android/app/src/main/AndroidManifest.xml:
android/app/build.gradle should have minimum SDK version 24:
ProGuard Configuration (Android)
If using ProGuard, add toandroid/app/proguard-rules.pro:
Metro Configuration
Add to yourmetro.config.js:
Verify Installation
Import the package in your code to verify:Troubleshooting
Common Issues
Widget Not Displaying
Widget Not Displaying
Symptoms: Profile widget doesn’t appear when calledSolutions:
- Ensure
react-native-webviewis properly installed and linked - Check that the API key is valid and the customer is initialized
- Verify network connectivity
- Check console for error messages
Build Errors on iOS
Build Errors on iOS
Symptoms: Pod installation or build failuresSolutions:
- Clean build folder:
cd ios && xcodebuild clean - Reinstall pods:
cd ios && pod install --repo-update - Ensure iOS deployment target is at least 15.0
- Try
pod deintegrate && pod install
Build Errors on Android
Build Errors on Android
Symptoms: Gradle build failuresSolutions:
- Clean gradle cache:
cd android && ./gradlew clean - Verify minimum SDK version is 24
- Check React Native version compatibility
- Ensure all dependencies are properly installed
TypeScript Errors
TypeScript Errors
Symptoms: Type definition errorsSolutions:
- Ensure TypeScript version is 4.0+
- Run
npx tsc --noEmitto check type errors - Verify type definitions are imported correctly
- Clear TypeScript cache if needed
Metro Bundler Issues
Metro Bundler Issues
Symptoms: Asset loading errors or bundling failuresSolutions:
- Clear Metro cache:
npx react-native start --reset-cache - Ensure Metro configuration includes necessary asset extensions
- Check
metro.config.jsconfiguration
Debug Logging
For detailed debug logging during development:[GameballIAM]. See In-App Messaging.