Latest 2.1.0
Homepage https://github.com/vincent-peng/swift-ipify
License MIT
Platforms ios 10.0, osx 10.10
Authors

CI Status
Carthage Compatible
Version
License
Platform

Retrieve your public IP address from ipify’s API service.

Usage

import Ipify

Ipify.getPublicIPAddress { result in
    switch result {
    case .success(let ip):
        print(ip) // "210.11.178.112"

    case .failure(let error):
        print(error.localizedDescription)
    }
}

Requirements

  • Swift 4
  • iOS 10+ / macOS 10.10+

Installation

CocoaPods

Ipify is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Ipify"

Carthage

“`:Cartfile
github "vincent-peng/swift-ipify"



## Author

Vincent Peng, [email protected]

## Credit

Big thanks to [Randall Degges](http://www.rdegges.com) for running and maintaining [ipify](https://www.ipify.org)!

## License

Ipify is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Ipify",
    "version": "2.1.0",
    "summary": "Swift library for checking your IP address from ipify.org",
    "description": "Retrieve user's public IP address via ipify's API service.",
    "homepage": "https://github.com/vincent-peng/swift-ipify",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Vincent Peng": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vincent-peng/swift-ipify.git",
        "tag": "2.1.0"
    },
    "social_media_url": "https://twitter.com/_VincentPeng",
    "swift_version": "4.0",
    "platforms": {
        "ios": "10.0",
        "osx": "10.10"
    },
    "source_files": "Ipify/Ipify.swift"
}

Pin It on Pinterest

Share This