Mobile SDKPromotion
React Native Promotion
This guide describes how to manage promotions in a React Native application using the NBase AdStage SDK.
1. Overview
- Promotions display and track marketing campaigns, banners, and popups within your app.
- The AdStage SDK supports querying, opening (displaying), and tracking promotions.
2. Quick start
3. Promotion features
3.1 Open a promotion
Open a promotion that matches specific conditions and display it to the user.
3.2 Get promotion list
Fetch available promotions and render them in your app.
4. Troubleshooting
Promotion not displayed
- Ensure native initialization (e.g.,
AdStageInitializer.load()) is completed - Check network connectivity
- Verify promotions meeting the conditions are registered on the server
Promotion list returns an empty array
- Verify
bannerTypeandtargetAudience - Check server registration and API response logs
Images not loading
- Ensure image URLs use HTTPS
- Android: verify network security config
- iOS: verify ATS (App Transport Security) settings
WebView/browser does not open
- Check
Linking.canOpenURL()first - Validate URL format and that a browser app exists on the device
Build errors
- Re-run
npm install && cd ios && pod install - Clear React Native cache:
npx react-native start --reset-cache - Android clean build:
cd android && ./gradlew clean

