react-native-adtag

Bridge to access to the RGPD methods of the Adtag SDK

Usage no npm install needed!

<script type="module">
  import reactNativeAdtag from 'https://cdn.skypack.dev/react-native-adtag';
</script>

README

react-native-adtag

Update the version

Android

Update the Adtag SDK version in the build.gradle. Take the time to update the project on the last gradle version and on the last android plugin version.

iOs

Update the Adtag SDK version in the Podfile. Take the time to check that the swift version defines in the Podfile matches the on of the SDK

React

Check if it is usefull to update the reaction version (package.json)

Publish

  • run '''npm version 7.5.0''' to publish the 7.5 version of the plugin
  • Go on jenkins.connecthings.com
  • Select the "TOUS" tab
  • Click on deploy_react-native-adtag

Update the demo project

  • Next update the react-app-demo with the last plugin version
  • In the demo project, update the version of the SDK for the demo Android App and the demo iOs App.

Getting started

$ npm install react-native-adtag --save

Mostly automatic installation

$ react-native link react-native-adtag

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-adtag and add RNAdtag.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNAdtag.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNAdtagPackage; to the imports at the top of the file
  • Add new RNAdtagPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-adtag'
    project(':react-native-adtag').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-adtag/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-adtag')
    

Windows

Read it! :D

  1. In Visual Studio add the RNAdtag.sln in node_modules/react-native-adtag/windows/RNAdtag.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Adtag.RNAdtag; to the usings at the top of the file
  • Add new RNAdtagPackage() to the List<IReactPackage> returned by the Packages method

Usage

import RNAdtag from 'react-native-adtag';

// TODO: What to do with the module?
RNAdtag;