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) {
|
if (!device) {
|
||||||
this.initNotification()
|
this.initNotification()
|
||||||
|
} else {
|
||||||
|
this.setPermission()
|
||||||
|
this.setupNotificationListeners()
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('app state', appState, device)
|
console.log('app state', appState, device)
|
||||||
|
|||||||
@ -63,6 +63,7 @@ class LoginScreen extends Component {
|
|||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
console.log('Notification permission granted.');
|
console.log('Notification permission granted.');
|
||||||
|
await messaging().registerDeviceForRemoteMessages();
|
||||||
fcmToken = await messaging().getToken();
|
fcmToken = await messaging().getToken();
|
||||||
console.log('fcmToken >>>> ', fcmToken)
|
console.log('fcmToken >>>> ', fcmToken)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user