In flutter I am sending silent notification in my IOS app using onesignal, perviously I was using onesignal version 3 and in that there is a method postNotification which was used to display silent notification received in conditionally
override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) {
OneSignal.postNotification(content,onSuccess: {
osResultSuccessBlock in debugPrint(osResultSuccessBlock.debugDescription)
dailyNotificationCount += 1;
UserDefaults.standard.set(dailyNotificationCount, forKey: "flutter.dailyNotificationsCount")
},
onFailure: {
osFailureBlock in debugPrint(osFailureBlock.debugDescription)
})
}
now that I have upgraded my version of onesignal to 5.1 it not longer have this method.
I have searched but was unable to find any method similar to this in onesignal migration guide or its documentation.