Giter VIP home page Giter VIP logo

aklocationmanager's People

Contributors

eduardocallado avatar romaonthego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aklocationmanager's Issues

timeout

Hello and thanks for your code

i think in the

  • (void)startLocatingWithUpdateBlock:(LocationUpdateBlock)didUpdate failedBlock:(LocationFailedBlock)didFail
    method the _locationTimeoutTimer should be
    [NSTimer scheduledTimerWithTimeInterval:_timeoutTimeInterval ....
    and not
    [NSTimer scheduledTimerWithTimeInterval:10

this way it respects the user's choice when setting the timeout like this:
[AKLocationManager setTimeoutTimeInterval:2];

thanks

Doesn't Work if the user has not already allowed location services.

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.

New version release

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

timer ends, blocks don't get called

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.