IPAddress2Geolocation is a Swift package that geo locate and geo coordinate a internet IP address
- 1
- 2
- 3
- 4
iOS 13.0+ / macOS 10.15+
.package(url: "https://github.com/jorgeoomm/IPAddress2Geolocation.git", from: "0.0.1")import IPAddress2Geolocation
let lookup = IPAddress2Location()
guard let var location = try? lookup.location(with: "102.130.125.86") else {
return
}
print("\(location.country(with: location)) [\(location.flag(with: location))]")import IPAddress2Geolocation
let lookup = IPAddress2Location()
lookup.printAddress(for: "102.130.125.86")import IPAddress2Geolocation
let lookup = IPAddress2Location()
guard let var location = try? lookup.location(with: "102.130.125.86") else {
return
}
let coordinateLookup = GeoCoordinateLookup()
let locationName = location.subdiv + " - " + location.country
let coordinate = try await coordinateLookup.location(with: locationName)
print("\(coordinate.name) at longitude:\(coordinate.longitude), latitude:\(coordinate.latitude)")IPAddress2Geolocation ...
- [ ]
- [ ]
Apache