0.2.1 • Published 9 months ago

react-native-admanager-mobile-ads v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

react-native-admanager-mobile-ads

Supports iOS and Android

Google Mobile Ads Custom Native Formats wrapper

Installation

npm install react-native-admanager-mobile-ads

Usage

This package is for extreme flexibility. Its a wrapper around Google Ad Manager - Mobile Ads SDK for ios and android. It tries to pass the core functionality to JS

import {AdManager, useCustomNativeAd, useVisibleCustomNativeAd} from 'react-native-admanager-mobile-ads';

const adLoader = new AdQueueLoader<CustomAdFormat, CustomTargeting>(adSpecification, {
      length: 1,
    });

const {
    id,
    ad,
    state: adState,
    display,
    renew,
    impression,
    click,
    outdated,
    targeting,
    tracker,
  } = useCustomNativeAd(adLoader);


// ...

Testing

New Arch

iOS

Navigate to example/package.json and set RCT_NEW_ARCH_ENABLED=1 in pods script

then run

yarn clean
yarn
# and then
yarn example ios

Android

Navigate to example/android/gradle.properties and set newArchEnabled=true then run

yarn clean
yarn
# and then
yarn example android
generate Artifacts
cd ./example/android
./gradlew generateCodegenArtifactsFromSchema
cd ../../
yarn example android

# or
cd ./example/android && ./gradlew generateCodegenArtifactsFromSchema && cd ../../ && yarn example android

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.2.1

9 months ago

0.2.0

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago