TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Feb 2015 |
SPMSupports SPM | ✗ |
Maintained by Zane Shannon.
Swift class for Where Y'at IP-based geolocation.
It's pretty easy:
WhereYat.locate { (location, error) in
if (error == nil) {
// location looks like this:
// var success:Bool = false // eg. true
// var city:String? // eg. "New Orleans"
// var metro_code:NSNumber? // eg. "504"
// var country:String? // eg. "United States"
// var country_code_:String? // eg. "US"
// var time_zone:String? // eg. "America/Chicago"
// var longitude:NSNumber? // eg. "30.123"
// var latitude:NSNumber? // eg. "-90.001"
// var ip:String? // eg. "1.2.3.4"
// var subdivisions:[Dictionary<String, String>]? // e.g. [{name: "Louisiana"}]
//
// Now that you have this information,
// Do your job here
//
//
}
}
WhereYat was originally built as a responsive Javascript tool. It's pretty nice, you should check it out.
This is MIT licensed, so whatever.
Yes, please. Taking pull requests here.