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 in Sydney.

I have worked at places such as Google, Cochlear, News Corp, Fox Sports, NineMSN, FetchTV, Woolworths, and Westpac, among others. If you're looking for a good iOS developer, drop me a line!

Get in touch:
[email protected]
my resume

 Subscribe via RSS