mapbox / DEPRECATED-mapbox-ios-sdk

REPLACED – use https://www.mapbox.com/ios-sdk instead
https://github.com/mapbox/mapbox-gl-native
Other
323 stars 8 forks source link

Can't even add the map on device! #650

Closed mariobento closed 9 years ago

mariobento commented 9 years ago

I've downloaded the last version for iOS (MapBoxGL), imported Headers folder, libMapboxGL.a, MapboxGL.bundle and Settings.bundle ... the access token is in the plist file under the format:

Key: MGLMapboxAccessToken Type: String Value: sk.XXXXXX

[self.view setFrame:[[UIScreen mainScreen] bounds]]; self.map = [[MGLMapView alloc] initWithFrame:self.view.bounds]; [self.map setDelegate:self]; [self.view addSubview:self.map];

It crashes right away only with this 4 lines of code i don't know even why ... here you have the console log:

2015-07-02 15:18:22.560 appname[2782:60b] The view hierarchy is not prepared for the constraint: <NSLayoutConstraint:0x166a43b0 V:[_UILayoutGuide:0x166d65a0]-(>=5)-[UIView:0x166d7460]> When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug. 2015-07-02 15:18:22.564 appname[2782:60b] View hierarchy unprepared for constraint. Constraint: <NSLayoutConstraint:0x166a43b0 V:[_UILayoutGuide:0x166d65a0]-(>=5)-[UIView:0x166d7460]> Container hierarchy: <UIView: 0x166d7460; frame = (0 0; 0 0); gestureRecognizers = <NSArray: 0x166d80e0>; layer = <CALayer: 0x166d7c60>> | <UIImageView: 0x166d5f80; frame = (0 0; 36 36); alpha = 0; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x166d6cb0>> View not found in container hierarchy: <_UILayoutGuide: 0x166d65a0; frame = (0 0; 0 20); hidden = YES; layer = <CALayer: 0x166c15e0>> That view's superview: <UIView: 0x1658e1a0; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x1659d2d0>>

Can you help me? and yes, it works fine on simulators!

1ec5 commented 9 years ago

This repository is for Mapbox’s older raster SDK. mapbox/mapbox-gl-native is for Mapbox GL for iOS and Android. This sounds like mapbox/mapbox-gl-native#1818.