Questions tagged [cllocationmanager]

The CLLocationManager class defines the interface for configuring the delivery of location- and heading-related events to your application

The CLLocationManager class defines the interface for configuring the delivery of location- and heading-related events to your application. You use an instance of this class to establish the parameters that determine when location and heading events should be delivered and to start and stop the actual delivery of those events. You can also use a location manager object to retrieve the most recent location and heading data.

A location manager object provides support for the following location-related activities:

  • Tracking large or small changes in the user’s current location with a configurable degree of accuracy.
  • Reporting heading changes from the onboard compass. (iOS only)
  • Monitoring distinct regions of interest and generating location events when the user enters or leaves those regions.
  • Deferring the delivery of location updates while the app is in the background. (iOS 6 and later only)
2729 questions
0
votes
2 answers

How to center map view while tracking user

I am just wondering how to center the map view as the user is vein tracked with CLLocationmanager and map kit This is currently how I am tracking the user and updating the location etc. - (void)viewDidLoad { // Initialize the TileOverlay with…
C.Johns
  • 10,185
  • 20
  • 102
  • 156
0
votes
2 answers

didUpdateToLocation never called

I am using both the simulator and my device to test this, but no matter what I do, didUpdateToLocation is never called. I have tried changing my location in the sim, turning off and then on again my location services on my phone to force the phone…
Alex
  • 3,031
  • 6
  • 34
  • 56
0
votes
2 answers

Inconsistent locationManager didupdatetolocation on Iphone

@implementation MyLocation SYNTHESIZE_SINGLETON_FOR_CLASS(MyLocation); @synthesize delegate, locationManager; - (id) init { self = [super init]; if (self != nil) { self.locationManager = [[[CLLocationManager alloc]…
lilzz
  • 5,243
  • 14
  • 59
  • 87
0
votes
4 answers

IOS Location found detection

Currently I'm building an application which shows nearby advertisements based on the current location. When the user starts the application for the first time I want them to see a top 10 of nearby advertisements. I'm having a slight problem with…
Mittchel
  • 1,896
  • 3
  • 19
  • 37
0
votes
1 answer

iOS Significant Location Change Only Works When Device is Awake

I am trying to write an app in iOS for the iPhone 4 using significant location change that fires a local notification each time the location delegate receives a location update. My code is posted below. I resign the app and close it out of the…
0
votes
2 answers

iOS: Core Location know when user location found

I have created a locationManager object, set all of the options, including delegate. I am getting back location updates, which is great. But, how can I know when location services has found my users location? Sometimes if I move to a location away…
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
0
votes
2 answers

Can't set CLLocationManager delegate to nil

Because there are multiple situations in which I would want to pop a view controller from the navigation stack, I have one method that does it and it is called from three different places. - (void)dismissSelfCon { NSLog(@"dismiss"); …
0
votes
3 answers

Can't allocate CLLocationManager

In my UIViewController's initWithNibNameOrNil, I call: locationManager = [CLLocationManager new]; to create the object, then later in viewDidAppear I call: [locationManager startUpdatingLocation]; [locationManager startUpdatingHeading]; But I…
eric.mitchell
  • 8,817
  • 12
  • 54
  • 92
0
votes
0 answers

iPhone: Prompt "App would like to use your current location" disappears straight away

Possible Duplicate: Disappearing UILocation alerts in XCode 4.2 with ARC iPhone I'm trying to get the user's location using a class called MyCLController (found somewhere on the Internet). I have already used it in different application without…
Johann
  • 12,158
  • 11
  • 62
  • 89
0
votes
2 answers

Any side effect of CLLocationManager with NSTimer using such approach?

I am working on an iPhone app which needs Location Updates with intervals specified by the user. Here is the code sample, which I am using to do this: @implementation TestLocation - (void)viewDidLoad{ if ([Utils getDataWithKey:TIMER_INTERVAL] ==…
0
votes
1 answer

Stop CLLocationManager Objective-C

I need to update the location only one time,but when i try to stop to update it wont work... the .h file : @protocol CoreLocationControllerDelegate @required - (void)locationUpdate:(CLLocation *)location; // Our location updates are sent here -…
Vinicius Albino
  • 743
  • 2
  • 8
  • 21
0
votes
1 answer

Using GPS with CLLocationManager, some issue

I would like to speak with you about the iPhone coreLocation. Reading around I messed up, much more than I knew it before and I came up with questions about it. I start with you that I have done some testing around my city but with poor results,…
Vins
  • 1,814
  • 4
  • 24
  • 40
0
votes
1 answer

Make the location authorization for an application message appear at the first launch of the application

I want to show the message which asks the user if he accepts that the application will use the location services in his device. How can i implement that, WITHOUT saving his location? I've tried to do startLocationUpdates and then…
ozking
  • 438
  • 1
  • 5
  • 12
0
votes
1 answer

consistency of regionMonitoring

I am curious about why my app does not notify me sometime when I set it to be notified at same spot everyday. On iPhone 4x devices, the app uses regionMonitoring. Somedays the update is received, some days it is not. Moreover, with…
Sam
  • 827
  • 4
  • 9
  • 21
0
votes
1 answer

Separating location manager updates and touches iphone

I have the location manager updating the current location and I move a pin on my map reflecting the location. However, when the location manager-desired accuracy is at 'best' and you are moving, the updates are almost continuous, so the code when a…
user542584
  • 2,651
  • 2
  • 25
  • 29