最近の検索


最近の検索はありません

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

コメント