In the previous recipe, we saw how to upload a file using MKNetworkKit. In this recipe we will be downloading a file from the Internet. Since all of MKNetworkKit's functionality is encapsulated within the
MKNetworkOperation classes, we need to create an engine first.
We will be using the
downloadFileAtPath: method of the
MKNetworkOperation class to download the file at the specified path. We will then add the
addDownloadStream: callback to our
MKNetworkOperation object. This callback will write the file to a stream.
While this recipe downloads an image, we can use the same methods to download any type of file.
This recipe is compatible with both iOS and OS X. We need to download ...