cllocationmanager

Location service going to “Inactive” state in iPhone 5

一笑奈何 提交于 2019-12-01 07:32:42
问题 Even my app is register for Location updates in background. In my code: self.locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers; self.locationManager.distanceFilter = 2500; And I not moved anywhere. So after exactly 15 minutes in console log I got this message "Location icon should now be in state 'Inactive'" . From this point onwards my app is not running in background. It's happening in iPhone 5 only. @updated Here is my code self.locationManager = [[CLLocationManager

iOS 8 gps not enabled

无人久伴 提交于 2019-12-01 06:34:42
I tackled an issue, that GPS services work perfectly on iOS 7, but on iOS 8 I never get the permission request and the method: - (void) locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations never gets called. My code is here: #import "Locator.h" @implementation Locator - (instancetype) init { if (self = [super init]) { // Start up the location manager self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; self.locationManager.distanceFilter = 3; // New property

iOS 8 gps not enabled

大兔子大兔子 提交于 2019-12-01 03:01:24
问题 I tackled an issue, that GPS services work perfectly on iOS 7, but on iOS 8 I never get the permission request and the method: - (void) locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations never gets called. My code is here: #import "Locator.h" @implementation Locator - (instancetype) init { if (self = [super init]) { // Start up the location manager self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; self

iPhone SDK: Convert MKMapPoint to CGPoint

∥☆過路亽.° 提交于 2019-12-01 01:39:58
问题 I have converted a longitude and latitude on my MapView to a MKMapPoint. I then want to move an imageView to that point using the imageViews center property. It seems that I somehow need to convert the MKMapPoint to a CGPoint so that I can change the center, but the numbers seem to be way off. Here is what I am using: // Convert to MKMapPoint CLLocationCoordinate2D coord; coord.latitude = [loc.latitude doubleValue]; coord.longitude = [loc.longitude doubleValue]; MKMapPoint point =

iPhone - How do i get direction with degree based location

余生长醉 提交于 2019-11-30 21:03:18
问题 First I've implemented location manager functions in my class and whict are working fine, and gives me the current location. From that location I got how to get location degrees from here. but I'm not able to get the direction (i.e. North, South, East, West) I've referred this too. I want the location that I'm getting to be displayed in degrees with direction format like this. i.e. location manager gives me +37.33019332,-122.02298792 and i want something like 37° 19' 49" N , -122° 1' 23" E .

didUpdateLocation Method Never Called

喜你入骨 提交于 2019-11-30 19:58:22
I am making one app on iphone sdk4.0.In that did update location method never called. I have given my code below.Please help.Thanks in advance. -(id)init { [super init]; obj=[[UIApplication sharedApplication]delegate]; locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; //locationManager.distanceFilter = kCLDistanceFilterNone; // whenever we move locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters; // 100 m [locationManager startUpdatingLocation]; return self; } -(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *

CLLocation ask again for permission

£可爱£侵袭症+ 提交于 2019-11-30 17:22:37
Currently my application asks only once for permission to use the current location. If the user doesn't allow, he isn't ask again unless he resets location warning in the general settings. I would like to give the user a chance from within the app to grant this permission later. In other words, the dialog should appear again if he presses a certain button. Is this possible? Thanks for your advice. Matthew Horst New Answer: Now in iOS 8 you CAN programatically open the device settings app: NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; [[UIApplication sharedApplication]

Hook in CLLocationManagerDelegate protocol

北城以北 提交于 2019-11-30 16:45:29
I have a problem from 3 days :( I want to hook in CLLocationManagerDelegate protocol this method: - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations I tried everything but without success. I know how to hook into class or framework but I can't find a solution to hook a Delegate. Please help me! Thanks Hooking requires you to provide objective-C class you would like to hook. This is what Class type is for. One way to get obj-c class is by name via objc_getClass function. But in your case as I understand it correctly you don't have the name. You want to

iBeacon Reliable/Unreliable

耗尽温柔 提交于 2019-11-30 16:37:43
I am working on my home automation app. I am using estimotes iBeacons and what I want to do is give my Home Automation Control the ability to know my proximity in my home. Each iBeacon is given a virtual switch on my Home Controller and when I come in contact with a iBeacon my device either in foreground or background will update my control to turn on my switch for when I am near a beacon and turn it off when I have wondered away from my beacon. All of this works perfectly and I am loving it, however some of my conditions rely on me to be in a proximity for a period of time, and what I am

Application doesn't launch with location key after a significant location change

心不动则不痛 提交于 2019-11-30 16:32:28
My application uses the core location also after the application terminates with the method startMonitoringSignificantLocationChanges in CLLocationManager class. My application launches with a location key in iOS 5 and 6 in the method: - (BOOL) application:application didFinishLaunchingWithOptions:launchOptions; in AppDelegate class and everything works well. But in iOS-7 betas the application doesn't launch with a location key after a significant location change. Has anybody encountered this problem? I tried it on a simulator and in the device. Thanks for the help. I have the same problem in