如何在本地下载epub文件到我们的iPhone? [英] How to download an epub file locally to our iPhone?
问题描述
我想通过传递文件的网址在本地将epub文件下载到我的应用中:
I want to download an epub file in to my app locally by passing the url of the file:
http://www.jedisaber.com/eBooks/books/sample.epub
单击此URL应下载epub。如何才能将其下载到我的应用程序?
Clicking this url should download an epub. How can I get it to download to my app?
我尝试使用NSData但它不起作用。我也尝试将文件复制到我的文档目录,但它也没有用。谁能告诉我怎么能在Objective-C中做到这一点?
I tried using NSData but it didn't work. I also tried copying the file to my document directory but it also didn't work. Can anybody tell me how can I do this in Objective-C?
任何帮助代码都将不胜感激!
Any help code would be appreciated!
感谢您的帮助。
推荐答案
EPUB是一种ZIP格式,您可以使用任何二进制流下载方法并首先保存文件作为iPhone上的二进制文件。
EPUB is a ZIP format, you can use any Binary Stream Downloading method and save the file first as a binary file on iPhone.
这篇关于如何在本地下载epub文件到我们的iPhone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!