从WCF服务IOS下载图像和视频

从WCF服务IOS下载图像和视频,ios,objective-c,wcf,uiimageview,uiimage,Ios,Objective C,Wcf,Uiimageview,Uiimage,我是web服务新手,我已经搜索过它,但找不到任何关于它的文档。有没有办法从WCF服务下载图像和视频并保存我的应用程序的文档文件?或者我需要使用不同的下载方式吗 感谢您的建议和兴趣。尝试使用AFNetWorking: 这是我如何从WCF下载文件的示例: NSMutableURLRequest *reqeust = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:{url}]]; AFHTTPRequestOperation *op

我是web服务新手,我已经搜索过它,但找不到任何关于它的文档。有没有办法从WCF服务下载图像和视频并保存我的应用程序的文档文件?或者我需要使用不同的下载方式吗

感谢您的建议和兴趣。

尝试使用AFNetWorking:

这是我如何从WCF下载文件的示例:

NSMutableURLRequest *reqeust = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:{url}]];

AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:reqeust];
operation.outputStream = [NSOutputStream outputStreamToFileAtPath:{path_on_disk} append:NO];

[operation setDownloadProgressBlock:^(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead) {
        //Download progress    
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        //Download failed
    }];

[operation start]