Browsed by
Tag: afnetworking

[iOS] – Different action of AFURLSessionManager for different OS Version ?>

[iOS] – Different action of AFURLSessionManager for different OS Version

AFURLSessionManager  use to download file from internet, it’s provide some useful delegate to make sure developer can tracking process also error etc… Back to the day, my current project was use AFDownloadRequestOperation which made a wrapper of AFHTTPRequestOperation to download file. But from AFNetworking 3.0, they drop the AFHTTPRequestOperation so we cannot use AFDownloadRequestOperation anymore. We decide to use AFURLSessionManager instead of old library. The problem is AFURLSessionManager has different action about the way it’s fire the delegate. Here is a simple block of download function of AFURLSessionManager:

After testing, I see that the…

Read More Read More

[iOS] – Create API wrapper with AFNetworking ?>

[iOS] – Create API wrapper with AFNetworking

Okay, so why AFNetworking? Well, this is a small quote from github: Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac. That’s enough for a library right? Let’s start! 1. Installation There are some way to install the library, I choose the Pods method because it’s simple and easy to upgrade after….

Read More Read More