pbakondy / cordova-plugin-speechrecognition

:microphone: Cordova Plugin for Speech Recognition
MIT License
197 stars 117 forks source link

Bug: hasPermission() always results in success on iOS #89

Open leshik opened 5 years ago

leshik commented 5 years ago

When on iOS, hasPermission() always returns success, even if a user has denied the request to the speech recognition before. I think the cause is this line: https://github.com/pbakondy/cordova-plugin-speechrecognition/blob/master/src/ios/SpeechRecognition.m#L189

Not sure how this should be fixed – hasPermission and requestPermission share most of the code, maybe this should go in a separate function.

leshik commented 5 years ago

Turned out Android suffers from same issues. I added another PR #91 to fix them.