Hi,
I’ve been fighting with notifications in an ionic v1 app for most of a month. I’m using cordova-plugin-fcm-with-dependecy-updated to receive notifications. I’m receiving notifications on the device for both topics and single device messages. However, I don’t get the handoff from the plugin to my code. I’m doing the FCMPlugin set-up stuff in ionic.Platform.ready(). Like this:
function setupNotifications() {
console.log( "Initializing Notifications" )
FCMPlugin.subscribeToTopic('marketing').then(function (arg)
{
console.log( `HERE HERE HERE ${arg}`);
});
//
FCMPlugin.getToken(
function (token) {
alert('Token: ' + token);
console.log('Token: ' + token);
},
function (err) {
alert('error retrieving token: ' + token);
console.log('error retrieving token: ' + err);
});
//
FCMPlugin.onNotification().subscribe(data => {
if(data.wasTapped){
console.log("Received in background");
} else {
console.log("Received in foreground");
}});
//
FCMPlugin.onTokenRefresh().subscribe(token => {
console.log( "TOKEN REFRESH");
});
None of my code ever gets called. Is there a way to trace it from the ObjC code into what it’s trying to do instead of calling my code?