Latest 0.0.4
Homepage https://github.com/prolificinteractive/AddressGeocoder
License MIT
Platforms ios 9.0, requires ARC
Authors

Travis build status
Cocoapods Compatible
Platform
Docs

Description

AddressGeocoder is a helper tool to get the state and locality for a given zip code.

For example, providing 95014 will return Cupertino as the city and CA as the state.

AddressGeocoder relies on the CoreLocation APIs to get the address information, and parses the generated formatted address for better and more accurate results.

Requirements

  • iOS 9+
  • Xcode 8
  • Swift 3+

Installation

To use in your projects, simply add the following line to your Podfile:

pod 'AddressGeocoder'

You can then use AddressGeocoder by importing it into your files:

import AddressGeocoder

Usage

struct Geocoder: Geocodable { }
let geocoder = Geocoder()

geocoder.geocodeAddress(
  using: "11201",
  forCountry: "US",
  completion: { (result: Result<GeocodedAddress, GeocodingError>) -> () in
    if let address = result.value {
      self.addressLabel.text = address.locality + ", " + address.state
    }
  }
)

Contributing to AddressGeocoder

To report a bug or enhancement request, feel free to file an issue under the respective heading.

If you wish to contribute to the project, fork this repo and submit a pull request. Code contributions should follow the standards specified in the Prolific Swift Style Guide.

License

prolific

Copyright (c) 2017 Prolific Interactive

AddressGeocoder is maintained and sponsored by Prolific Interactive. It may be redistributed under the terms specified in the LICENSE file.

Latest podspec

{
    "name": "AddressGeocoder",
    "version": "0.0.4",
    "summary": "Geocoding Helper",
    "description": "Geocoding helper. Can provide a locality, coordinates and state based on a ZIP code.",
    "homepage": "https://github.com/prolificinteractive/AddressGeocoder",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Thibault Klein": "[email protected]"
    },
    "source": {
        "git": "https://github.com/prolificinteractive/AddressGeocoder.git",
        "tag": "0.0.4"
    },
    "platforms": {
        "ios": "9.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*.{swift}"
}

Pin It on Pinterest

Share This