From dcce8dbe8bd5ff6256ff223fd69db786e2f6f590 Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Tue, 26 Sep 2017 19:41:27 -0400 Subject: [PATCH] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d9ed8341..c1433eff 100644 --- a/README.md +++ b/README.md @@ -316,7 +316,10 @@ FCM.on(FCMEvent.RefreshToken, (token) => { class App extends Component { 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 => { console.log(token) // store fcm token in your server