Apple Search Ads Attribution API for React Native
Requirements
Getting started
$ yarn add @crowdnautics/react-native-apple-search-ads-attribution
Additional Required Manual installation
iOS
- In XCode, follow the instructions to add the iAd framework
- Add the line
pod 'RNAppleAdsAttribution', :path => '../node_modules/@crowdnautics/react-native-apple-search-ads-attribution/RNAppleAdsAttribution.podspec'
to your Podfile
cd ios && pod install && cd ..
- Run your project
Usage
import AppleAdsAttribution from '@crowdnautics/react-native-apple-search-ads-attribution';
let attributionData = AppleAdsAttribution.getAttributionData();
Documentation
getAttributionData()
Gets install attribution data from the Apple Search Ads Attribution API.
Examples
AppleAdsAttribution.getAttributionData().then(attributionData => {
console.log(attributionData);
});
Notes
If you receive an empty object, wait a few seconds and try again
Test values (mirroring the example above) will be sent when using a iOS simulator