Differences - CFNetwork / NSURLConnection

I searched for the differences between them (usually for a simple request using HTTP / HTTPS), but I could not find anything. Is there any difference? I ask this because when I need it, I just use NSURLConnection, and I have seen many people recommending using AFNetworking (based on CFNetwork).

Hello!

+7
ios nsurlconnection cfnetwork
source share
1 answer

CFNetwork is a lower-level C class, which basically ends with the NSURLConnection class at a high level of abstraction. You are right to use NSURLConnection. The reason people recommend frameworks like AFNetworking is because they do more than NSURLConnection in smaller lines of code.

The following is a comparison of AFNetworking, ASIHTTPRequest and NSURLRequest: ASIHTTPRequest vs AFNetworking vs NSUrlRequest

My favorite network environment for Objetive-C is actually MKNetworkKit: https://github.com/MugunthKumar/MKNetworkKit

This is also a good abstraction, but allows efficient processing of connections using successful and fault-tolerant blocks.

+8
source share

All Articles