core-location

App killed by OS in ios7 after some seconds -edit

回眸只為那壹抹淺笑 提交于 2019-12-08 02:34:34
问题 I am creating navigation based app for iOS 7 , for it I am taking users location data, Using CoreLocation framework, App requirement is to start getting users location in background at particular time, For that I have implemented Silent Pushnotification with didReceiveRemoteNotification fetchCompletionHandler: method, I have successfully implement this Using Silent Pushnotification & it Call startUpdatingLocation and I am able to get location data in delegate method : Using This Payload: {

How does the distanceFromLocation method work?

风流意气都作罢 提交于 2019-12-07 18:48:05
问题 I frequently use the distanceFromLocation method for CLLocation objects to get their distance from other locations. Enumerating through an array of CLLocations, I then compare each to my reference location using this method. I'm curious to know the processing/memory implications for using distanceFromLocation , especially for a large number of CLLocation objects in succession. How does this method work - does it connect to the server to get the data, or does it calculate the distance based on

Testing custom location with simulator

自闭症网瘾萝莉.ら 提交于 2019-12-07 12:31:45
问题 I just spent the last hour searching - thinking that there has to be an answer - and didn't find much, so I'm asking here. I'm trying to get the sample app Regions to trigger enter and/or exit regions updates via the simulator. I'm familiar with setting a specific latitude and longitude with Debug > Location > Custom Location but that doesn't seem to do much, although it does seem to work in the LocateMe sample app. At this point I don't know if the problem is a limitation of the iOS

iOS 6 Map doesn't zoom with MKUserTrackingModeFollow

一曲冷凌霜 提交于 2019-12-07 11:13:38
问题 While my iOS6 MKMapView is in MKUserTrackingModeFollowWithHeading or MKUserTrackingModeFollow , zoom gestures (pinch, double-tap, two-finger tap) work sometimes, but not always. The issue seems to occur when didUpdateUserLocation: is called after regionWillChangeAnimated and before regionDidChangeAnimated . Any ideas on how to fix this? To isolate the problems, I've created a Single View Application with an MKMapView and a UIToolbar (set up in a .xib), to which I'm adding a

iOS how can I make MapKit display custom indoor map?

时间秒杀一切 提交于 2019-12-07 10:33:02
问题 I'm trying to create a map of the office I'm working at. I have a high resolution image, and would like to autorotate it in the direction the user is heading, allowing the user to navigate around the map. I thought this could be accomplished using CoreMotion/CoreLocation and a UIScrollView, but this seems like there's some work involved. So I'm wondering if there are easier solutions for combining a custom map and direction/position on that map - can MapKit handle this for me? Are there other

Core Location keeps asking for permission

╄→гoц情女王★ 提交于 2019-12-07 08:27:16
问题 I could have sworn that the expected behavior for the core location permission dialog is something like this: if the user clicks "Yes", it will not be shown again if the user clicks "No", it is shown one more time, the next time the app launches. If the user clicks "No" a second time, it will not be shown again. What I'm actually seeing is the following: the user has to click "Yes" twice in a row for that preference to be remembered no matter how many times the user clicks "No", that

Re-enable iPhone Simulator location services

こ雲淡風輕ζ 提交于 2019-12-07 07:30:41
问题 I have disabled location services on the simulator with the "Don't ask again" option set, thinking that I could re-enable it later, but now I can't find out how. Can someone point me out where to change this setting? Thanks. 回答1: Solution: System Preferences > Security > (Button) Reset Warnings You may need to click the lock in the bottom left side before you can click that button. 回答2: I did this and it worked: iOS Simulator > Reset Contents and Settings... That deleted the apps installed in

significant location change does not trigger at least every 15min

倾然丶 夕夏残阳落幕 提交于 2019-12-07 07:07:05
问题 According to apple docs, significant location change should update location at least every 15min. I am indeed receiving updates when I move significantly, but not when the device is stationary. What is your experience with updates? Do they come at least every 15min? If GPS-level accuracy isn’t critical for your app and you don’t need continuous tracking, you can use the significant-change location service. It’s crucial that you use the significant-change location service correctly, because it

Am I right in saying initWithNibName:bundle is used to manually load nib files and that initWithCoder would be used as an alternative?

穿精又带淫゛_ 提交于 2019-12-07 06:07:24
问题 I can't use initWithNibName:bundle seeing as I'm now using the latest XCode (5). After some research I found an alternative: initWithCoder. Example: - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if (self){ // code here } return self; } What I'm trying to understand is how this is an alternative to initWithNibName? Currently studying with a big nerd ranch book for ios which was written for ios6 and previous versions of xode and experimenting with the

What is the fastest way to sort a lot of locations on distance?

僤鯓⒐⒋嵵緔 提交于 2019-12-07 05:30:26
问题 I want to sort lots of locations (waypoints) on their distance from the current location. The current location is, of course, a moving target, so for every location update, recomputing the distance for every location is necessary. But only recomputing for close-by locations would by enough. I currently use core-data, and store the distance to the current location as an attribute in the table (but only update is when it is changed) from within the configurecell: atindexpath: method. That sort