问题
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