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

  • Home
  • SEARCH
  • 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 8296857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:11:02+00:00 2026-06-08T15:11:02+00:00

My app tracks a user with CLLocationManager . In the delegate call didUpdateToLocation I

  • 0

My app tracks a user with CLLocationManager. In the delegate call didUpdateToLocation I do all the fun stuff of saving their position. However, I needed a way to test if they had stopped. That away I could stop recording locations and consider their trip over. So I have a NSTimer in CCLocationManager that gets added and removed every time didUpdateToLocation is called. That away it will be initiated when the user stops and CLLocationManager stops getting called.

The only way that I could ever get the NSTimer to work is to do:

[[NSRunLoop mainRunLoop] addTimer:userStoppedMovingTimer forMode:NSRunLoopCommonModes];

Then to remove it:

[userStoppedMovingTimer invalidate];

I’ve never had to add timers like this in the past. Could someone shed some light as to why this is?

  • 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-08T15:11:04+00:00Added an answer on June 8, 2026 at 3:11 pm

    From the documentation:

    There are three ways to create a timer:

    1. Use the scheduledTimerWithTimeInterval:invocation:repeats: or
      scheduledTimerWithTimeInterval:target:selector:userInfo:repeats: class
      method to create the timer and schedule it on the current run loop in
      the default mode.

    2. Use the timerWithTimeInterval:invocation:repeats: or
      timerWithTimeInterval:target:selector:userInfo:repeats: class method
      to create the timer object without scheduling it on a run loop. (After
      creating it, you must add the timer to a run loop manually by calling
      the addTimer:forMode: method of the corresponding NSRunLoop object.)

    3. Allocate the timer and initialize it using the
      initWithFireDate:interval:target:selector:userInfo:repeats: method.
      (After creating it, you must add the timer to a run loop manually by
      calling the addTimer:forMode: method of the corresponding NSRunLoop
      object.)

    You were probably using option 1 previously, and now you’re using option 2 or 3.

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

Sidebar

Related Questions

I'm making an Android app that tracks a user and displays their location in
I am developing an app that tracks the user's position. I do not know
I have a web app that will draw a polyline for each user (tracks
I track user activity in my iPhone app by having certain user actions call
I am designing an app that will keep track of all user's lat/long. For
I have an app that tracks wildlife where the user enters data based on
I am having an app which tracks the Geopoints of the user. I simply
My rails app has a simple model Links which tracks all the Urls associated
I have an app that displays a map of the user's location and tracks
I have an app that tracks a user as they drive along. It uses

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.