5. iPhone Server Communication
We can communicate in many ways with server. One way is using JSON, this is explained as below: 1. Starting Communication [[[NSURLConnection alloc] initWithRequest:[NSURLRequest requestWithURL: [NSURL URLWithString:urlStr]] delegate:self startImmediately:YES] autorelease]; //urlStr is NSString ref 2. Start receiving data – (void)connection:(NSURLConnection *)connection didReceiveResponse: (NSURLResponse *)response{ [receivedData setLength:0]; } //receivedData is NSMutableData ref 3. Get data in [...]