Post

Replies

Boosts

Views

Activity

Reply to Unable to get location information on iOS 16.4 beta 4, iPadOS 16.4 beta 4
I also have the same problem in iOS 16.4. Debug log received looks like “… ** whose view is not in the window hierarchy**” This error occur when both view controllers are presented from another view controller (ViewController A present ViewController B and ViewController A continues present ViewController C). In here, I used the method “navigator.geolocation.getCurrentPosition” to request location permission but the dialog is not displayed. Then log received is “… ** whose view is not in the window hierarchy**” This happens when the view controller containing the WKWebView is being presented by another view controller => in my opinion, WKWebView has chosen the wrong view controller to display. I fixed it by using pushViewController instead of using presentViewController. It's just a temporary solution. The main cause seems to be WKWebView (v16.4), hope Apple will solve it.
Mar ’23