fix ios push notification registration
This commit is contained in:
parent
86eec87b8c
commit
601bd7fb56
3
App.js
3
App.js
@ -135,6 +135,9 @@ class App extends Component {
|
||||
|
||||
if (!device) {
|
||||
this.initNotification()
|
||||
} else {
|
||||
this.setPermission()
|
||||
this.setupNotificationListeners()
|
||||
}
|
||||
|
||||
console.log('app state', appState, device)
|
||||
|
||||
@ -63,6 +63,7 @@ class LoginScreen extends Component {
|
||||
|
||||
if (enabled) {
|
||||
console.log('Notification permission granted.');
|
||||
await messaging().registerDeviceForRemoteMessages();
|
||||
fcmToken = await messaging().getToken();
|
||||
console.log('fcmToken >>>> ', fcmToken)
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user