If I want to hit REST services from an iOS app what is the most mature library for doing so? What are my best options?
相关问题
- Design RESTful service with multiple ids
- Core Data lightweight migration crashes after App
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- How can I implement password recovery in an iPhone
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Not so mature but very light weight: JNRestClient
You can use RestKit.
Or you can use
NSJSONSerialization
which is already in the foundation framework.Here's an exemple from a project that i made. It fetch an array of drinks from a json webservice:
There is also the new swift rest library called Alamofire (https://github.com/Alamofire/Alamofire), it seems really nice, it has already more than 6000 stars on github and it has been created by Mattt Thompson which means you can go for it without worries.
JSONModel is quite simple to use.
Overcoat+Mantle look really good.
RestKit is a bit verbose, IMHO.
I recommend AFNetworking. The following is a sample code taken from its Github page (there is more samples over there):
Other alternatives are:
Of them all, I think both AFNetworking and RestKit are the most popular. I personally have used extensively AFNetworking, thus why I recommend it.