PhoneGap地理位置在iOS10中被阻止 [英] PhoneGap Geolocation is blocked in iOS10
本文介绍了PhoneGap地理位置在iOS10中被阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的PhoneGap应用程序利用(Cordova 3.8)webviews的W3C地理位置API。但是,从iOS 9.x升级到iOS 10(测试版)后,使用
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 c $ c>
navigator.geolocation.getCurrentPosition(...)
现在返回错误:
访问地理位置已通过与http:// localhost的不安全连接被阻止。 ERROR(2):Origin无权使用地理位置服务
我目前未使用 Cordova白名单插件。
推荐答案
我添加了 geolocation plugin ,而不使用默认的Webview地理位置API
I added the geolocation plugin instead of using the default Webview geolocation API
这篇关于PhoneGap地理位置在iOS10中被阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文