core-location

Simulate Location including movement in Xcode 4.2 / iOS5

耗尽温柔 提交于 2019-12-18 17:15:24
问题 I've seen Apple demoing the new simulator features in iOS5, and apart from static locations, they showed off the ability to simulate location movement on an application running on the Simulator. I have successfully simulated single locations using GPX files, but I can't find any way of simulating movement. Did this feature get dropped at the last minute or am I missing something obvious? 回答1: The <wpt> type supports a <time> element which can be used to simulate movement. Xcode will just go

Simulate Location including movement in Xcode 4.2 / iOS5

爷,独闯天下 提交于 2019-12-18 17:15:05
问题 I've seen Apple demoing the new simulator features in iOS5, and apart from static locations, they showed off the ability to simulate location movement on an application running on the Simulator. I have successfully simulated single locations using GPX files, but I can't find any way of simulating movement. Did this feature get dropped at the last minute or am I missing something obvious? 回答1: The <wpt> type supports a <time> element which can be used to simulate movement. Xcode will just go

How to get current location latitude and longitude in IOS SDK 8.0

丶灬走出姿态 提交于 2019-12-18 15:54:36
问题 how to get current location latitude and longitude. I have try this. Using Xcode 6.01 and IOS SDK 8.0 -(CLLocationCoordinate2D) getLocation{ locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = kCLDistanceFilterNone; [locationManager startUpdatingLocation]; CLLocation *location = [locationManager location]; CLLocationCoordinate2D coordinate = [location coordinate];

How to keep GPS app running in background without pauses

这一生的挚爱 提交于 2019-12-18 13:52:12
问题 I have a problem keeping the GPS running in background. I succeded to keep the GPS running when the app is in background, but it stops sometimes. I noticed that it stops when i enter in a building and i stay there for 2-3 hours. "Stops" means that i don't receive any GPS point even though the location service icon is still on. Then when i get out i don't receive any points until I bring my application to foreground. I set the pausesLocationUpdatesAutomatically property to NO. So, everything

If background applications can't launch automatically how does Cardcase launch on a location change?

依然范特西╮ 提交于 2019-12-18 13:48:08
问题 The Cardcase application lets you know if you approach a shop which you have a previous relationship with (if you've set up a tab for payments there etc.). If background running applications cannot be started automatically on device boot, how does this app therefore work? Edited to make my question clearer: I am not asking how to monitor for location changes or how to monitor for location changes in the background. My question is, if the user install this app, then adds some tabs for some

iPhone SDK 6 Launching maps with voice navigation directions

强颜欢笑 提交于 2019-12-18 13:38:54
问题 I am trying to launch the maps app from my iPhone SDK app. Right now I can launch the maps app with directions but it goes to an overview of the directions and doesn't use Siri and the voice navigation to give turn by turn directions. currently I have a button that launches this code... NSString *address = viewedObject.addressFull; NSString *url = [NSString stringWithFormat: @"http://maps.apple.com/maps?saddr=%f,%f&daddr=%@", here.latitude, here.longitude, [address

Will ios terminate the app running in background after a specific time?

半城伤御伤魂 提交于 2019-12-18 13:32:09
问题 I am using core location framework inside my application and I set the location string in UIBackgroundMode or Required background modes(in Xcode 4.2) for getting the updated location from didUpdateToLocation method when app is running in background and also sending this updated location to server by hitting the specific link inside didUpdateToLocation method of core location framework. My question is that will the app be terminated after some time when running in background or not? 回答1: No,

Send location updates every 30 minutes in Swift

自闭症网瘾萝莉.ら 提交于 2019-12-18 11:48:25
问题 I have background mode on for location services and aiming to send out location (latitude and longitude) to the server every 30 minutes. For now I am printing the same in the console. It seems to work for a while but I am wondering how do I work with NSTimer in this case. And from where should I be calling it? import UIKit import CoreLocation @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate { var window: UIWindow? var locationManager =

Is it possible to call alert “Allow to use current location” manually?

霸气de小男生 提交于 2019-12-18 09:05:40
问题 Is it possible to call alert "Allow to use current location" manually when using CoreLocation framework? 回答1: No, it's automatically displayed when the app accesses Core Location. If the user rejects it, it's displayed a second time at the next launch, then it keeps quiet and isn't shown anymore. See this answer how to detect if the user rejected the request. 来源: https://stackoverflow.com/questions/3749648/is-it-possible-to-call-alert-allow-to-use-current-location-manually

requestWhenInUseAuthorization() not Work in iOS 8 With NSLocationWhenInUseUsageDescription Key in Info.plist

泪湿孤枕 提交于 2019-12-18 06:57:05
问题 I am using iOS SDK 8.1 trying to call requestWhenInUseAuthorization() method to prompt user to grant access to my app. I imported CoreLocation.framework, and added NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription keys into info.plist. When I ran the app, it never prompted me for location access. Below is my code, what have I missed? import UIKit import CoreLocation import MapKit class ViewController: UIViewController, CLLocationManagerDelegate { override func