Skip to content

Commit a36c520

Browse files
authored
readme: update example for new api
``` VoipPushNotification.requestPermissions(); // --- optional, you can use another library to request permissions VoipPushNotification.registerVoipToken(); // --- required ```
1 parent fe1f6c7 commit a36c520

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Please refer to [VoIP Best Practices][2].
8080
8181
#### Add RNVoipPushNotification
8282
83+
On RN60+, auto linking with pod file should work. Or you can try below:
84+
85+
8386
##### Option 1: Use [rnpm][3]
8487
8588
```bash
@@ -111,7 +114,8 @@ class MyComponent extends React.Component {
111114
...
112115

113116
componentWillMount() { // or anywhere which is most comfortable and appropriate for you
114-
VoipPushNotification.requestPermissions(); // required
117+
VoipPushNotification.requestPermissions(); // --- optional, you can use another library to request permissions
118+
VoipPushNotification.registerVoipToken(); // --- required
115119

116120
VoipPushNotification.addEventListener('register', (token) => {
117121
// send token to your apn provider server

0 commit comments

Comments
 (0)