Email "Open In" feature

Discussion in 'iPhone/iPad Programming' started by xArtx, Feb 2, 2013.

  1. xArtx, Feb 2, 2013
    Last edited: Feb 2, 2013

    macrumors 6502a

    Joined:
    Mar 30, 2012
    #1
    Hi Guys,
    I'm trying to associate my App with an image file extension. I've tried .bmp, and .png with no luck.

    I've found what looks like some good info on the net:
    http://stackoverflow.com/questions/2774343/how-do-i-associate-file-types-with-an-iphone-application
    http://mobiforge.com/developing/story/importing-exporting-documents-ios?dm_switcher=true

    Brad should know his stuff.

    What I've noticed is that images in email seem to have a different menu
    if you hold your finger on the attachment.
    If I follow Brad's instructions with a made up extension (.bmx), my App does show in the stock
    email app, but there is no longer any preview of the image in the email app.

    Cheers, Art.
     
  2. thread starter macrumors 6502a

    Joined:
    Mar 30, 2012
    #2
    Just a follow up (although I haven't resolved the issue in the first post),

    It occurs to me that if you're only dealing with importing one file at a time,
    such as a file being sent to your app from the stock email app,
    you can just check the existence of the Documents/Inbox directory at
    startup, check it's contents, and if a file exists, deal with it, and then
    move it, or delete it from Documents/Inbox.

    That way you don't have to add anything to AppDelegate or check the
    imported file's URL. Your App can know at startup if it was launched by
    the email app just because a file exists in the Documents/Inbox.
     
  3. macrumors 603

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    You could utilize the pasteboard... have the user tap and hold on the image, select "copy", and then when your app is launched take whatever image is on the system pasteboard...
     
  4. thread starter macrumors 6502a

    Joined:
    Mar 30, 2012
    #4
    Thanks for the reply, and it's a good one, but it won't work for me this time :(
    The pasteboard won't pass data.
    It will pass the UIImage, but once the image data is inside that container,
    it can't seem to be accessed at byte level, which is why I'm interested in bitmaps.

    Since this time I'm going for a charged one. I can't have a user go through
    more gestures than they know there needs to be. It would be ok for me,
    but not for charging someone.
     

Share This Page