Getting empty xmlCheck results back from server (pg 444)


#1

Hello,
I’m running iOS 7 and Xcode 5 and ran into a stumbling block on page 444. The XML that comes back from the server is an empty string displayed in the console (method conncetionDidFinishLoading). My iPad/laptop connects to the Internet. Copying and pasting the URL produces results in Chrome, but not in Safari.

[code]- (void) fetchEntries
{
// Create a URL that will ask the service for what you want
// note we can concatenate literal strings together on multiple
// lines in this way - this resutls in a single NSString instance
NSURL *url = [NSURL URLWithString: @"http://forums.bignerdranch.com/smartfeed.php?"
@“limit=7_DAY&sort_by=standard&feed_type=RSS2.0&feed_style=COMPACT”];

// For Apple's Hot News feed, replace the line above with
// NSURL *url = [NSURL URLWithString: @"http://www.apple.com/pr/feeds/pr.rss"];

// Put that URL into an NSURLRequest
NSURLRequest *req = [NSURLRequest requestWithURL: url];

// Create a connection that will exchange this request for data from the URL
connection = [[NSURLConnection alloc] initWithRequest: req delegate: self startImmediately: YES];

}
[/code]

[code]// When a connection has finished retreiving all its data from a web service, it send this
// msessage.

  • (void) connectionDidFinishLoading: (NSURLConnection *) conn
    {
    // We are just checking to make sure we are getting the XML
    NSString *xmlCheck = [[NSString alloc] initWithData: xmlData encoding: NSUTF8StringEncoding];
    NSLog(@“xmlCheck = (%@)”, xmlCheck);
    }
    [/code]

Any suggestions as to why I’m not seeing XML?