title: HTTP GET request working in iOS simulator but not on iPhone device
body: <p>My app is calling a basic PHP script that outputs JSON data. </p>
  
  <p>I am calling my PHP script like this:</p>
  
  <pre><code>NSString *buildURL = [NSString stringWithFormat: @"http://xxxx.com/api.php?action=authenticate_user&amp;email=%@&amp;password=%@&amp;deviceToken=%@", _emailAddress, _password, deviceToken];
  NSURL *url = [NSURL URLWithString: buildURL];
  NSData *data = [NSData dataWithContentsOfURL:url];
  NSString *ret = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  
  // Parse the result
  NSString *ret2 = [ret stringByReplacingOccurrencesOfString:@"null" withString:@""];
  NSError* error;
  NSDictionary *JSON =
  [NSJSONSerialization JSONObjectWithData: [ret2 dataUsingEncoding:NSUTF8StringEncoding]
                                  options: NSJSONReadingMutableContainers
                                    error: &amp;error];
  
  NSString* status = [JSON objectForKey:@"status"];
  NSString* email = [JSON objectForKey:@"email"];
  NSString* userID = [JSON objectForKey:@"userID"];
  NSString* agentID = [JSON objectForKey:@"agentID"];
  NSString* picture = [JSON objectForKey:@"picture"];
  </code></pre>
  
  <p>For some reason when running this code on my iPhone all the variables are <code>(null)</code>, but
  in the simulator I get the correct data.</p>
  
  <p>The output of my php script is:</p>
  
  <pre><code>{"status":"1", "agentName":"Bill", "picture":"http://xxxx.com/thumb_ad1-8908968097.jpg", "departmentName":"", "email":"test@gmail.com", "agentID":"513", "userID":"3"}null
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>