Is it possible to transfer any information in the push notification beside "badge"
"sound"
and "text"
?
For example, in the app "whatsapp"
when a push notification appears and pressed, the app is opened but not going to the conversation. My guess is that it can't know what conversation to go to. But then I saw that in facebook messenger app it actually goes in the conversation. how does the messenger app know that what conversation to go to?
Also, if it is possible to transfer information, why is it that apps like whatsapp
don't use it and also ask you for your name so it will be displayed in the push?
Yes, indeed. But your message size (in bytes) must not pass a certain threshold Apple has imposed. You can then pull that info in the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
using something like this:
NSDictionary* dictionary = [launchOptions objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey];
Where dictionary contains your push notification info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With