是否可以通过电子邮件下载我的 iPhone 中的文件
我正在开发一个应用程序,其中我写入一个xml文件,然后通过电子邮件发送它,在接收端,接收者在他/她的收件箱中收到它,并将文件下载到iphone,然后在他的手机上打开相同的应用程序浏览到该文件,然后单击同步按钮,程序应该解析 xml 文件中的标签。 一切都很清楚,但我不确定我们是否可以将文件下载到我们的 iPhone 并通过它浏览我们的应用程序。
谢谢,我很感激。 :)
I am working on an application in which i write to an xml file and then send it through email and at the reciever end the receiver recives it in his/her inbox and download the file to the iphone and then open the same app on his phone and browse to this file and by clicking sync button the progra should parse the tags in the xml file.
Everything is cler but i am not sure whether we can download a file to our iphone and browse thru it our app.
Thanks, i appreciate. :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不,我不相信您可以从邮件下载文件并将其传递到您的应用程序以打开和阅读。这是出于安全原因。
我认为实现这一点的唯一方法是不使用 XML 文件,而是构造带有参数的 URL。
不过,这里也有一些缺点。根据需要传递的数据量,URL 可能会变得相当大。您必须考虑确保每个参数值都经过正确的 URL 转义。您可能必须编写代码来解析参数中的数据。
这就是其他应用程序在应用程序之间传递数据的方式,例如 iPhone 的电话应用程序。您可以使用
tel://
URL 让它呼叫号码。您可以在应用程序中注册 URL 方案并使用它来传递数据。
No, I don't believe you can download a file from mail and pass it to your app to open and read. This would be for security reasons.
I think the only way to achieve this would be to not use an XML file, and instead construct a URL with parameters.
There are a few drawbacks here, though. Depending on how much data you need to pass, the url could get pretty large. You would have to take considerations to make sure that each parameter value is properly URL escaped. And you could have to write code to parse the data in the parameters.
This is how other apps pass data between apps, an example would be the iPhone's Phone app. You can make it call a number by using a
tel://
URL.You can register a URL scheme in your app and use it to pass data around.