최근 검색


최근 검색 없음

Gabriel's Avatar

Gabriel

가입한 날짜: 2021년 5월 28일

·

마지막 활동: 2021년 10월 16일

팔로잉

0

팔로워

0

총 활동 수

3

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 Gabriel

Gabriel님이 에 댓글을 입력함

커뮤니티 댓글 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 :)

댓글 보기 · 2021년 3월 26일에 게시됨 · Gabriel

0

팔로워

0

투표 수

0

댓글


Gabriel님이 에 댓글을 입력함

커뮤니티 댓글 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();

}

댓글 보기 · 2021년 3월 26일에 게시됨 · Gabriel

0

팔로워

0

투표 수

0

댓글