I'm working on a React Native project and i need to set up push notifications on iOS and Android ends using react-native-fcm
,
When i try to get a token it return null in Android and the following error on iOS:
Possible Unhandled Promise Rejection (id: 0):
TypeError: Cannot read property 'requestPermissions' of undefined
TypeError: Cannot read property 'requestPermissions' of undefined
at Object.FCM.requestPermissions (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:143309:27)
at PushNotificationController.componentDidMount$ (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:143144:58)
at tryCatch (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16751:19)
at Generator.invoke [as _invoke] (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16924:24)
at Generator.prototype.(anonymous function) [as next] (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16794:23)
at tryCatch (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16751:19)
at invoke (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16827:22)
at blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:16855:13
at tryCallTwo (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:3524:7)
at doResolve (blob:http://localhost:8081/4a6e4d63-516d-4288-ac74-d1494e78d48f:3688:15)
Thanks for responding and i'm available for further information.