Parsing notification message to string format

Dear sir,

I used the below function to print the notification message

func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any]) {
print(userInfo)

}

I need to parse the userInfo to be String instead of hashing it.

Regards

@samerhameed Thanks very much for your question!

I think the problem is that the method isn’t being called. Have you checked to see if it’s being called at all when your app runs? We actually have a tutorial on Push Notifications that you should check out if you’re having trouble:

Push Notifications

I hope this helps!

All the best!

1 Like

Thank you sir for your help and support. I read the article and it works perfectly for my case

Samer

@samerhameed Not a problem! I’m happy to have helped :slight_smile:

All the best!

This topic was automatically closed after 166 days. New replies are no longer allowed.