react-native-smaato
v1.0.12
Published
Smaato support for **Android** and **iOS**
Readme
react-native-smaato
Smaato support for Android and iOS
Getting started
$ npm install react-native-smaato --save
Mostly automatic installation
$ react-native link react-native-smaato
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-smaatoand addRNSmaato.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNSmaato.ato your project'sBuild Phases➜Link Binary With Libraries - Go to
Podfileand add"SmaatoSDK", "~> 9.0.1" - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import me.jerson.mobile.ads.smaato.RNSmaatoPackage;to the imports at the top of the file - Add
new RNSmaatoPackage()to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-smaato' project(':react-native-smaato').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smaato/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-smaato') - Add
SOMAAndroidSDKX.X.X.jarto yourandroid/app/libs/smaatodir
Usage
import { BannerView } from "react-native-smaato";
<BannerView publisherID={11111} publisherID={22222} adDimension={"default"} />;