ios - Can't receive notification with Firebase in foreground? -
i'm using firebase make notifications server ios.
have 1 problem :
when application in background, no problem, receive notification.
when application in foreground, code print me notification data don't show on gui :/
that's function :
// receive displayed notifications ios 10 devices. func usernotificationcenter(_ center: unusernotificationcenter, willpresent notification: unnotification, withcompletionhandler completionhandler: @escaping (unnotificationpresentationoptions) -> void){ let userinfo = notification.request.content.userinfo // print message id. if let messageid = userinfo[gcmmessageidkey]{ print("message id: \(messageid)") } // print full message. print(userinfo) // change preferred presentation option completionhandler([]) }
do know how can force firebase show notification on gui ? tryed make local notification instead, without results ...
thanks "luca rocchi", when application in foreground, notification ui not show @ all.
Comments
Post a Comment