This project is an native iOS interface to the Yelp API v2. It is inspired by Apple's MKLocalSearch
, and exists to address the issue that the results from an MKLocalSearch
are not fully inspectable models representing businesses. You can put them on a map; but if you want to know their business hours, or any of the nice Yelp data they have access to, you're out of luck.
Do not use this project. I began working on it on Thursday, June 13th. It is not ready for public consumption.
Work on this project has been stalled just three days in by Yelp apparently removing Latitude and Longitude coordinates from their business listings.
Add to Project with CocoaPods
This project is not yet available as a pod on the main CocoaPods repository. But it will be soon.
- Use CocoaPods for your project
Addyelp-ios-api-v2
as a pod.
- Copy the sample empty
YelpKeys.plist
into your project. - Request keys from Yelp.
- Populate your
YelpKeys.plist
with your Yelp api keys
Here's a simple example of how you might perform a search with a map's bounds and display those results on the map.
YLLocalSearch *search = [[YLLocalSearch alloc] initWithMap:_mapView];
[search localSearchWithTerm:@"pizza"
success:^(YLLocalSearchResponse *results) {
[_mapView removeAnnotations:[_mapView annotations]];
[_mapView addAnnotations:[results businesses]];
}
failure:^(NSError *error) {
NSLog(@"Oh noes! %@",error);
}];
OAuthSearch- Model Objects
Search should return model objects- Model objects should be useful for displaying in an
MKMapView
- Locale Support
The focal components of the project are contained in the yelp-ios-api-v2
directory. Classes and resources within this directory comprise the actual functionality of yelp-ios-api-v2
.
Just about everything else is part of a Harness app that excercises the features of yelp-ios-api-v2
. Classes and resources for the harness reside in the Harness App
directory.