Here's a simple wrapper for CoreLocation to make it easier to find out your rough (~3km accuracy) location in Objective-C on the iPhone. It wraps the delegates up for you so you only need to deal with blocks, which as we all know, are simply awesome.

To use, include the CoreLocation framework, include the two files in these github gists, and use as below:

    [LocationHelper getRoughLocation:^(CLLocation *location) {
        
        if (location) {
            // Found the location! Use it!
        } else {
            NSLog(@"Couldn't find location for some reason");
        }
        
    }];

Here's the gists:

Thanks for reading! And if you want to get in touch, I'd love to hear from you: chris.hulbert at gmail.

Chris Hulbert

(Comp Sci, Hons - UTS)

iOS Developer (Freelancer / Contractor) in Australia.

I have worked at places such as Google, Cochlear, Assembly Payments, News Corp, Fox Sports, NineMSN, FetchTV, Coles, Woolworths, Trust Bank, and Westpac, among others. If you're looking for help developing an iOS app, drop me a line!

Get in touch:
[email protected]
github.com/chrishulbert
linkedin
my resume



 Subscribe via RSS