如何在iPhone上使用Objective C下载大文件 [英] How to download large files using objective c on iphone
问题描述
我编写了一个可通过http从服务器下载文件的应用程序.使用我的应用程序时,用户将始终处于WLAN上.它可以下载< 10MB的文件,没有任何问题,但是该应用程序仅挂起较大的文件. 是否有下载大型文件的最佳实践方法,还是我需要实现某种形式的分块?
任何代码示例将不胜感激. 非常感谢 托尼
我建议使用 ASIHTTPRequest
库.
它可以在后台下载文件而不会阻止您的应用程序,甚至可以挂接到进度条或类似的栏中. 如何使用" 提供了许多示例和示例代码. /p>
I ve written an app that downloads files from a sever via http. The users will always be on WLAN when using my app. It downloads files of <10MB without any issues but the application just hangs for larger files. Is there a best practice way to download large files or do i need to implement some form of chunking?
Any code samples would be much appreciated. Many thanks Tony
I would recommend using ASIHTTPRequest
library.
It can download files on the background without blocking your app, and can even hook into into a progress bar or something like that. The "How to use it" provides lots of examples and sample code.
这篇关于如何在iPhone上使用Objective C下载大文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!