Datos de carga útil o información de usuario de la notificación automática cuando la aplicación está en modo suspendido o sale de la aplicación en iOS
Frecuentes
Visto 248 veces
1
I am suffering from an issue. I wanted to get get userInfo or payload data when app is in suspended mode. I am able to get payload data when i tap on received notification. but i am not able to get userInfo data when app is in suspend more exited. Is there any way or method to get push notification data ? when app suspend more exited mode
i am using following method :
- (void)applicationWillEnterForeground:(UIApplication *)application
{
NSLog(@"notification active=%@",userInfo);
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
{
flag=0;
if (application.applicationState == UIApplicationStateActive || application.applicationState == UIApplicationStateInactive || application.applicationState == UIApplicationStateBackground)
{
NSLog(@"notification active=%@",userInfo);
}
else
{
NSLog(@"notification inactive%@",userInfo);
}
application.applicationIconBadgeNumber = 0;
}
0 Respuestas
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas push-notification apple-push-notifications userinfo or haz tu propia pregunta.
Hi Yug, I am struggling with same issue and not able to found solution for this, It'd be great help if you update your answer towards this post. Thanks in Advance ! - Gaurav Singla