https://github.com/tomdai/trace
Get geocode, calling code, IP, etc. from 1.1.1.1 trace info.
https://github.com/tomdai/trace
calling-codes country-codes geocode geolocation reachability swift
Last synced: 8 months ago
JSON representation
Get geocode, calling code, IP, etc. from 1.1.1.1 trace info.
- Host: GitHub
- URL: https://github.com/tomdai/trace
- Owner: tomdai
- License: unlicense
- Created: 2022-02-03T18:08:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-03T18:32:12.000Z (over 3 years ago)
- Last Synced: 2024-12-27T15:10:38.205Z (9 months ago)
- Topics: calling-codes, country-codes, geocode, geolocation, reachability, swift
- Language: Swift
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trace
Get geocode, calling code, etc. from 1.1.1.1 trace info.
Requires Apple operating systems released in WWDC21 and later.
## Usage Examples
```swift
await Trace.ip
```
Returns `Optional("207.38.1.1")````swift
await Trace.geocode
```
Returns `Optional("US")````swift
await Trace.callingCodes
```
Returns `["1"]`\
Or `["1809","1829","1849"]` (Can be multiple codes for geocode like "DO")\
Or `[]` (Can be empty if no result is found)```swift
await Trace.primaryCallingCode
```
Returns `Optional("1")````swift
await Trace.time
```
Returns `Optional(2022-02-03 17:33:40 +0000)` (The time at which the request is received)