diff --git a/README.md b/README.md index acc9e4f8fcb99d0497d5eb35c39732f5bf1c0520..37133ed29e6f6cd29ea9bf07156ddbf9d3dbcd47 100644 --- a/README.md +++ b/README.md @@ -167,12 +167,12 @@ Edit `AppDelegate.m`: + -(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification { + [[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self + userInfo:notification.userInfo]; + } ++ #endif + + - (void)application:(UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{ + [[NSNotificationCenter defaultCenter] postNotificationName:FCMNotificationReceived object:self userInfo:userInfo]; + completionHandler(UIBackgroundFetchResultNoData); + } -+ #endif ``` ### FCM config file