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?
from getCurrentPosition in JS does not work on iOS
No comments:
Post a Comment