From 698eb674a7c7dce1c44dbc9b0197ee2e162c232e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Thu, 21 Jan 2016 13:50:00 -0800 Subject: [PATCH] Update INSTALL.md These changes dropped out of #3416 somehow. The screenshots only make sense inside the gyp-generated project, which is irrelevant in this case. --- platform/ios/INSTALL.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md index 2c36b5953..f77fc26e5 100644 --- a/platform/ios/INSTALL.md +++ b/platform/ios/INSTALL.md @@ -22,19 +22,9 @@ The Mapbox iOS SDK and iosapp demo application build against the iOS 7.0 SDK. Th 1. Run `make ipackage`. The packaging script will produce the statically-linked `libMapbox.a`, `Mapbox.bundle` for resources, a `Headers` folder, and a `Docs` folder with HTML API documentation. -### Access Tokens +### Install -_The demo applications use Mapbox vector tiles, which require a Mapbox account and API access token. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/)._ - -Set up the access token by editing the scheme for the application target, then adding an environment variable with the name `MAPBOX_ACCESS_TOKEN`. - -![edit scheme](https://cloud.githubusercontent.com/assets/98601/5460702/c4610262-8519-11e4-873a-8597821da468.png) - -![setting access token in Xcode scheme](https://cloud.githubusercontent.com/assets/162976/5349358/0a086f00-7f8c-11e4-8433-bdbaccda2b58.png) - -### Test - -In the context of your own app, you can now either: +There are two ways to install the Mapbox iOS SDK: #### CocoaPods @@ -93,6 +83,12 @@ Currently, until [#1437](https://github.com/mapbox/mapbox-gl-native/issues/1437) 1. Add `-ObjC` to your target's "Other Linker Flags" build setting (`OTHER_LDFLAGS`). +## Use + +1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target. In the Info tab, set `MGLMapboxAccessToken` to your access token. You can obtain one from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). + +1. In a XIB or storyboard, add a View and set its custom class to `MGLMapView`. If you need to manipulate the map view programmatically, import the `Mapbox` module (Swift) or `Mapbox.h` umbrella header (Objective-C). + ## Troubleshooting On OS X, you can also try clearing the Xcode cache with `make clear_xcode_cache`.