Recherches récentes


Pas de recherche récente

Gabriel's Avatar

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

Dernière activité effectuée par Gabriel

Gabriel a ajouté un commentaire,

Commentaire de la communauté Developer - Zendesk SDKs

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,

Commentaire de la communauté Developer - Zendesk SDKs

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