Búsquedas recientes
No hay búsquedas recientes

Gabriel
Incorporación 28 may 2021
·
Última actividad 16 oct 2021
Seguimientos
0
Seguidores
0
Actividad total
3
Votos
0
Suscripción
1
RESUMEN DE LA ACTIVIDAD
INSIGNIAS
ARTÍCULOS
PUBLICACIONES
COMENTARIOS DE LA COMUNIDAD
COMENTARIOS DE ARTÍCULOS
RESUMEN DE LA ACTIVIDAD
Última actividad de Gabriel
Gabriel hizo un comentario,
Hi, can anybody confirm that this code is right?
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler{
[ZDKChat didReceiveRemoteNotification:userInfo in:application];
completionHandler();
}
I'm not an iOS developer (I'm making React Native app), and XCode is saying that userInfo and application are not defined, which makes sense for me, so I'm using this code:
- (void) application:(UIApplication*)application didReceiveRemoteNotification:(NSDictionary*)userInfo {
[ZDKChat didReceiveRemoteNotification:userInfo in:application];
}
Am I right? the code still not working for me, but at least I'll be one step farther to make it work :)
Ver comentario · Publicado 26 mar 2021 · Gabriel
0
Seguidores
0
Votos
0
Comentarios
Gabriel hizo un comentario,
Ok, now I can verify that the code was wrong, the code should be this:
- (void)userNotificationCenter:(UNUserNotificationCenter *)center
didReceiveNotificationResponse:(UNNotificationResponse *)response
withCompletionHandler:(void (^)(void))completionHandler
{
NSDictionary* userInfo = response.notification.request.content.userInfo;
UIApplication* application = UIApplication.sharedApplication;
[ZDKChat didReceiveRemoteNotification:userInfo in:application];
completionHandler();
}
Ver comentario · Publicado 26 mar 2021 · Gabriel
0
Seguidores
0
Votos
0
Comentarios