Unable to get location information on iOS 16.4 beta 4, iPadOS 16.4 beta 4

I installed iOS16.4 beta4 (iPadOS16.4 beta4) released the other day. After using it, I had two questions, so I will send them as impressions. Previously: In iOS 16.3, a popup appeared twice when retrieving location information for the first installed app. You can get location information by executing the navigator.geolocation.getCurrentPosition method on a web page opened in WKWebView (such as ua_test.html in the attached file). The first time, a pop-up requesting permission for Safari (WKWebView) location information was displayed. The second time, location permissions for the app's domain appeared in a popup with a map. Current situation: In iOS16.4 beta4, the permission request popup for Safari (WKWebView) is not displayed, and only the permission request for the app domain is displayed in a popup with a map. After enabling popups on the map and getting the location, running the navigator.geolocation.getCurrentPosition method does not work and I am unable to get the location. Therefore, I would like to ask the following two questions.

  1. How can I show two popups when getting location in 16.4 beta4?
  2. From 16.4 beta4, please tell me how to implement permission to get location information in one popup.

Note that the Info:Plist has NSLocationAlwaysAndWhenInUseUsageDescription and describes NSLocationWhenInUseUsageDescription.

Does anyone know about this informetion?

Post not yet marked as solved Up vote post of mendori Down vote post of mendori
4.6k views

Replies

In update 16.4 official version, I also have the same problem

When updating to iOS 16.4, the location function in Line LIFF (WKWebView) will not be available. There should be an authorization prompt, and the relevant location permissions have been confirmed and attempted to be reset, but the issue still cannot be resolved.

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.

  • On my case, replacing presentViewController with pushViewController is not an option as the new VC i'm presenting is a UINavigationController and can't be pushed.

Add a Comment

Have you guys managed to overcome this issue? Just came across this issue on v16.4.1 and it looks like it's still occurring.

Hello guys i tried with IOS 16.5 it works great. We have to wait for it. Also, the release date looks like 15. or 16. May ;)

Add a Comment