Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

295
Vistas
How is it determined when to prompt user location permissions on iOS safari?

When using the geolocation.getCurrentPosition API on mobile, tested iOS at the moment, users are prompted more than once through a session depending on the page. In comparison to as desktop site, such as Chrome on Windows 10, where once a user hits Allow they will no longer be prompted for permissions unless explicitly disabled. iOS Safari seems to be session based and then possibly page based within session?

Wondering if anyone knows if there are explicit rules defined by Apple for this permission check? Also does maximumAge play a role in how often the user is prompted?

  const LOCATION_OPTIONS = {
   timeout: 15000,
   enableHighAccuracy: true,
   maximumAge: 86400000,
  };

  useEffect(() => {
    const { geolocation } = navigator;

    // If the geolocation is not defined in the used browser we handle it as an error
    if (!geolocation) {
      setError("Geolocation is not supported.");
      return;
    }

    // Call Geolocation API
    geolocation.getCurrentPosition(handleSuccess, handleError, options);
  }, [options]);

  return { location, error };

Example NextJS CodeSandbox https://u11vn.sse.codesandbox.io/

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Unfortunately, it seems there is no way to permanently grant website access to the iPhone privacy like camera location, within Safari. but on the user side, there are three options (Ask, Allow, Deny ) that can set

if you use JavaScript in iOS WKWebView, you can get a workaround that request location with App location API

if you use JavaScript on the web, well you cannot achieve this.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda