Skip to content

agoodman/IPAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

======================================

Carthage compatible

About IPAPI

ip-api.com offers a web service to resolve a requesting client's location based on the client's IP address.

Usage

Here's an example
IPAPI.location(NSURLSession.sharedSession())
    .observeOn(MainScheduler.instance)
    .subscribeNext { (geoData: IPGeoData?) in
        // do something with geoData
        // geoData.ispName => ISP Name
        // geoData.ipAddress => IP Address
        // geoData.city => City
        // geoData.region => Region
        // geoData.zipCode => Zip Code
        self.updateLocation(geoData.lat, geoData.lng)
    }
    .addDisposableTo(disposeBag)
    

Requirements

  • Xcode 7+

  • Swift 2.3

  • iOS 8.0+

Installation

IPAPI has an external dependency on RxSwift

These are currently the supported options:

Add this to Cartfile

github "agoodman/IPAPI"
$ carthage update

References

About

Swift Client for ip-api.com

Resources

Stars

Watchers

Forks

Packages

No packages published