diff --git a/README.md b/README.md index 1eeca742d3f0ad6cb5d51816427be807faec79a3..fc900aaec6a47d3ab1f466575dedd7b70ffb3829 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ Edit `AppDelegate.m`: } + #if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0 -+ - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification + + withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler ++ - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler + { + [[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:notification.request.content.userInfo]; + completionHandler(UNNotificationPresentationOptionAlert);