0.2.1 • Published 4 years ago
react-native-yandex-ads v0.2.1
react-native-yandex-ads
ReactNative port for Yandex Mobile Ads SDK
Installation
npm install react-native-yandex-ads --save
oryarn add react-native-yandex-ads
- If React Native version <= 0.59: \
react-native link react-native-yandex-ads
- iOS only
- if
${PROJECT_DIR}/ios/Podfile
exists: \npx pod-install
- if
${PROJECT_DIR}/ios/Podfile
don't exists: \ Setup Yandex Mobile Ads SDK and placed frameworks at${PROJECT_DIR}/ios/Frameworks
Usage
import YandexAds from "react-native-yandex-ads"
YandexAds.showInterstitialAd("R-M-DEMO-400x240-context")
YandexAds.showRewardedAd("R-M-DEMO-rewarded-client-side-rtb", "some-user-id")
YandexAds.addInterstitialEventListener((event) => console.log(event))
YandexAds.addRewardedEventListener((event) => console.log(event))
For comprehensive usage example see example/src/App.tsx
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT