Desktop Core Location
Update 18/Feb/09 @ 19:45 EST: Source code is on BitBucket.org:
hg clone http://bitbucket.org/philippec/desktopcorelocation
Update 5/Feb/09 @ 12:43 EST: It appears that Apple may implement CoreLocation in their next generation desktop OS. Excellent!.
Update 8/Sep/08 @ 22:40 EST: The license is MIT. Share and enjoy!.
Update 8/Sep/08 @ 21:45 EST: This is an IronCoder entry, and is essentially a hack. I’m working on figuring out a license.
My IronCoder entry for c4: a clean-room implementation of Apple’s CoreLocation.framework, complete with sample application.
This is a clean-room implementation of Apple’s CoreLocation framework that is part of the iPhone SDK.
It uses Apple’s own headers, which are installed when you install the iPhone SDK, as the interface, and implements all the functionality of CoreLocation in an embeddable framework.
It can be made a system-wide framework buy changing its executable path from
The Desktop and Phone sample applications are very similar: they both demonstrate using CoreLocation.framework.
How it works
The framework figures out your current, internet-facing IP address using whatismyip.com. It then uses basic IP Geolocation web services to extract latitude and longitude. Results are cached 30 days for each IP address.
There are certainly other IP geolocation services (for instance, SkyHook Wireless) but they required a paid license.
In keeping with the theme, you can drop a file called
/Library/Documents/WebServer/clbl/ and start your webserver. You can then edit the file at will to deny a particular app the use of CoreLocation.
- Sample application that demonstrates using CoreLocation on the iPhone/iPod Touch.
Build and go, it will find your current location (which, in the Simulator, is 1, Infinite Loop, Cupertino, CA). Press the “Show Me” button to go to these coordinates in Google Maps.
- Sample application that demonstrates using CoreLocation on the Desktop. It uses the Desktop CoreLocation framework in exactly the same manner as PhoneLocation, but the results are pulled from my version of the framework.
Press the “Show Me” button to go to these coordinates in Google Maps.
- Stand-alone, embeddable framework
- MacOSX 10.5
- Latest iPhone SDK. Does not contain any Apple proprietary information.
- Internet connexion