Resolved Help with registering application to open xmls

Discussion in 'iOS Programming' started by waterskier2007, Jan 30, 2013.

  1. waterskier2007, Jan 30, 2013
    Last edited: Feb 5, 2013

    macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #1
    I am attempting to get my app to handle xmls for loading of data. I have successfully gotten the app to be registered, so for example, when I open an xml in an email I get my app as one of the "Open In..." options. Then when I go to my app, in the delegate I am implementing

    Code:
    -(BOOL)application: openURL: sourceApplication: annotation
    {
         //just for debugging
         NSString *urlString = [url description];
    }
    
    However, all of the variables in that method are nil. It is getting called because I am setting some breakpoints, but url, sourceapplication, annotation are all nil.

    Does anyone have any idea what I could be doing wrong?
     
  2. macrumors 603

    Joined:
    Aug 9, 2009
    #2
    If that's not your actual code, post your actual code.

    If that is your actual code, you're missing the parameters.
     
  3. thread starter macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #3
    I left out the parameters because I didn't feel like typing them, my apologies.

    It ended up working after a while, with no change by me. Not sure what it was but it's possible it just took some time to fully register the app to accept the incoming file information...


    Code:
    -(BOOL)application:application openURL:url sourceApplication:sourceApplication annotation:annotation
    {
         //just for debugging
         NSString *urlString = [url description];
    }
    
     
  4. macrumors 6502

    Joined:
    Jun 22, 2010
    Location:
    @
    #4
    Odd.

    I experimented with adding VCard support so that my App could open saved locations from the Maps App. I could not get the Mail App to open my App for VCards. It did work with PDFs though (no reboots, no time -- it just worked).
     

Share This Page