In my iOS app, once a month I want to email or FTP a file automatically to myself… The file is in the app’s documents folder and I do not want the app’s User to have to anything to make it happen…
iOS has very simple methods for sending emails (FTP also, but more complex, as a server is required)… however Xojo does not currently (to my knowledge) expose those methods as part of the normal syntax, and it will required adding band-aid (I mean declares) to you code.
I have non Xojo code that emails files, but I’m NOT sure even it can do it invisibly (ie, without presenting a dialog to the user to confirm the email)
Dave thanks for your reply… Jason has a class that will send emails that I have used before but it requires user interaction… but I do not want the user to have to do anything.
You should always require user interaction before sending emails from their account (that’s what those declares do, and why it pops up the email view.)
To get data out without asking the user you could upload it to your server with a socket.
Tim… actually it is not from “their” account… It is my iPad and my account they are just using it… the iPad is actually being used in a kiosk situation… and I need to get the results of data those users are entering.
Dave… except that the iPad is in a different country and I will only have access to it a few times a year… and I need the data more frequently than that.
You could send yourself an email using a transactional email service such as Mandrill by Mailchimp but it has a cost: http://www.mandrill.com/pricing/
I can send you Xojo iOS classes to use Mandrill, create an email, add an attachment and send yourself the email.
This process is completely transparent to the user. I currently use it each time there’s an unhandled exception in the app.
By the way I would recommend to setup the frequency of the emails in a database, maybe the min and max file size of attachment too.
As it seems you don’t get access to the iPad very often, you could update the frequency in DB without even touching the iPad and not waiting for an App update.