Created
December 31, 2009 21:11
-
-
Save mattetti/266916 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is how you can get a user's location using MacRuby and CoreLocation | |
framework 'CoreLocation' | |
def locationManager(manager, didUpdateToLocation: new_location, fromLocation: old_location) | |
puts "location: #{new_location.description}" | |
exit | |
end | |
loc = CLLocationManager.alloc.init | |
loc.delegate = self | |
loc.startUpdatingLocation | |
NSRunLoop.currentRunLoop.runUntilDate(NSDate.distantFuture) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment