PhoneGap Geolocation is blocked in iOS10

陌路散爱 提交于 2019-12-11 01:22:11

问题


My Phonegap app leverages the (Cordova 3.8) webviews 'W3C Geolocation API'. Since upgrading from iOS 9.x to iOS 10 (beta) however, using

navigator.geolocation.getCurrentPosition(...)

now returns an error:

Access to geolocation was blocked over insecure connection to http://localhost. ERROR(2): Origin does not have permission to use Geolocation service

I do not currently use the Cordova Whitelist Plugin. Would using that help or is there a simpler fix?


回答1:


I added the geolocation plugin instead of using the default Webview geolocation API



来源:https://stackoverflow.com/questions/39409071/phonegap-geolocation-is-blocked-in-ios10

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