core-location

Apple's core location prompt - why does it jump back to Root View controller?

寵の児 提交于 2019-12-25 10:49:19
问题 I have an iPhone app using a UINavigationController. On the fourth controller of the stack, I'm doing some Core Location stuff - so, the first couples of times that the user uses my app, they are asked if it's ok to use Location Services. This is a process that (I think) I don't have any control over. After the user confirms, they are actually bumped back to my root view controller in the navigation controller stack. Is this a bug, am I doing something wrong, or is this expected behavior? I

Apple's core location prompt - why does it jump back to Root View controller?

爷,独闯天下 提交于 2019-12-25 10:48:30
问题 I have an iPhone app using a UINavigationController. On the fourth controller of the stack, I'm doing some Core Location stuff - so, the first couples of times that the user uses my app, they are asked if it's ok to use Location Services. This is a process that (I think) I don't have any control over. After the user confirms, they are actually bumped back to my root view controller in the navigation controller stack. Is this a bug, am I doing something wrong, or is this expected behavior? I

How to calculate the distance travelled by user from current location in swift 3.0

天涯浪子 提交于 2019-12-25 08:38:15
问题 I am using UImapkit & core location frameworks How will I get the total polyLine distance & travelled time this my code func locationManager(_ manager: CLLocationManager!, didUpdateToLocation newLocation: CLLocation!, fromLocation oldLocation: CLLocation!) { if let oldLocationNew = oldLocation as CLLocation?{ let oldCoordinates = oldLocationNew.coordinate let newCoordinates = newLocation.coordinate var area = [oldCoordinates, newCoordinates] print(area) let polyline = MKPolyline(coordinates:

How to get accurate location update when application is killed?

别来无恙 提交于 2019-12-25 03:42:24
问题 I'm developing a location based application where user can stored number of locations and when user passed near by that stored location, application will notify user by local notification. I've used following code to achieve this feature: -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if([[UIApplication sharedApplication] backgroundRefreshStatus] == UIBackgroundRefreshStatusDenied){ [self showAlertWithTitle:@"" andMessage:@"The

How to resolve a core location logic in iOS app

元气小坏坏 提交于 2019-12-25 02:38:24
问题 I'm having a problem with the core location logic in my app. The following code is in the rootviewcontroller . It should test to see, if the user has allowed gps/location services on or off for the app and then make a decision and move to one of two view controllers . The app should run this test when it launches. Also if the user goes into the device Settings and changes the Privacy > Location Services > App Name > ON/OFF and relaunches the app then it should go through the process again.

how to get old location from corelocation

China☆狼群 提交于 2019-12-25 02:06:51
问题 - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations locations array last object holds new location, How to get the previous location? 回答1: You should create and use a mutable array of previous locations that were updated from previous calls to " locationManager: didUpdateLocations: ". According to the Apple documentation, the only time that " locations " array passed in via the delegate method will have more than one entry will be "If update events

Core Location can't get data in viewDidLoad

自作多情 提交于 2019-12-24 22:33:22
问题 I wrote a simple iOS application that retrieves location information and then uses the location to request Yahoo Weather. The problem is that even when I call the Core Location in the viewDidLoad, it won't give me the result immediately. So why can't I get the location information? How can I get the location information in viewDidLoad? The pseudocode currently is something like: - (void)viewDidLoad { [super viewDidLoad]; self.locManager = [[CLLocationManager alloc] init]; self.locManager

using UILocalNotification with core location

谁都会走 提交于 2019-12-24 17:13:00
问题 I have this code which send user notifications every time the distance between an event that occur in a local JSON file and his current location is < 100 meter asking him whether he is at that event or not , when he presses on yes then that event will be marked as attended. the thing is I tried to do that by using some code i found online but I'm not sure if it is the right way to do it, anyway i tested it on my iPhone and what happened is when i arrived to an event location it kept sending

Stopping CoreLocation background updates

无人久伴 提交于 2019-12-24 09:39:16
问题 My app registers for background location updates (not Significant Change. I need more granularity than kilometers) That part works fine. I just want to stop the updates after the app has been in the background for 60 minutes. The way I'm doing it right now is to call stopUpdatingLocation in my CLLocationManager delegate. However, I am unsure if this will actually stop my app from receiving background location updates, or if it will , but will just ignore them. Ideally, I'd like to not have my

Core Location Indoor Positioning

谁都会走 提交于 2019-12-24 06:18:17
问题 The Core Location video from WWDC 2014 talks about how IOS 8 uses WiFi access points, RF parametric data, and motion sensor to determine indoor positioning. I have been looking through the current documentation for Core Location and cannot find any detailed information regarding what was brought up in that video. I go to a university with a closed campus, and wifi is everywhere. If iPhone indeed uses WiFi access points ... to determine indoor positioning, theoretically there should be plenty