简体   繁体   中英

Geolocation on safari not working (no permission prompt)

I have a code that gets the geolocation of the user after they click a button and approve access to their geolocation.

For some reason that prompt is not given in safari (did test with multiple devices). There seems to be a standard "access denied" signal sent.

Information I find through google is contradictory.

Question: is it possible to get geolocation of a user with safari or does safari block this always?

Make sure that Safari is on the list of apps in the Enable Location Services list in System Preferences.

Geolocation in Safari 9 always returning Position Unavailable

Also make sure that in the privacy tab, the "Deny without prompting" option is off. https://i.stack.imgur.com/X8itc.png

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM