1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

feed vs http

Discussion in 'iPhone/iPad Programming' started by joshsroka, Nov 12, 2008.

  1. macrumors member

    why can i have my program parxe the xml of a http:// feed but it gives an error if i try a feed://, the difference is that after i parse the http clicking the heading takes to to another page, but if i look at the feed:// then clicking the heading plays the track. I am working on a simple program for my church members to stream sermons, it is in the itunes store now but it is a 2 click process, 1 to choose the sermon, which then opens safari where you have to click the link to start the stream. Any tips? thanks, you can search Broadneck EP Sermons to find my app in the store. Thanks again
  2. macrumors 6502a

    What method are you using to download the XML? AFAIK, initWithContentsOfURL and related methods do not support the feed:// URL scheme.
  3. macrumors member

    I am using initWithContentsOfURL any suggestions for a different way of doing it? or do you know of a podcast host that lets you click on the title and it starts streaming rather then going to a info page? thanks
  4. macrumors 6502a

    If the XML contains the link to the streaming media then you could try parsing it out in your code and passing that directly to Safari.

    Alternatively, if it's something fairly standard you could try playing it directly within the app. See this thread for more info: http://forums.macrumors.com/showthread.php?p=6595767#post6595767
  5. macrumors member

    ok so how would i parse the links? If you have used the diggnation on the go app that is basically what i am trying to do for my app. thanks again
  6. macrumors 6502a

    Assuming you're getting XML, check out NSXMLParser (http://developer.apple.com/document...es/NSXMLParser_Class/Reference/Reference.html).

    The SeismicXML code sample (https://developer.apple.com/iphone/library/samplecode/SeismicXML/index.html) shows how it's implemented. (In particular, take a look at XMLReader.m.)

    Alternatively, here's a nice tutorial on the same theme: http://theappleblog.com/2008/08/04/tutorial-build-a-simple-rss-reader-for-iphone/

Share This Page