$ npm install react-native-iron-source --save
$ react-native link react-native-iron-source
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-iron-source
and addRNIronSource.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNIronSource.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNIronSourcePackage;
to the imports at the top of the file - Add
new RNIronSourcePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-iron-source' project(':react-native-iron-source').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-iron-source/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-iron-source')
- Download the iOS SDK fromIronsrc.com
- Unzip and rename the directory to
IronSourceSDK
- Copy the SDK to
~/Documents/IronSourceSDK
- Drag the
IronSource.framework
to your react native target build phases from the~/Documents/IronSourceSDK
directory - Add
~/Documents/IronSourceSDK
to your target's Framework Search Paths in Build Settings
See the ExampleApp