Underneath AFNetworking – How to Work With API’s From Scratch
Here’s a cheatsheet of how to make an API request in iOS7+:
Obviously, you need to pick an API, sign up for a developer account and add your application.
Look over the docs and gain an understanding of what is available in the API and what it wants you to provide. Play around with the data by doing sample requests using the API tools, a web browser or tools like Postman REST client.
After you understand what you need to provide, construct an NSURL using constants and NSString (of course).
Inside the completion block, capture and handle the response data using NSJSONSerialization, NSArray, NSDictionary, NSString, regex, etc. to get the data you want. Access and store the data by choosing your poison: models, Core Data, NSUserDefaults, singleton datastore, property, etc. Here’s an example using NSDictionary and NSJSONSerialization: