2017-06-01 2 views
0

私のアプリでMapKitを追加しました。私はIBOUTLETによってビューコントローラにMKmapviewを接続しましたが、シミュレータで正常に動作しますが、これで私のデバイスでクラッシュします。ios mapkit、キャリア名が[LogMessageLogging]でクラッシュする6.1 CarrierNameを取得できません

[LogMessageLogging] 6.1 CarrierNameを取得できません。 CTError:domain-2、code-5、errStr:((os/kern)failure)。

私はCLLocationmanagerからユーザーの場所を取得しており、注釈をマップに追加しようとしています。コードは以下の通りです:

func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { 

    let userLocation:CLLocation = locations[0] as CLLocation 
    let coordinate = CLLocationCoordinate2D(latitude: userLocation.coordinate.latitude, longitude: userLocation.coordinate.longitude) 
    MD_myCurrentLocation = coordinate 
    setupLocationMarker(coordinate:coordinate) 
    manager.stopUpdatingLocation() 

} 

FUNCのsetupLocationMarker(座標:CLLocationCoordinate2Dを){

iosMap.removeAnnotations(iosMap.annotations) 
    let span = MKCoordinateSpanMake(0.01, 0.01) 
    let region = MKCoordinateRegion(center: coordinate, span: span) 
    iosMap.setRegion(region, animated: true) 
    let annotation = MKPointAnnotation() 
    annotation.coordinate = coordinate 
    iosMap.addAnnotation(annotation) 

}

答えて

0

は>>設定>>一般>>リセットするために行くことによって、あなたのデバイスのネットワーク設定をリセットしてください>>ネットワーク設定をリセットする。 AppDelegate

それとも

輸入CoreTelephonyこの情報がお役に立てば幸いです。

+0

すでに完了していますが、動作しません。 – Prabin

関連する問題