Comment out the SceneKit line and this code works fine. But any interaction with SceneKit and Mapbox causes a crash:
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()
}
}
This is running on iOS 11. For me, I'm not getting an actual crash log, but on a more complicated setup I do get the error Failed to make complete framebuffer object
. It always crashes within the Mapbox framework.