AyeT Studios React Native wrapper for publisher SDK
npm install ayetsdk
This package allows integration a web offerwall in a react native application effortlessly.
You can check out our example app here.
ayetsdk package to your react native project:sh
$ npm i ayetsdk
$ npm i --save react-native-webview
`For additional platform specific setup steps that might be required, please refer to react-native webview.
$3
`javascript
import { AyetOfferwall } from "ayetsdk";
`When rendering the
AyetOfferwall component, a userId and an adslotId has to be passed.
The userId should be a unique, persistent identifier (alphanumeric) for the user. An example might be a unique user id or the hashed email address of the user.
adslotId is the id of the web_offerwall adslot created in your publisher dashboard at ayetstudios.com.`javascript
userId="myuser-23374"
adslotId="123"
onClose={onClose}
/>
`The
onClose callback function should be implemented according to your requirements.
A common practice is to navigate back in your router when the onClose callback is triggered.`javascript
const onClose = () => {
// code you want to execute on offerwall close button pressed
};
``