evollu / react-native-fcm

react native module for firebase cloud messaging and local notification
MIT License
1.73k stars 681 forks source link

FCM.requestPermission not working in production #1081

Open wmonecke opened 5 years ago

wmonecke commented 5 years ago

"react-native": "0.47.1", "react-native-fcm": "^14.0.1",

When in development the permission pop-up does appear.

However, in production when I initialize the App and ask for permission like so:

class App extends Component {
  componentWillMount() {

    FCM.requestPermissions();
  }

...

nothing happens. Do I need to specify the parameters?

EDIT: Pop up wont appear on Android. Does appear on iOS.

softmixt commented 5 years ago

use FCM.requestPermission(); instead of FCM.requestPermissions();