Open sebge2emasphere opened 4 years ago
having same problem
I also tried using the previously initialized object "this.push" to do call hasPermission() also failed like you do.
I'm able to to do this by using this approach "PushNotification.hasPermission(callBackFunction)" and it success call and return the callback function as expected.
Does anyone have a solution for this? I'm having the same problem.
Expected Behaviour
The promise
hasPermission
must at some point answer something, but nothing happens.Actual Behaviour
This code works on Android, but on iOs the only output is 'before permission' and 'after permission'.
I also tried this (it works on Android):
In Xcode I see that the line: https://github.com/phonegap/phonegap-plugin-push/blob/master/src/ios/PushPlugin.m#L545 is invoked, but the if statement is false.
>>> Do you why this code if condition is false ?
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOs env:
Cordova CLI version and cordova platform version
Using ionic 5
npx cap doctor
output:Plugin version