constructor(
private pushNotificationService: PushNotificationService
) {
this.platform.ready().then(() => {
this.requestLocalNotificationPermission();
console.log('
this.initPushNotifications();
});
}
initPushNotifications() {
console.log('
PushNotifications.requestPermissions().then(result => {
console.log('
if (result.receive === 'granted') {
console.log('
PushNotifications.register();
//
FirebaseMessaging.getToken().then(result => {
console.log('
alert('Manual FCM Token:\n' + result.token);
}).catch(err => {
console.error('
});
} else {
console.warn('
}
});
console.log('
PushNotifications.addListener('registration', (token: Token) => {
console.log('
console.log('
alert('FCM Token:\n' + token.value);
});
PushNotifications.addListener('registrationError', err => {
console.error('
});
PushNotifications.addListener('pushNotificationReceived', (notification: PushNotificationSchema) => {
console.log('
});
PushNotifications.addListener('pushNotificationActionPerformed', (action: ActionPerformed) => {
console.log('
});
}
< /code>
Когда приложение запускается (запускается с Xcode), я получаю подсказку. Но журнал показывает, что в нем было отказано, хотя я нажал на него. Это журналы консоли: < /p>
11.7.0 - [Firebasemessaging] , включенные прокси -серверы с устранением удаленных уведомлений. Если вы предпочитаете вручную интегрировать обмен сообщениями Firebase,
добавьте «FirebaseappdelegateProxyenabled» в info.plist и установите его
no. Следуйте инструкциям по адресу:
https://firebase.google.com/docs/cloud- ... _messaging
, чтобы обеспечить правильную интеграцию.
11.7.0-[Firebaseanalytics] [i-acs023007] Analyttics v.11.7.0.7.0.0.0.0.7.0.0.0.7.0.7.0.7.0.11. />11.7.0 -[firebaseanalytics] , чтобы включить регистрацию отладки, установите следующий аргумент приложения: -firanalyticsdebugenabled
11.7.0 -[Firebaseanalytics] . Некоторые функции не будут функционировать должным образом. Узнайте
больше AT, не удалось создать расширение песочницы для
'/var/containers/bundle/application/d2fb505f-f5ff-4f26-bd91-b7ae828812e3/app.app'
keybodeplugin: Режим изменения размера-нативное push-уведомление
offriding extrding. Конденсатор: // localhost ...
11.7.0 - [Firebaseanalytics] нет ожидающего снижения для активации. Имя SDK: APP_MEASUREMEMENT
11.7.0 - [Firebaseanalytics] Аналитическая сборник Call Analytics.logevent (AnalyticSeventScreenView,
Параметры: [...]), чтобы войти в систему события просмотра экрана. Чтобы отключить автоматическую отчетность
, установите флаг FirebaseautomaticsCreenReportingEnabled
no (boolean) в info.plist
84505967
84505968
к нативному -> Pushnotenerations AddListener 84505970
getResizemode 84505974
Native -> Настройки. AddListener 84505976
getResizemode 84505977
{"получить": "отрицание"}
{"ate": "denied"
to js {"display": "предоставлено"}
предоставлено < /p>
< /blockquote>
Я не знаю, что идет. Моя конфигурация выглядит правильно, что я могу сказать.
Подробнее здесь: https://stackoverflow.com/questions/796 ... er-accepts
Мобильная версия