countly-sdk-react-native icon indicating copy to clipboard operation
countly-sdk-react-native copied to clipboard

UNUserNotificationCenter undefined in Appdelegate.m

Open jeffsteinmetz opened this issue 6 years ago • 0 comments

The instructions at: https://resources.count.ly/docs/react-native

suggest addeding:

[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];

and

-(void) userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
 [[RNFirebaseMessaging instance] didReceiveRemoteNotification:response.notification.request.content.userInfo];
 completionHandler();
}

This fails the build, UNUserNotificationCenter is an undefined Type.

jeffsteinmetz avatar Feb 05 '19 22:02 jeffsteinmetz