Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Libin Lu authored Sep 26, 2017
1 parent 9dc2f8c commit dcce8db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dcce8db

Please sign in to comment.