How to enable Location Services for a WKWebView in Swift?

若如初见. 提交于 2019-12-12 02:55:53

问题


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.



来源:https://stackoverflow.com/questions/30015943/how-to-enable-location-services-for-a-wkwebview-in-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!