Can I set my iPhone app to run when a user opens an e-mail attachment? -


Is there a way to run my app when the user taps on the e-mail attachment, so I access the attachment file

I have to implement any type of backup / restoration for app data that I have to do:

  1. The user has an embedded data file With a special extension (I'm using the new iPhone 3.0 messaging composer)
  2. If the user loses their data, they will be able to open the last sent email by visiting their e-mail box
  3. with the app data file then they only tap on the attached file , Causing my app to run and restore from that file

Is it technically possible the final step?

Thank you

itemprop = "text">

There is a great tutorial in mobile orchard, which is described in a serialized SQL Lite Restore your application database through the custom URL handlers of the database:

(pseudo-directive from the article)

  • Convert your database or application data to NSDTA Base 64 in your e-mail message, and include it in the URL, for example :

    [NSString stringWithFormat: @ "myapplication: // local host / importDatabase% @", encodedStringData]

  • A handleOpenURL method for your AppDelegate implementation Example: AppDelegate implementation:

      #import "GTMBase64.h" - (bool) Application: (UIApplication *) application handleOpenURL:   (NSURL *) Url {if ([@ "/ importDatabase" Excel: [url path]]) {NSString * query = [url query]; NSString * importUrlData = [GTMBase64WebSafDodcastString: Query]; // Note: In practice, you would like to prompt the user to confirm before overwriting your file! [ImportUrlData writeToFile: @ "/ path / to / fullappication / document / file" atom: yes]; Yes come back } no return; }  

    Mobile Orchards at the file size ranges:

    We've moved such files to 100k, and the size of a URL string is theoretically It is limited by that said that this approach is most suitable for applications with small to medium sized data transfer requirements. Although best of all, it can be easily used for SQLite databases, XML files, text files, or even processed compiled archives can be extended.


  • Comments

    Popular posts from this blog

    c# - ListView onScroll event -

    PHP - get image from byte array -

    Linux Terminal Problem with Non-Canonical Terminal I/O app -