From a36c520f64eead71e3dbd42170bb5e3a386b3c6c Mon Sep 17 00:00:00 2001 From: zxcpoiu Date: Sat, 28 Dec 2019 00:13:52 +0800 Subject: [PATCH] readme: update example for new api ``` VoipPushNotification.requestPermissions(); // --- optional, you can use another library to request permissions VoipPushNotification.registerVoipToken(); // --- required ``` --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 57dc36b..aa42d4f 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,9 @@ Please refer to [VoIP Best Practices][2]. #### Add RNVoipPushNotification +On RN60+, auto linking with pod file should work. Or you can try below: + + ##### Option 1: Use [rnpm][3] ```bash @@ -111,7 +114,8 @@ class MyComponent extends React.Component { ... componentWillMount() { // or anywhere which is most comfortable and appropriate for you - VoipPushNotification.requestPermissions(); // required + VoipPushNotification.requestPermissions(); // --- optional, you can use another library to request permissions + VoipPushNotification.registerVoipToken(); // --- required VoipPushNotification.addEventListener('register', (token) => { // send token to your apn provider server