Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6935993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:10:33+00:00 2026-05-27T12:10:33+00:00

In your standard desktop browser like Safari or Chrome, when you navigate to a

  • 0

In your standard desktop browser like Safari or Chrome, when you navigate to a site such as maps.google.com and click on the ‘my location’ button, a message appears asking you if you’d like to give permission to the website to use your GPS/wifi triangulation position.

My question is, how do you detect such an event and show a dialog to a user when using a standard Cocoa (desktop) WebView object? I’ve tried implementing all of the various delegate methods and none of them seem to catch this javascript event.

navigator.geolocation.getCurrentPosition(function(position) {
  do_something(position.coords.latitude, position.coords.longitude);
});

It just fails silently. How do I ask the user for location sharing permission?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:10:34+00:00Added an answer on May 27, 2026 at 12:10 pm

    Just digging in some private headers I found this method:

    • (BOOL)webView:(WebView *)sender frame:(WebFrame *)frame requestGeolocationPermission:(WebGeolocation *)geolocation securityOrigin:(WebSecurityOrigin *)origin;

    Did you try to see if it gets called? You probably won’t get this past the App Store though, since it is a private API call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is the standard way to audio on desktop browsers, supported on iPad Safari, like
For a normal GUI (desktop) application with standard controls, like labels, textbox, progress bars,
What's your standard way of debugging a problem? This might seem like a pretty
What is the standard way of declaring configuration variables for your program at the
Is there a common standard for reporting errors in your class functions? I've seen
It is pretty standard practice now for desktop applications to be self-updating. On the
On a linux system, your standard uptime command returns the following: 6.46, 6.00, 4.51
Everybody knows the standard procedure to keep your app alive, after the user pressed
I've got your standard table application built right now. Window has a UINavigationController as
I made a ListBox with your standard smart-control thing, and have it connected to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.