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 8818031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:59:53+00:00 2026-06-14T04:59:53+00:00

I am using CLLocationManager and CLLocationManagerDelegate to find out user location coordinates. I would

  • 0

I am using CLLocationManager and CLLocationManagerDelegate to find out user location coordinates. I would like to make sure that I have got my coordinate first and then resume the rest of code.
How could I able to lock my code to get location coordinate and then resume.

Any idea or suggestions?

  • 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-06-14T04:59:55+00:00Added an answer on June 14, 2026 at 4:59 am

    Don’t. What user would want an app that freezes while getting a location fix? It might take minutes and if your app isn’t responding in seconds it will get deleted. Instead you should turn on the location manager as soon as your app starts and wait for the delegate’s callback to do your next step. Until that callback comes back the user should be able to do any non-location type activities like look at the About screen or change settings. If you don’t have either of those and you really want the user to be unable to do anything at all until that fix comes in, cover the screen with a UIView and put a UIProgressIndicator (the infinite spinning type not the finite bar type) in the middle with a message saying it is waiting for location data.
    Also remember that some users may not grant your app location privileges, so watch for that and remove the progress indicator and tell them they need to change their settings.

    Another reason for not just blocking while waiting for a fix is that your app may get pushed to the background when a phone call comes in or the user switches to another app for some reason. If your app is stuck in a tight loop at that point and too busy to respond to a request to go into the background the OS will completely kill the operation and the user will have to fully restart the app when they come back to it. All progress and changes will be lost. So in summary, do not consider blocking the main thread of your app.

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

Sidebar

Related Questions

I'm using following conditions in-order to make sure that the location i get has
I'm using a CLLocationManager in an attempt to find the address that the user
I have an MKMapView that's supposed to track the user's location using a custom
I'm trying to determine the iPhone user's location using a CLLocationManager and CLGeocoder. My
I am using CLLocationManager to grab the location.Though I have GPS settings working on
I am trying to get the location coordinates using CLLocationManager. Here is my code
I'm monitoring a region using CLLocationManager's startMonitoringForRegion:desiredAccuracy: . I know for sure that the
I want to use CLLocationManager to get the current user location using GPS antenna,
I am using core location framework inside my app i have to ask that
I'm currently using CoreLocation + CLLocationManager in order to compare a users current location

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.