Ricerche recenti


Nessuna ricerca recente

Gabriel's Avatar

Gabriel

Data ingresso 28 mag 2021

·

Ultima attività 16 ott 2021

Seguiti

0

Follower

0

Attività totali

3

Voti

0

Abbonamento

1

PANORAMICA ATTIVITÀ

Ultima attività di Gabriel

Gabriel ha commentato,

Commento nella community 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 :)

Visualizza commento · Data ultimo post: 26 mar 2021 · Gabriel

0

Follower

0

Voti

0

Commenti


Gabriel ha commentato,

Commento nella community 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();

}

Visualizza commento · Data ultimo post: 26 mar 2021 · Gabriel

0

Follower

0

Voti

0

Commenti