Monday 15 June 2015

ios - CLLocationManager heading issues on iPhone 5 -


I have recently started testing my app on an iPhone 5, and for my alarm, That CLLocationManager does not really work! Although [CLLocationManager heading is available] is yes , I have not received header updates at all. Surprisingly, on iPhone 4, after updating 30 or above, locationManager: didUpdateToHeading: is no longer called This problem is completely new Location Manager Vertical Eligibility < / Code>, so I'm assuming height is invalid. Here's how I am creating a Location Manager:

  CLLocationManager * locationManager = [[CLLocationManager Alloc] init]; If ([locationManager responds to Tselector: @Selector (Disclaimed locality update)]) [[locationManager rejected departure location update]; [Location Manager SetupSubstress does not own its initials]; } LocationManager.headingOrientation = CLDeviceOrientationFaceUp; LocationManager.distanceFilter = kCLDistanceFilterNone; LocationManager.headingFilter = -1; LocationManager.desiredAccuracy = KCL Location DisabledTableFreshNavigation; [Shared Singleton Set Location Manager: Location Manager];   

sharedSingleton is just my singleton class which has some obstacles and ends, including holding on the context of the location manager.

If I need to post any more code, I know I do not know what might be causing this strange issue. Thanks!

You must retain " locationManager " in memory, either your As an object of a property or as an instance variable.

Do I believe that you are making your place manager, and then withdraws from your method and exits " locationManager " and magically arc by Is released.

Then, do something like this:

In your @implementation:

  @ property (strong) CLLocationManager * locationManager;   

and in your @ interface:

  self.locationManager = [[CLLocationManager alloc] init]; If ([self.locationManager responds to Tselector: @Selector (Disclaimed locality updates)]) {[self.locationManager denied departure location update]; [Self.locationManager setPausesLocationUpdatesAutomatically: No]; } Self.locationManager.headingOrientation = CLDeviceOrientationFaceUp; Self.locationManager.distanceFilter = kCLDistanceFilterNone; Self.locationManager.headingFilter = -1; Self.locationManager.desiredAccuracy = KCL LocationPerachiFreshNation;    

No comments:

Post a Comment