cordova-ios
cordova-ios copied to clipboard
(iOS) Avoid repetitive permission prompts
Platforms affected
iOS
Motivation and Context
resolves #1166
Description
If the app uses WebRTC, the user is initially prompted for permission twice, and then prompted again each time the app is restarted.
The solution is inspired by react: https://github.com/react-native-webview/react-native-webview/pull/2257
Testing
I tested the changes in a project that is using WebRTC camera streaming.
Checklist
- [x] I've run the tests to see all new and existing tests pass
- [ ] I added automated test coverage as appropriate for this change
- [x] Commit is prefixed with
(platform)if this change only applies to one platform (e.g.(android)) - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
- [ ] I've updated the documentation if necessary
Works for me, for what its worth!
I would consider setting the default to "grant" because nobody wants the repeated permission request.