title: CLGeocoder returns error on iPhone but working on iPad and iPhone/iPad Simulator
body: <p>I'm using CLGeocoder to get the location of an address. The CLGeocoder returns latitude and longtitude successfully when my code is running in the iPad device with iOS 5.1 and also in the iPhone/iPad Simulator. On the contrary, when I'm running my code in my iPhone 4 device with iOS 6.0.1, it returns an error with message:</p>
  
  <blockquote>
    <p>PBRequester failed with Error Error Domain=NSURLErrorDomain Code=-1202
    "The certificate for this server is invalid. You might be connecting
    to a server that is pretending to be “gsp-ssl.ls.apple.com” which
    could put your confidential information at risk." UserInfo=0x2287c720
    {NSErrorFailingURLStringKey=<a href="https://gsp-ssl.ls.apple.com/fwdgeo.arpc" rel="nofollow">https://gsp-ssl.ls.apple.com/fwdgeo.arpc</a>,
    NSLocalizedRecoverySuggestion=Would you like to connect to the server
    anyway?,
    NSErrorFailingURLKey=<a href="https://gsp-ssl.ls.apple.com/fwdgeo.arpc" rel="nofollow">https://gsp-ssl.ls.apple.com/fwdgeo.arpc</a>,
    NSLocalizedDescription=The certificate for this server is invalid. You
    might be connecting to a server that is pretending to be
    “gsp-ssl.ls.apple.com” which could put your confidential information
    at risk., NSUnderlyingError=0x22893b70 "The certificate for this
    server is invalid. You might be connecting to a server that is
    pretending to be “gsp-ssl.ls.apple.com” which could put your
    confidential information at risk.",
    NSURLErrorFailingURLPeerTrustErrorKey=}</p>
  </blockquote>
  
  <p>My code using CLGeocoder in my .m file:</p>
  
  <blockquote>
    <p>geocoder = [[CLGeocoder alloc] init];</p>
  
  <pre><code>    [geocoder geocodeAddressString:location completionHandler:^(NSArray* placemarks, NSError* error){
          if (error != noErr)
          {
              // An error occurred with the request.
              [self locationRequestFailed];
          }
          else
          {
              // Fetch coordinates from Geocoder.
              for (CLPlacemark* aPlacemark in placemarks)
              {
                  // Process the placemark.
                  NSString *latitude = [NSString stringWithFormat:@"%f",aPlacemark.location.coordinate.latitude];
                  NSString *longitude = [NSString stringWithFormat:@"%f",aPlacemark.location.coordinate.longitude];
  
                  // Process latitude and longitude.
                  [self locationRequestSucceededWithLatitude:[latitude doubleValue] andLongitude:[longitude doubleValue]];
              }
          }
      }];
  </code></pre>
  </blockquote>
  
  <p>Is there a bug on iPhone 4 6.0.1 or I'm doing something wrong with my iPhone 4?</p>