I am trying to check if the user has enabled remote notifications for my app but it always return true even if I disable/uninstall my app.
I am checking with this code:
if UIApplication.shared.isRegisteredForRemoteNotifications == false {
OneSignal.registerForPushNotifications()
print("Notifications is off")
} else {
print("Notifications is on")
}
But this will always run: print("Notifications is on")
So how can I check if user has enabled notification for my app?