react-native-ads-package
TypeScript icon, indicating that this package has built-in type declarations

1.2.5 • Public • Published

react-native-ads-package

A custom component for displaying Clever Advertising ads in react-native apps

Installation

npm install react-native-ads-package

Usage

//import the component in the beginning of your file
import CleverAdsWidget from "react-native-ads-package/CleverAdsWidget";

//add the component to the widget tree
<CleverAdsWidget
  scriptId={"INSERT YOUR SCRIPT ID HERE"}
  width={300}
  height={250}
  verbose
  onError={() => {
    console.log("Error do something");
  }}
  alternative={() => {
    console.log("Alternative do sometinhg");
  }}
/>;

Missing dependencies

If you run into issues with missing dependencies you might need to link them using the following commands:

react-native link react-native-device-info
react-native link react-native-webview
react-native link @react-native-async-storage/async-storage

If the errors persist, you can add them to your project directly:

npm install --save react-native-device-info
npm install --save react-native-webview
npm install --save @react-native-async-storage/async-storage

Building for iOS

If you run into issues with iOS dependencies, after building for iOS, run 'pod install' from the iOS folder.

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-ads-package

Weekly Downloads

57

Version

1.2.5

License

ISC

Unpacked Size

20.8 kB

Total Files

14

Last publish

Collaborators

  • clever-development
  • jose.barros