apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.15k stars 987 forks source link

(iOS) Avoid repetitive permission prompts #1245

Open jancabadaj opened 1 year ago

jancabadaj commented 1 year ago

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

vbraun commented 1 year ago

Works for me, for what its worth!

I would consider setting the default to "grant" because nobody wants the repeated permission request.