cllocationmanager

Finding Direction in iPhone like in Compass?

此生再无相见时 提交于 2019-12-03 11:32:53
Do any one have idea for finding true direction using iPhone? I want to implement such application in which I need to find direction in which iPhone is pointing and want to make application same as compass application in iphone 3GS. Does iPhone 3G supports compass functionality? And can any one tell me how compass application find directions so accurately like a real magnetic compass? Please help me for this. I am in a critical situation. Thanks in advance. akshayk80 here is a sample code link from apple.com for using magnetometer and Core Location https://developer.apple.com/library/ios/

startUpdatingLocation of LocationManager through silent push notification

谁都会走 提交于 2019-12-03 10:20:53
问题 I am creating app that needs to wake up in background at particular time . I have tried : UILocalNotification : But i Don't want to use UILocalNotification because it needs user interaction to tap on notification and than only app will wake up and start location manager. I have also used [locationManager startUpdatingLocation]; enabled with background Modes Location updates, this is works but it will take lot of battery. So with using new iOS 7 feature Silent pushNotification and

cllocation and mkreversegeocoder

烂漫一生 提交于 2019-12-03 10:19:31
问题 i'm try to retreiving city name with cllocation and mkreversegeocoder. in my viewdidload method i istance cllocationmanager: self.locManager = [[CLLocationManager alloc] init]; locManager.delegate = self; locManager.desiredAccuracy = kCLLocationAccuracyBest; [locManager startUpdatingLocation]; and after: - (void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { //some code to retrieve my information

Swift LocationManager didChangeAuthorizationStatus Always Called

你说的曾经没有我的故事 提交于 2019-12-03 05:27:31
I have a view controller which implements the CLLocationManagerDelegate . I create a the CLLocationManager variable: let locationManager = CLLocationManager() Then in the viewDidLoad , I set properties: // Set location manager properties locationManager.delegate = self locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters locationManager.distanceFilter = 50 The problem comes that the function gets called even before I check the authorization status. func locationManager(manager: CLLocationManager!, didChangeAuthorizationStatus status: CLAuthorizationStatus) { if (status ==

didEnterRegion called with larger radius (iOS)

别说谁变了你拦得住时间么 提交于 2019-12-03 03:55:23
I want didEnterRegion to be called with much precision, but I wasn't able to do so. Here is what I have done: I used the best values of distanceFilter and desiredAccuracy (most precise GPS settings according to Apple) and have a destination CLCircularRegion (Subclass of CLRegion). self.locationManager.distanceFilter = kCLLocationAccuracyBestForNavigation; self.locationManager.desiredAccuracy = kCLLocationAccuracyBestForNavigation; @property (nonatomic, strong) CLCircularRegion *Destination; self.Destination = [[CLCircularRegion alloc] initWithCenter:CLLocationCoordinate2DMake(43.907691, -69

startUpdatingLocation of LocationManager through silent push notification

巧了我就是萌 提交于 2019-12-03 00:52:06
I am creating app that needs to wake up in background at particular time . I have tried : UILocalNotification : But i Don't want to use UILocalNotification because it needs user interaction to tap on notification and than only app will wake up and start location manager. I have also used [locationManager startUpdatingLocation]; enabled with background Modes Location updates, this is works but it will take lot of battery. So with using new iOS 7 feature Silent pushNotification and didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler: method i need to start location

Region monitoring current location doesn't notify on exit

坚强是说给别人听的谎言 提交于 2019-12-03 00:48:36
I'm trying to test region monitoring, for that I'm getting current location like this: - (void)startLocationTracking { CLLocationManager *locationManager = [[CLLocationManager alloc] init]; // Start location manager if ([CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized) { locationManager = [LocationTracker sharedLocationManager]; locationManager.delegate = self; [locationManager startMonitoringSignificantLocationChanges]; } } And tracking first location with region monitoring like this: -(void)locationManager:

how to request the user to turn on location services

拜拜、爱过 提交于 2019-12-02 22:32:00
问题 I need my app to access the user's current location. It checks at the beginning of the app if the user has it set or not. and if not i need the app to show a prompt for it to use location services. Like a an alert view and on lick of the button it should take you to the screen of location services on iphone. 回答1: You can check the for locationServicesEnabled and if the location service is allowed for your application by this code: if([CLLocationManager locationServicesEnabled] &&

Current location in not working in Google Map

左心房为你撑大大i 提交于 2019-12-02 20:59:46
I have integrated google map in swift 3, when map screen appear than current location in not showing, i have added two keys in .plist file and also set CLLocationManager delegate and requestAlwaysAuthorization class MapViewController: UIViewController, CLLocationManagerDelegate, UITextFieldDelegate { @IBOutlet var mapView: GMSMapView! var marker: GMSMarker? override func viewDidLoad() { super.viewDidLoad() self.title = "MapVC" self.doSetupUI() self.searchLocation() } override func viewWillAppear(_ animated: Bool) { let locationManager : CLLocationManager = CLLocationManager() locationManager

locationServicesEnabled always return YES

ⅰ亾dé卋堺 提交于 2019-12-02 20:59:20
I tested my device (iPod Touch 2G iOS 4.1) if location services are enabled permitted = [locationManager locationServicesEnabled]; and I always get a YES whether location services are enabled or not. I'm talking about the general button for location services and not the app specific button. On iPad with iOS 3.2.2 everything is working fine. When you implement the delegate for location manager, you should be implementing didFailWithError. In there you will get the appropriate error if the user did not allow access to location Apple Documentation States: If the user denies your application’s use