How to enable Location Services for a WKWebView in

2019-09-17 01:15发布

问题:

My Browser app uses WKWebView but when I try to visit a website that needs to use Location Services (like Google Maps, for example), it doesn't work.

I have searched for a way to fix it and came across this question. I tried to add the string on the answer to the question to my Info.plist but it doesn't resolve the issue.

How can I fix this?

Thanks,

PastaCoder

回答1:

I'm not sure how, but trying to add a string for NSLocationWhenInUseUsageDescription in the Info.plist did work yesterday and the issue has been resolved.