您好,我遇到了一个问题,我的应用程序上集成了GMS,当我尝试重复尝试添加需要地址的条目时,它一直崩溃。
Google问题:https://issuetracker.google.com/113978690
您遇到的错误行为是什么?
应该怎么办?
CallStack:
重现该问题的步骤:
重复添加新条目,直到Google地图崩溃为止
操作系统版本:iOS 11.4.1 [15G77]
iOS版Google Maps SDK:2.7.0 / iOS 11.4
硬件型号:iphoneX
代码:
override func viewDidLoad() {
super.viewDidLoad()
let camera = GMSCameraPosition.camera(withLatitude: 14.52101057,longitude: 121.06712508,zoom: zoomLevel)
mapView = GMSMapView.map(withFrame: self.view.bounds, camera: camera)
mapView.settings.myLocationButton = true
mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
mapView.isMyLocationEnabled = true
mapView.settings.myLocationButton = true
mapView.delegate = self
do {
// Set the map style by passing a valid JSON string.
mapView.mapStyle = try GMSMapStyle(jsonString: kMapStyle)
} catch {
NSLog("One or more of the map styles failed to load. \(error)")
}
locationManager = CLLocationManager()
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestAlwaysAuthorization()
locationManager.distanceFilter = 50
locationManager.startUpdatingLocation()
locationManager.delegate = self
self.view.addSubview(mapView)
self.view.addSubview(UserBar)
}
崩溃发生时手机的屏幕截图:Video