Recent searches
No recent searches

Gabriel
Joined May 28, 2021
·
Last activity Oct 16, 2021
Following
0
Followers
0
Total activity
3
Votes
0
Subscription
1
ACTIVITY OVERVIEW
BADGES
ARTICLES
POSTS
COMMUNITY COMMENTS
ARTICLE COMMENTS
ACTIVITY OVERVIEW
Latest activity by Gabriel
Gabriel commented,
Community comment 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 :)
View comment · Posted Mar 26, 2021 · Gabriel
0
Followers
0
Votes
0
Comments
Gabriel commented,
Community comment 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();
}
View comment · Posted Mar 26, 2021 · Gabriel
0
Followers
0
Votes
0
Comments