- Download dependencies
yarn add react-native-push-link
# or
npm install react-native-push-link --save
and
- Create or Edit file .env api Key
PUSH_LINK_API_KEY=your-api-key
react-native pushlink-prepare-project
- Required .env [PUSH_LINK_API_KEY=your-api-key] in project root
react-native pushlink-publish-apk
- Required .env [PUSH_LINK_API_KEY=your-api-key] in project root
react-native pushlink-download-apk
cd ./example
yarn start
yarn android
Example Project React Native - PushLink
...
import PushLink from 'react-native-push-link';
...
componentDidMount = () => {
const deviceId = await PushLink.getDeviceId().catch((e) => e);
const pushLinkStarted = await PushLink.start(PUSH_LINK_API_KEY, deviceId).catch((e) => e);
};
- Open file
./node_modules/react-native-push-link/index.d.ts
and see all possibilities of using the API
- Use
adb logcat | grep PUSHLINK
to check what's going on. If you can't solve the problem by yourself, please contact the support.
Always feel free to drop a line to support at pushlink dot com or visit our support.
Users are always welcome to contribute with issues and pull requests