Skip to content

Swift library for checking your IP address from ipify.org

License

Notifications You must be signed in to change notification settings

PeterLi/swift-ipify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ipify

[![CI Status](http://img.shields.io/travis/Vincent Peng/Ipify.svg?style=flat)](https://travis-ci.org/Vincent Peng/Ipify) 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 3
  • iOS 8+

Installation

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

pod "Ipify"

###Carthage

github "vincent-peng/swift-ipify"

Author

Vincent Peng, [email protected]

Credit

Big thanks to Randall Degges for running and maintaining ipify!

License

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

About

Swift library for checking your IP address from ipify.org

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 83.5%
  • Ruby 9.7%
  • Objective-C 6.8%