An app to get the locations of nearby coffee places
- Xcode v6.1.1
- iOS 8.1
- Foursquare API (updated as on 30/1/2015)
- Shows list of coffee shops nearby
- Sort the list of coffee shops according to distance
- If state of coffee shop (open, closed, open until... or closed until...) is available, display the state of the coffee shop in color (red for closed, green for open)
- Shows price ratings (if available)
- Call coffee shop (if contact info is available) or view the coffee shop in Apple Maps app
- User device has the hardware for geolocation.
- User device is able to make calls
- User device is able to make network calls to foursquare server
- Foursquare API response will maintain JSON structure for the version as on 30/1/2015
- There is an Apple bug in table view cell - table view cell height resets to default when presenting view controller from table view. This only happens when table view cell height is set as automatic and vertical layout constraints are set for the table view cell. To workaround the bug, I set
self.tableView.estimatedRowHeight = 88
inviewDidLoad
for CoffeeListTableViewController - Distances are rounded to the nearest 50 m for visual appeal.
- For the app to get location in iOS Simulator, in iOS Simulator select Debug->Location and choose a location.