core-location

How accurate is CoreLocation's accuracy measurement

痴心易碎 提交于 2019-12-07 03:33:47
问题 I have been testing the accuracy of various aspects of CoreLocation and have been surprised to find the accuracy value supplied on new and old locations passed to the CLLocationMangerDelegate method: (void)locationManager:didUpdateToLocation:fromLocation is wildly inaccurate itself. Walking certain stretches of pavement(along a stretch of road with buildings along one side) I have found that whilst CLLocationManager claims the CLLocations it is supplying have a horizontal accuracy of 5 meters

using CLLocation objects as keys in dictionary

我是研究僧i 提交于 2019-12-07 03:16:48
问题 Is it possible to use CLLocation objects as keys in a dictionary? When I try this, the [dictionary objectForKey: clLocationObj] always returns nil even when there are CLLocation keys already inserted with exactly the same latitude and longitude. What could I be doing wrong? for (Location *location in someArray) { CLLocation *locationKey = [[CLLocation alloc] initWithLatitude:[location.latitude doubleValue] longitude:[location.longtitude doubleValue]]; LocationAnnotation *annotationAtLocation

Disable location service in iPhone simulator?

本小妞迷上赌 提交于 2019-12-07 02:53:35
问题 I'd like to test what happens if my app can't get the location coordinates. Is it possible to disable the location service in the simulator, like on an iPod Touch with WiFI turned off? I still don't have my iPhone Developer Program certificate, so I can't test it on my device. Thanks in advance! 回答1: As a workaround you can try to simulate update location failure by constructing NSError object with appropriate values and calling corresponding CLLocationManager delegate didFailWithError:

Getting user location when app is in background. IOS

别说谁变了你拦得住时间么 提交于 2019-12-07 01:55:34
I'm developing an app that works in the background to get the user's location and send it to server using http requests. My first intention was to get the user's location every n minutes, but after alot of research and trial, i gave up since ios kills my background tasks after 3 minutes. Then i tried working on MonitoringSignificantLocationChanges, but its inaccurate location updates due to cell tower usage ruins the purpose of my app. A solution to any of the following is greatly appreciated: Getting user's location in background every n minutes infinitely. Getting user's location in

Creating GPX file from array of CLLocation

泄露秘密 提交于 2019-12-06 23:21:14
问题 My application needs to share array of CLLocations (Route) within devices using application.I have no experience of using GPX before this. Is GPX is best format to do it? How can I create GPX file from given such array of CLLocations? and is there standard GPX parser in Objective C? From what I have searched on net and SO answer to these questions are respectively 1.cant say 2. I have seen some webpages converting data of points in GPX format but could not find how they are doing it. 3. No I

iOS Crash Core Location CFBasicHashCreateCopy?

為{幸葍}努か 提交于 2019-12-06 19:12:18
问题 I've got this issue being reported via Crashlytics, although I've been unable to replicate it locally, so I've got nothing to go on other than the stack trace below.. Not sure if the references to CoreLocation in the stack trace have anything to do with it, but I'm not sure what could possibly be the cause. My project is using ARC. Any clue? Thread : Crashed: com.apple.CoreLocation.ConnectionClient.0x14eb3510.events 0 CoreFoundation 0x307769a8 CFBasicHashCreateCopy + 712 1 libobjc.A.dylib

missing required architecture i386 in file

混江龙づ霸主 提交于 2019-12-06 18:45:12
问题 I am having trouble building my app after adding MapKit and CoreLocation frameworks. They are both 4.3 frameworks, and the app used to work fine with UIKit, CoreGraphics, and Foundation, just giving me problems with these two. Not sure what the required architecture is, there aren't any bugs in the code. Any help is appreciated! ld: warning: ignoring file /Users/F3d3r3r/Desktop/testNav4_3/MapKit.framework/MapKit, missing required architecture i386 in file ld: warning: ignoring file /Users

iOS Region Monitoring not working

白昼怎懂夜的黑 提交于 2019-12-06 14:21:26
I have been doing some iOS development for a couple of months and recently I am developing a bus app. I am currently mimicking the bus' movements and set up multiple annotations on the bus stops. For test purposes, I have setup just one bus stop and am trying to monitor when the bus has entered this region and exited as well. Strangely, my didStartMonitoringForRegion method is called perfectly but neither the didEnterRegion nor didExitRegion methods are called. Every time I run the program, the bus pretty much passes the stop without prompting me so. Could someone explain to me why this is

Xcode greys out gpx files in filebox

孤街醉人 提交于 2019-12-06 13:40:36
问题 I hope I'm not overlooking anything, but I can't load gpx files into Xcode because they are greyed out in the filebox (see pic). This is in both location menues, in the debugger/location menu (see pic below "Add GPX File to Project" and the scema location menu. However, the presets (London etc) do work. Selecting "Add GPX File to Project" gives me the greyed out gpx files: It's fine and right that all other files are greyed out here, but gpx files should be not greyed out. BTW: it won't help

iOS 5 Region Monitoring: Can new regions be created based on users current coordinates from coreLocation?

陌路散爱 提交于 2019-12-06 13:13:42
My question is regarding the creation of regions for regionMonitoring in iOS 5. Can new regions be created based on user of the app's current location? Or do all regions need to be predefined by the developer in the applications binary? I know you can have certain regions register based on the users current location, because the os puts a limit on the number of regions that the phone/app can be monitoring at one time, and you should only register the regions within close proximity to the users current location... but can a region (previously undefined) be created on the fly based on the users