I carried on FCMin swift 3.0. FCMthe notification works if my application is in the foreground correctly, but the notification does not work if the application is in the background or in an inactive state. I followed all the steps provided by firebase below the function called only by the active application.
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)
Please suggest if there is a better way to do this.
source
share