An open API service indexing awesome lists of open source software.

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.

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)