قالب وردپرس درنا توس
Home / IOS Development / ios – How to make firebase push notifications work

ios – How to make firebase push notifications work



I've spent 2 days through four-base documentation, asking questions and looking at others and following youtube / medium tutorials and more. Here is a github project with my full app delegate, so my entire code is visible.

But I am not yet aware of how to send a notification message from firebase cloud messaging. I have setup Apple push services have got and entered auth key in fire base and written code in my app delegative set here

Can anyone tell me what I need to do to make it work? What have I missed?

Here is my didRegisterForRemoteNotificationsWithDeviceToken method:

      func application (_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messages.messaging (). ApnsToken = deviceToken
leave tokenParts = deviceToken.map {data in String (format: "% 02.2hhx", data)}
la token = tokenParts.joined ()
print ("Device Token: (token)")

}

Update:

I've been following this whole documentation again at firebase and still sending messages from fire reports to fire doesn't work.

Clearly, however, the code runs given that 2 lines I have that store the token to the fire base, successfully save the symbol.


Source link