WebServices solution for iPhone - First Stage
The FileDownload Class After reviewing some examples of how to download a file from an URL and after implementing it by myself, I came to the idea to do it as a separate class. The objective of the new class was to handle the connection and processing needed to do the job. The published methods are: - ( FileDownload *) initWithURL:( NSString *)url callBack:( id < FileDownloadProtocol >)delegate; This initializer is used to immediately start the download process given the desired URL to download and the delegate, which is the object which will receive the downloaded data. Its implementation is as follows: /** Initialize with file to download **/ - ( FileDownload *)initWithURL:( NSString *)url callBack:( id < FileDownloadProtocol >)delegate { [ self init ]; [ self startDownloadFile :url callBack :delegate]; return self ; } I’m not checking if the object was created successfully before starting the download, that’s a to do activity for one day. - ( vo...