After much of reading, I found that the html executes request permission for "Access Motion and Orientation" through javascript as below :
<script type="text/javascript">
function requestOrientationPermission(){
DeviceOrientationEvent.requestPermission()
.then(response => {
if (response == 'granted') {
window.addEventListener('deviceorientation', (e) => {
// do something with e
})
}
})
.catch(console.error)
}
</script>
<button onclick='requestOrientationPermission();'>Request orientation permission</button>
When i run above html/javascript page using safari or chrome...and click on button, it pops up request permission for "Access Motion and Orientation". But when i run on WKwebview, there is no pop up for permission request.
You may test above html/javascript here :
https://www.techiesworld.net/Permission.asp
Trying to solve this. Some in other forum claims we can solve this by : webView.uiDelegate = self
but i cant find such command in WKWebview.