A
A
anonymous222013-12-04 15:08:13
iPhone
anonymous22, 2013-12-04 15:08:13

MapBox iOS SDK framework

I'm trying to use the MapBox SDK in my project, but I get an error when compiling on the device:
XIaHY.png
I follow these steps :
1. Obtain the map ID for your hosted map by clicking Publish and copying the Map ID;
2. Download the latest SDK binary release from the downloads and drag MapBox.framework into your project's Frameworks section, making sure to link it in your target;
3. Add -ObjC to your app target's Other Linker Flags build setting in order to ensure that the SDK's static library has all symbols loaded, even for categories;
JKFIK.png
4. Add the following libraries to your app target's Link Binary With Libraries build phase:
- CoreLocation.framework (required for location services);
- QuartzCore.framework (required because of advanced layer manipulation);
- libsqlite3.dylib (required for MBTiles and caching support);
- libz.dylib (required for UTFGrid interactivity).
nwkrI.png
And I use the following code to test:

#import <MapBox/MapBox.h>

@implementation MyViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    RMMapBoxSource *tileSource = [[RMMapBoxSource alloc] initWithMapID:@"examples.map-z2effxa8"];

    RMMapView *mapView = [[RMMapView alloc] initWithFrame:self.view.bounds andTilesource:tileSource];

    [self.view addSubview:mapView];
}

I try to repeat these steps from the beginning, but still the device crashes with these errors. What's my mistake? Thank you!

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
anonymous22, 2013-12-04
@anonymous22

Changing architecture in build settings helped
3J2wM.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question