react-native-iron-source
Getting started
$ npm install react-native-iron-source --save
Mostly automatic installation
$ react-native link react-native-iron-source
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-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
)<
Android
- 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')
Windows
- In Visual Studio add the
RNIronSource.sln
innode_modules/react-native-iron-source/windows/RNIronSource.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Iron.Source.RNIronSource;
to the usings at the top of the file - Add
new RNIronSourcePackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNIronSource from 'react-native-iron-source';
// TODO: What to do with the module?
RNIronSource;