Closed feliperivero99 closed 4 years ago
The warning bellow is expected, as the plugin's initialization is delayed on purpose to avoid deadlock issues with Watchdog.
The default Firebase app has not yet been configured. Add `[FIRApp configure];` (`FirebaseApp.configure()` in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
Did you wrap the calls to this.fcm
or window['FCMPlugin']
on a platform.ready().then(() => { //* ... *// })
?
I also recommend to, on facing an error, to try to upgrade to last version, or at least later minor version, as there are many small fixes for corner cases that you might also face.
If after upgrading to v6.4.3, or v7.0.0-beta.2 (for a better ionic support), you still see the same issues, please share a hello world application and list the interactions that you performed that led to the bug.
Hello, I will downloaded the new plugin version.
Did you wrap the calls to this.fcm or window['FCMPlugin'] on a platform.ready().then(() => { // ... // })?
Yes I did. All my calls to the FCM plugin, are inside platform.ready().then(() =>.
On the other hand, I have been testing the application. I have noticed the following. Sometimes works and another times dont work.
Looking into the logs I noticed the APNS token sometimes is generated and sometines it doesnt.
Initializing the application I see this in the logs
2020-06-12 17:52:14.127396-0400 PinFamily[1931:1674476] Device FCM Token: [redacted]
2020-06-12 17:52:14.127396-0400 PinFamily[1931:1674476] Device APNS Token: [redacted]
In this case I got the firebase notifications, perfectly. But when I compiled and install again, the FCM token is created but not the APNS token.
Only this line appears:
2020-06-12 17:52:14.127396-0400 PinFamily[1931:1674476] Device FCM Token: [redacted]
And I dont received any firebase notifications.
I have to compile and reinstall the app, several times until the APNS token is created again, and I can received again firebase notification.
I added this:
window['FCMPlugin'].getAPNSToken(
function(token) {
console.info("Retrieved token APNS: "+token)
},
function(error) {
console.error(error);
}
);
But it doesn't seem to work.
Any ideas??
Please share a hello world application that I can use to debug.
Issue closed due to inactivity.
I am working with IONIC 4 developing an app.
I was receiving messages via firebase fine, the functionality was working perfect in IOS, until the following error started to appear.
I was receiving messages normally. I made some changes, in the code, I recompiled in IOS. I dont find solution:
These are my plugins.
This is my code, inside app.component.ts:
These are the logs: