source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
pod 'MapboxGL'
My view controller:
import UIKit
import MapboxGL
class MapViewController : UIViewController, MGLMapViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let mapView = MGLMapView(frame: view.bounds)
mapView.autoresizingMask = [UIViewAutoresizing.FlexibleWidth, UIViewAutoresizing.FlexibleHeight]
// set the map's center coordinate
mapView.setCenterCoordinate(CLLocationCoordinate2D(latitude: 40.7326808,
longitude: -73.9843407),
zoomLevel: 12, animated: false)
view.addSubview(mapView)
}
}
Error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_MGLMapView", referenced from:
type metadata accessor for ObjectiveC.MGLMapView in MapViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I´m one of those horrible compile error with the simple example on https://www.mapbox.com/mapbox-gl-ios/examples/. :(
My pod file:
My view controller:
Error:
Is it a bug on Xcode or is mine?