React Native SDK for Layers Analytics with SKAN and ATT support
npm install @layers/react-nativeReact Native SDK for Layers Analytics with ATT/SKAN support, deep link helpers, network connectors, and an Expo config plugin.
```
npm install @layers/react-native @react-native-community/netinfo @react-native-async-storage/async-storageor
pnpm add @layers/react-native @react-native-community/netinfo @react-native-async-storage/async-storage
`ts
import Layers from '@layers/react-native';
await Layers.init({
apiKey: 'your-api-key',
appId: 'your-app-id',
environment: 'production',
enableDebug: __DEV__
});
await Layers.track('app_open');
`
Add to app.json / app.config.js:
`js``
plugins: [
[
'@layers/react-native/plugin',
{ ios: { includeDefaultNetworks: true }, android: { intentFilters: [{ scheme: 'myapp' }] } }
]
];
- Repo: https://github.com/layers/sdks
- Issues: https://github.com/layers/sdks/issues
ISC