D
D
Durin Qurkingo2019-07-27 16:24:25
JavaScript
Durin Qurkingo, 2019-07-27 16:24:25

Is getCurrentPosition in JS not working on iOS?

I have a page which contains a code that gets the current location from the device and loads other things based on the location with this code:

if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(successFunction);
} else {
    // Сделайте вызов API для сервисов GeoIP
}

It works on all Android devices I've tested, but it doesn't work on iOS and macOS. Neither if nor else. It looks like it's stuck on getting the current location.
Any help?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2019-07-27
@KickeRockK

It says here that should be https in safari mobile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question