Pesquisas recentes
Sem pesquisas recentes

Gabriel
Entrou em 28 de mai. de 2021
·
Última atividade em 16 de out. de 2021
Seguindo
0
Seguidores
0
Atividade total
3
Votos
0
Assinatura
1
VISÃO GERAL DA ATIVIDADE
MEDALHAS
ARTIGOS
PUBLICAÇÕES
COMENTÁRIOS NA COMUNIDADE
COMENTÁRIOS EM ARTIGOS
VISÃO GERAL DA ATIVIDADE
Atividade mais recente por Gabriel
Gabriel comentou,
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 :)
Exibir comentário · Publicado 26 de mar. de 2021 · Gabriel
0
Seguidores
0
Votos
0
Comentários
Gabriel comentou,
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();
}
Exibir comentário · Publicado 26 de mar. de 2021 · Gabriel
0
Seguidores
0
Votos
0
Comentários