getCurrentPosition in JS does not work on iOS
问题 I have a page that contains a code that gets the current location from the device and load other stuff based on the location with this code: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(successFunction); } else { // Make API call to the GeoIP services } It works on all android devices that I tested, but on iOS and macOS, it’s not working. Neither if nor else . Seems like it stuck at getting the current location. Any help? 回答1: iOS and macOS doesn't give you the user's