React Native module for fetching attribution token from AdServices framework on iOS
npm install react-native-attribution-tokenReact Native module for fetching attribution token on iOS
``sh`
npm install react-native-attribution-token
`js
import { getAttributionToken } from 'react-native-attribution-token';
// ...
const getToken = async () => {
try {
const token = await getAttributionToken();
console.log(token);
} catch (error) {
console.log(error);
}
};
``
#### getAttributionToken()
Fetches the attribution token from the AdServices framework on iOS. Returns a promise that resolves to the attribution token.
On Android, this method will return a promise that resolves to null.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
---
Made with create-react-native-library