注释掉SceneKit行,这段代码运行正常。但是与SceneKit和Mapbox的任何交互都会导致崩溃:
import UIKit
import Mapbox
import SceneKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let mapView = MGLMapView(frame: view.bounds)
mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
// Set the map’s center coordinate and zoom level.
mapView.setCenter(CLLocationCoordinate2D(latitude: 59.31, longitude: 18.06), zoomLevel: 9, animated: false)
view.addSubview(mapView)
_ = SCNView()
}
}
这是在iOS 11上运行。对我来说,我没有获得实际的崩溃日志,但在更复杂的设置上,我确实收到了错误Failed to make complete framebuffer object
。它总是在Mapbox框架内崩溃。