本文介绍了如何在Swift中为WKWebView启用位置服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的浏览器应用程序使用WKWebView,但是当我尝试访问需要使用位置服务的网站(例如Google Maps)时,它不起作用.

我一直在寻找解决问题的方法,并遇到了这个问题.我试图将问题答案上的字符串添加到我的Info.plist中,但不能解决问题.

我该如何解决?

谢谢

PastaCoder

解决方案

我不确定如何,但是昨天尝试在Info.plist中为NSLocationWhenInUseUsageDescription添加字符串确实有效,问题已解决./p>

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

解决方案

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.

这篇关于如何在Swift中为WKWebView启用位置服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 04:21
查看更多