Latest 0.1.0
Homepage https://github.com/hozefa26/HIPlaces
License MIT
Platforms ios 7.0, requires ARC
Dependencies AFNetworking
Authors

[![CI Status](http://img.shields.io/travis/Hozefa Indorewala/HIPlaces.svg?style=flat)](https://travis-ci.org/Hozefa Indorewala/HIPlaces)
Version
License
Platform

An Objective – C wrapper for the Google Places API. The library currently includes

  1. Place Autocomplete
  2. Place Details

Requirements

You will need a valid Google API key which you can obtain from the Google Developers Console. Once you have a key, replace the "YOUR_KEY_HERE" string in HIPlaceAutocompleteViewController.m & HIPlaceDetailsTableViewController.m with your Google API key.

Usage

Example

To run the HIPlacesExample project, clone the repo, and run pod install from the HIPlaces directory first. Don’t forget to replace the "YOUR_KEY_HERE" string in HIPlaceAutocompleteViewController.m & HIPlaceDetailsTableViewController.m with your Google API key. If you don’t have one then obtain one from the Google Developers Console.

HIPlacesExample PlaceAutocomplete HIPlacesExample PlaceDetails

API

1. Import HIPlaces

#import <HIPlaces/HIPlaces.h>

2. Set up HIPlacesManager

HIPlacesManager *_placesManager = [[HIPlacesManager alloc] init];
_placesManager.delegate = self;

3. Create and perform PlaceAutocomplete or PlaceDetails requests

HIPlaceAutocompleteRequest *placeAutocompleteRequest = [[HIPlaceAutocompleteRequest alloc] init];
placeAutocompleteRequest.key = @"YOUR_KEY_HERE";
placeAutocompleteRequest.input = @"Paris";
[_placesManager searchForPlaceAutocompleteResultsWithRequest:placeAutocompleteRequest];

HIPlaceDetailsRequest *placeDetailsRequest = [[HIPlaceDetailsRequest alloc] init];
placeDetailsRequest.key = @"YOUR_KEY_HERE";
placeDetailsRequest.placeId = @"ChIJD7fiBh9u5kcRYJSMaMOCCwQ";
[_placesManager searchForPlaceDetailsResultWithRequest:placeDetailsRequest];

4. Set up HIPlacesManagerDelegate protocol methods to handle results

- (void)placesManager:(HIPlacesManager *)placesManager didSearchForPlaceAutocompleteResults:(NSArray *)placeAutocompleteResults
{
    # Do stuff with placeAutocompleteResults
}

- (void)placesManager:(HIPlacesManager *)placesManager searchForPlaceAutocompleteResultsDidFailWithError:(NSError *)error
{
    # Handle error
}

- (void)placesManager:(HIPlacesManager *)placesManager didSearchForPlaceDetailsResult:(HIPlaceDetailsResult *)placeDetailsResult
{
    # Do stuff with placeDetailsResult
}

- (void)placesManager:(HIPlacesManager *)placesManager searchForPlaceDetailsResultDidFailWithError:(NSError *)error
{
    # Handle error
}

Installation

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

pod "HIPlaces"

Author

Hozefa Indorewala, [email protected]

License

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

Latest podspec

{
    "name": "HIPlaces",
    "version": "0.1.0",
    "summary": "An Objective - C wrapper for the Google Places API.",
    "description": "                        An Objective - C wrapper for the Google Places API. The library currently includesnn                        1. Place Autocompleten                        2. Place Detailsn",
    "homepage": "https://github.com/hozefa26/HIPlaces",
    "license": "MIT",
    "authors": {
        "Hozefa Indorewala": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hozefa26/HIPlaces.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "HIPlaces": [
            "Pod/Assets/*.png"
        ]
    },
    "public_header_files": "Pod/Classes/**/*.h",
    "dependencies": {
        "AFNetworking": [
            "~> 2.0"
        ]
    }
}

Pin It on Pinterest

Share This