Does iPhone support xml-rpc?

Discussion in 'Mac Programming' started by I'm a Mac, Apr 20, 2008.

  1. I'm a Mac macrumors 6502

    Joined:
    Nov 5, 2007
    #1
    I wanted to make an iPhone web application (or actual application) based off a a website that uses XML-RPC. Does anyone know if this is possible, and where I could find resources on how to do that in Dashcode or Xcode?

    Thanks.

    EDIT: So far, I've copied the html source code into dashcode, and rearranged it so it would be optimized for the iPhone, but the information won't submit. Do I just have to had the XML file that contains the API key to get it to work?
     
  2. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #2
    I'm not sure exactly what you mean by XML-RPC, but if you need to use XMLHttpRequest (http://en.wikipedia.org/wiki/XMLHttpRequest) from Safari or a Dashcode app you should be able to with the standard javascript conventions, like you would in "Big" Safari.

    There are some limitations on how long javascript can run, if i recall correctly, so that may be a limited factor if you are wanted to get large chunks of data back, or the foreign system takes a long time to respond. You may be able to mitigate that with callbacks, but I am not entirely sure about that.

    -Lee
     
  3. I'm a Mac thread starter macrumors 6502

    Joined:
    Nov 5, 2007
    #3
    I'm not really sure what I'm doing either... I'm in a little over my head with this programming thing... If you look at my other post, I'm more specific.

    http://forums.macrumors.com/showthread.php?t=472935

    I might want to use it in a regular Mac os x application, too.
     
  4. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #4
    from your other post it looks like you need to build that XML document in javascript, then send it as a parameter to an http POST request, likely using an XMLHttpRequest. There should be more documentation on the calling convention like what server and page that document should be sent to.

    I think this is a better fit for a web page or dashcode widget than a full-blown app. There are probably ways to make http posts in cocoa, but javascript is probably more straight forward.

    -Lee
     
  5. I'm a Mac thread starter macrumors 6502

    Joined:
    Nov 5, 2007
    #5
    Does that mean I have to learn javascript?
     
  6. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #6
    Well, probably. I think that's easier than objective-C and cocoa if you are just starting.
     

Share This Page