Recherches récentes
Pas de recherche récente

Gabriel
Adhésion le 28 mai 2021
·
Dernière activité le 16 oct. 2021
Suivis
0
Abonnés
0
Activité totale
3
Votes
0
Abonnement
1
APERÇU DES ACTIVITÉS
BADGES
ARTICLES
PUBLICATIONS
COMMENTAIRES DE LA COMMUNAUTÉ
COMMENTAIRES SUR L’ARTICLE
APERÇU DES ACTIVITÉS
Dernière activité effectuée par Gabriel
Gabriel a ajouté un commentaire,
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 :)
Afficher le commentaire · Publication le 26 mars 2021 · Gabriel
0
Abonnés
0
Votes
0
Commentaire
Gabriel a ajouté un commentaire,
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();
}
Afficher le commentaire · Publication le 26 mars 2021 · Gabriel
0
Abonnés
0
Votes
0
Commentaire