I’m now using didReceiveRemoteNotification
to get the payload of the notification pushed from Parse, however, it is only triggered when the notification is tapp
Below method is invoked when a remote notification is received in iOS.
func application(_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
// do something
}
Apart from basic setup for remote notifications you should set below flag in payload of notification.
"content-available": 1