push.hasPermission is undefined
mgoetz85 opened this issue · 0 comments
Expected Behaviour
The method hasPermission is fired and a variable isEnabled is available which defines with permissions are granted or not
Actual Behaviour
TypeError: push.hasPermission is not a function
Reproduce Scenario (including but not limited to)
Build an app with the example code from the API documentation. App prompts user about permissions. Push are received (so this works fine)
Steps to Reproduce
Build an app with the example code from the API documentation. App prompts user about permissions. Push are received (so this works fine)
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 13.2 but also iOS 12.x
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
iPhone XS
Cordova CLI version and cordova platform version
cli-9.0.0
iOS 5.0.1
Plugin version
Latest version 2.3
Sample Code that illustrates the problem
function ceckIfPushPermissionsGranted(){ alert("Check"); push.hasPermission(data => { if (data.isEnabled) { alert("Is enabled"); } else { alert("Why not enable push?"); } }); }
Logs taken while reproducing problem
TypeError: push.hasPermission is not a function. (In 'push.hasPermission ... 'push.hasPermission is undefined)
As stated above. The plugin works fine. The device registers, push messages are received and also on("notification") works like a charm. Any ideas?