Commit dcce8dbe authored by Libin Lu's avatar Libin Lu Committed by GitHub

Update README.md

parent 9dc2f8c8
...@@ -316,7 +316,10 @@ FCM.on(FCMEvent.RefreshToken, (token) => { ...@@ -316,7 +316,10 @@ FCM.on(FCMEvent.RefreshToken, (token) => {
class App extends Component { class App extends Component {
componentDidMount() { componentDidMount() {
FCM.requestPermissions().then(()=>console.log('granted')).catch(()=>console.log('user rejected')); // for iOS // iOS: show permission prompt for the first call. later just check permission in user settings
// Android: check permission in user settings
FCM.requestPermissions().then(()=>console.log('granted')).catch(()=>console.log('notification permission rejected'));
FCM.getFCMToken().then(token => { FCM.getFCMToken().then(token => {
console.log(token) console.log(token)
// store fcm token in your server // store fcm token in your server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment