나는이 오류가 무엇입니까 :위치를 업데이트하는 중 오류가 발생했습니다. 작업을 완료 할 수 없습니다. (kCLErrorDomain 오류 0)
Error while updating location The operation couldn’t be completed. (kCLErrorDomain error 0.)
내 문제는이 오류가 거의 모든 시간을 내가 시뮬레이터를 실행 보여주고 있다는 것입니다 그것은 그 오류를 나에게 모든 시간을 보여주는 유지하는 시뮬레이터 실행 (매 시간이 내가 viewController지도와 함께이 오류를 보여줍니다. 이상한 것은 때로는이 오류가 nil이며 모든 것이 잘된다는 것입니다. 실제 장치에서는 잘 작동하지만 위치 (시뮬레이터에서)로 뭔가를 시험해보고 싶을 때면 시뮬레이터를 작동시킬 때까지 약 7 번 다시 시작해야합니다.
이의 Info.plist입니다 :
func locationManager(manager: CLLocationManager, didFailWithError error: NSError) {
print("Error while updating location " + error.localizedDescription)
let alertController = UIAlertController(title: "Sorry!", message: "We were unable to find your location", preferredStyle: UIAlertControllerStyle.Alert)
let defaultAction = UIAlertAction(title: "OK", style: .Default, handler: nil)
alertController.addAction(defaultAction)
presentViewController(alertController, animated: true, completion: nil)
print("Error...")
}
내 질문은 왜이다 : 이것은 내 코드
입니다 :
내 위치는 정의입니다 때때로 만 작동합니까? 고맙습니다.
이 링크를 확인할 수 있습니다. http://stackoverflow.com/questions/6032976/didfailwitherror-error-domain-kclerrordomain-code-0-operation-couldn-t-be –
나는 이미 그 질문을 보았고 해결책을 찾지 못했습니다./ –
그런 다음 시뮬레이터 메뉴> 디버그> 위치> 사용자 정의를 선택하거나 0r를 선택하십시오. 인터넷 연결을 확인하십시오. – Sandy