Closed skomatireddy closed 6 years ago
I see you called FIRConfigure twice?
Sorry for the confusion, its just the screen shot continuation. I have not called it twice, first screen shot ends after return Yes, from there its the second screen shot with the same lines to follow the flow.
is this only happing for FCM.enableDirectChannel()
?
does notification work fine if you remove that call?
Yes, I am able to generate Tokens and notifications come through fine.. but I am worried if there will be any side effects? and yes it only happens for FCM.enableDirectChannel()
.
@srikanthumg FCM.enableDirectChannel()
is only needed if you want to have back and forth communication with firebase though socket.
if you only need receive notifications, you don't need it
Thank you for the clarification.
For myside, open notification from app killed. Please help.
Fatal Exception: NSInternalInconsistencyException Error when sending event: FCMNotificationReceived with body: { "_actionIdentifier" = "com.apple.UNNotificationDefaultActionIdentifier"; "_completionHandlerId" = "2BD076CB-76CA-4B29-A451-017CBBC05A68"; "_notificationType" = "notification_response"; aps = { alert = { body = "tuan12313: le to display the \"Green Test\" prefix in green.1"; title = "Visitor Message"; }; category = "SHOW_VISITOR_MESSAGES_ACTION"; }; "gcm.message_id" = "0:1556276035386472%db740235db740235"; "google.c.a.e" = 1; "opened_from_tray" = 1; }. Bridge is not set. This is probably because you've explicitly synthesized the bridge in RNFIRMessaging, even though it's inherited from RCTEventEmitter.
"react-native-fcm": "15.0.2", ios Simuator: ios version 11.2.0 (16G1314) app running in foreground
I am using wix/react-native-navigation. the last function it is calling before app crashes is
FCM.enableDirectChannel(); FCM.on(FCMEvent.DirectChannelConnectionChanged, (data) => { console.log(
direct channel connected ${data}); }); setTimeout(() => { FCM.isDirectChannelEstablished().then((d) => console.log(d)); }, 1000); }
app crashes only in debug mode with the following error
Fatal Exception: NSInternalInconsistencyException Error when sending event: FCMDirectChannelConnectionChanged with body: true. Bridge is not set. This is probably because you've explicitly synthesized the bridge in RNFIRMessaging, even though it's inherited from RCTEventEmitter.
this is my AppDelegate.m file
Please let me know if I am missing anything.