objective c - CLGeocoder returns error on iPhone but working on iPad and iPhone/iPad Simulator -
i'm using clgeocoder location of address. clgeocoder returns latitude , longtitude when code running in ipad device ios 5.1 , in iphone/ipad simulator. on contrary, when i'm running code in iphone 4 device ios 6.0.1, returns error message:
pbrequester failed error error domain=nsurlerrordomain code=-1202 "the certificate server invalid. might connecting server pretending “gsp-ssl.ls.apple.com” put confidential information @ risk." userinfo=0x2287c720 {nserrorfailingurlstringkey=https://gsp-ssl.ls.apple.com/fwdgeo.arpc, nslocalizedrecoverysuggestion=would connect server anyway?, nserrorfailingurlkey=https://gsp-ssl.ls.apple.com/fwdgeo.arpc, nslocalizeddescription=the certificate server invalid. might connecting server pretending “gsp-ssl.ls.apple.com” put confidential information @ risk., nsunderlyingerror=0x22893b70 "the certificate server invalid. might connecting server pretending “gsp-ssl.ls.apple.com” put confidential information @ risk.", nsurlerrorfailingurlpeertrusterrorkey=}
my code using clgeocoder in .m file:
geocoder = [[clgeocoder alloc] init];
[geocoder geocodeaddressstring:location completionhandler:^(nsarray* placemarks, nserror* error){ if (error != noerr) { // error occurred request. [self locationrequestfailed]; } else { // fetch coordinates geocoder. (clplacemark* aplacemark in placemarks) { // process placemark. nsstring *latitude = [nsstring stringwithformat:@"%f",aplacemark.location.coordinate.latitude]; nsstring *longitude = [nsstring stringwithformat:@"%f",aplacemark.location.coordinate.longitude]; // process latitude , longitude. [self locationrequestsucceededwithlatitude:[latitude doublevalue] andlongitude:[longitude doublevalue]]; } } }];
is there bug on iphone 4 6.0.1 or i'm doing wrong iphone 4?
Comments
Post a Comment