Skip to content

Repository files navigation

react-native-unity-ads-module

react-native-unity-ads-module enables you to show Unity ADS in your React Native based app using Unity Ads SDK 2.0 (Android, iOS).

Author

react-native-unity-ads-module is Forked from react-native-unity-ads created by Gökhan Sarı.

## Installation

Quick

For quick installation, you can install the npm package and then let react-native do the hard work.

$ npm install --save react-native-unity-ads-module
$ react-native link

Manual

Android

android/settings.gradle
include ':app', ':react-native-unity-ads-module'
project(':react-native-unity-ads-module').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-unity-ads-module/android')
android/app/build.gradle
dependencies {
compile project(':react-native-unity-ads-module')
...
}
android/app/src/main/java/YOUR/PACKAGE/PATH/MainApplication.java
// Add after other com.facebook importsimportcom.unityads.RNUnityAdsPackage;
...
@OverrideprotectedList<ReactPackage> getPackages() {
returnArrays.<ReactPackage>asList(
newMainReactPackage(),
// The part that comes from your other native modules goes here.newRNUnityAdsModulePackage()
);
}
...

Usage

Hopefully, a nice API documentation will be available soon, but until then, you can see the example application RNUnityAdsExample.

License

This library is made available under Apache License 2.0.

About

React Native module for display ads from Unity Ads (uses the latest SDK V2.1.2).

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages