Sunday 15 August 2010

nsdata - iPhone - dataWithContentsOfURL: does not work for some URLs -


I am using NSDT to get content from a URL (RSS feed) and then parsing it . Although most of the URLs are full, some of them do not return any data.

These URLs are open on the web, so I know they are legitimate, but they do not just return NSData. One such URL - feed: //jpl.nasa.gov/multimedia/rss/vv.xml

Here's how I am using it (NSRR object Is correctly created)

  NSURL * feedURL = [NSURL URLWithString: [myUrl stringbading printing escapus encoding encoding: NSUTF8StringEncoding]]; NSDT * Data = [NSData Datatyh content of URL: feed URL];   

">

Switch to NSURL connection so that you have some representative methods to see that the debugger is taking place if you do not have it load Check the system docs happening.


No comments:

Post a Comment