I want to make rest api call. I m confused to use Afnetworking or NSurlsession or alamofire with SWIFT 3.0. Can anyone suggest me to use which one.
NSURLSession
is newer than NSURLConnection
, if you are using swift language then you can use your own custom methods by using NSURLSession
or you can use Alamofire.
The NSURLConnection
used in AFNetworking frameworks, If you are using objective - c then you can use it, that means not that you cannot use NSURLSession
.
NSURLSession
launch after iOS 7.0 or 8.0. It is more efficient that NSURLConnection
.
At last,
If you want to make your own custom API framework then you can use NSURLSession
(for swift)(I also used this).
If you don't required the custom framework then use Alamofire Framework.
For more details you can refer this link:
What are the difference among NSURLConnection, NSURLSession and AFNetworking?
For Swift 3.0 Alamofire is best because it is well Optimized and also reusable and it has also many Build in features.
If You are using Objective- C then you can use AFNetworking.
AFNetworking and Alamofire are from same Developers but in Different Languages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With