ideaismobile / aklocationmanager Goto Github PK
View Code? Open in Web Editor NEWSimple CLLocationManager subclass with block support and convenience methods. Makes much easier to get simple location updates.
License: MIT License
Simple CLLocationManager subclass with block support and convenience methods. Makes much easier to get simple location updates.
License: MIT License
Hello and thanks for your code
i think in the
this way it respects the user's choice when setting the timeout like this:
[AKLocationManager setTimeoutTimeInterval:2];
thanks
If the app is a fresh install and no other location service have asked for permission yet this library will not work. The startLocatingWithUpdateBlock first checks canLocate to see if it is allowed, which will return false because the user hasn't given permission yet. Permission is ask when startUpdatingLocation is called but the library never gets to that point.
Easy fix is to simply remove this:
if (![AKLocationManager canLocate])
{
didFail([NSError errorWithDomain:kAKLocationManagerErrorDomain
code:AKLocationManagerErrorCannotLocate
userInfo:nil]);
return;
}
the didFail block will be called if permission hasn't been given so the initial check isn't necessary.
Hi!
When do you plan to release latest bug fixes? I would like to use them directly via CocoaPods, not from GitHub directly.
Thank in advance
I've been using this successfully for the past couple of months, and for some reason today I started having this problem where neither of the completion blocks are getting called using startLocatingWithUpdateBlock. See log below...
2013-10-31 10:23:51.118 selfpay-ios[4990:60b] -[DRAAppDelegate locate] line 127 $ Locating user...
2013-10-31 10:23:51.137 selfpay-ios[4990:60b] AKLocation - [Line 102]
Started locating
==============
Distance filter accuracy: 100.00
Desired accuracy: 10.00
Timeout: 10.00
2013-10-31 10:23:51.920 selfpay-ios[4990:60b] AKLocation - [Line 127]
Did update location:
<+43.52232303,-79.60962133> +/- 50.00m (speed 0.00 mps / course -1.00) @ 10/31/2013, 10:23:51 AM Eastern Daylight Time
Altitude: 82.882385
Vertical accuracy: 3.000000
2013-10-31 10:24:01.138 selfpay-ios[4990:60b] AKLocation - [Line 107] Timer ended. Stopping AKLocationManager.
Several times I would wait up to 5 minutes with no block being called. The other times, the failure block would eventually be called about 45s after the timer ended.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.