Wenn ich MKLocalSearch mache, erhalte ich einen "Request Time Out" -Fehler, , wenn ich auf einem physischen iPhone 6s Gerät laufe. Wenn ich auf einem Emulator laufe, habe ich dieses Problem nicht.MKLocalSuche Zeitüberschreitung der Anfrage NSErrorFailingURLStringKey = https: //gsp-ssl.ls.apple.com
Ich verwende XCode 8 IOS 10 und das kostenlose Bereitstellungsprofil. (Letzte Woche war ich mit Xcode 7 und hatte keine Probleme) Könnte dies wegen der neuen Provisioning-Profil sein. Hier
ist die Fehlermeldung: "Die Zeitüberschreitung der Anforderung"
Fehler Domain = NSURLErrorDomain Code = -1001 Userinfo = {NSUnderlyingError = 0x17024c630 {Fehler Domain = kCFErrorDomainCFNetwork-Code = -1001 "(null)" Userinfo = {_ kCFStreamErrorCodeKey = -2102, _kCFStreamErrorDomainKey = 4}}, NSErrorFailingURLStringKey = https://gsp-ssl.ls.apple.com/dispatcher.arpc?abBranchId=18.K, NSErrorFailingURLKey = https://gsp-ssl.ls.apple.com/dispatcher.arpc?abBranchId=18.K, _kCFStreamErrorCodeKey = - 2102, _kCFStreamErrorDomainKey = 4, NSLocalizedDescription = Die Zeitüberschreitung der Anforderung}
Der Code:.
MKLocalSearch *search = [[MKLocalSearch alloc] initWithRequest:request];
[search startWithCompletionHandler:^(MKLocalSearchResponse *response, NSError *error) {
if (!error) {
MKMapItem *firstItem = response.mapItems.firstObject;
if (firstItem) {
//store in cache
_mapItemsDictionary[destination.destinationAddress] = firstItem;
handler(firstItem);
} else {
NSLog(@"ERROR : FirstObject from MapItems is null");
return;
}
} else {
NSLog(@"ERROR Could not get MAPITEM :%@",error.description);
handler(nil);
}
}];
Ich habe dies in meinem plist:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>