is it possible to download a file in my iphone throuh email
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 f开发者_如何学Pythonile 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. :)
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.
精彩评论