summaryrefslogtreecommitdiff
path: root/platform/ios/INSTALL.md
diff options
context:
space:
mode:
authorJason Wray <friedbunny@users.noreply.github.com>2016-08-30 21:23:34 -0400
committerGitHub <noreply@github.com>2016-08-30 21:23:34 -0400
commitdd4d1a9927c2d7945cd94bade38fba83e86cf6ec (patch)
tree155a8e87d742ae89fd49936ad8d3c7e8dfe3ca51 /platform/ios/INSTALL.md
parentc95ffe65a6e46cf927717fa1969ba81e1d1de5df (diff)
downloadqtlocation-mapboxgl-dd4d1a9927c2d7945cd94bade38fba83e86cf6ec.tar.gz
[ios] Update INSTALL doc for -ObjC; use local podspec path
- Adds -ObjC flag for static lib. - Fixes link to iOS SDK site. - Pushes CocoaPods down the list. - Changes CocoaPods to use local path, not HTTP. - Emphasizes that INSTALL.MD is only for custom builds.
Diffstat (limited to 'platform/ios/INSTALL.md')
-rw-r--r--platform/ios/INSTALL.md95
1 files changed, 50 insertions, 45 deletions
diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md
index 1f0975f477..cfacd190d9 100644
--- a/platform/ios/INSTALL.md
+++ b/platform/ios/INSTALL.md
@@ -1,6 +1,6 @@
-# Integrating the Mapbox iOS SDK into your application
+# Integrating custom builds of the Mapbox iOS SDK into your application
-This document explains how to build a development version of Mapbox iOS SDK for use in your own Cocoa Touch application. To use a production-ready version of the SDK, see the [Mapbox iOS SDK homepage](https://github.com/mapbox/ios-sdk).
+This document explains how to build a development version of Mapbox iOS SDK for use in your own Cocoa Touch application. To use a production-ready version of the SDK, see the [Mapbox iOS SDK homepage](https://mapbox.com/ios-sdk).
### Requirements
@@ -28,51 +28,11 @@ The Mapbox iOS SDK requires Xcode 7.3 or higher.
- a `documentation` folder with HTML API documentation
- an example `Settings.bundle` containing an optional Mapbox Telemetry opt-out setting
-### Installation
-
-There are a few ways to install the Mapbox iOS SDK:
-
-#### CocoaPods
-
-Currently, until [#1437](https://github.com/mapbox/mapbox-gl-native/issues/1437) is completed, to install a _development version_ of Mapbox GL using CocoaPods you will need to build it from source manually per above.
-
-1. Zip up the build product.
-
- ```bash
- cd build/ios/pkg/
- ZIP=mapbox-ios-sdk.zip
- rm -f ../${ZIP}
- zip -r ../${ZIP} *
- ```
-
-1. Customize [`Mapbox-iOS-SDK.podspec`](../ios/Mapbox-iOS-SDK.podspec) to download this zip file.
-
- ```rb
- {...}
-
- m.source = {
- :http => "http://{...}/mapbox-ios-sdk.zip",
- :flatten => true
- }
-
- {...}
- ```
-
-1. Update your app's `Podfile` to point to the `Mapbox-iOS-SDK.podspec`.
-
- ```rb
- pod 'Mapbox-iOS-SDK', :podspec => 'http://{...}/Mapbox-iOS-SDK.podspec'
- ```
+See the [packaging documentation](DEVELOPING.md#packaging-builds) for other build options.
-1. Run `pod update` to grab the newly-built library.
-
-##### Testing pre-releases with CocoaPods
-
-To test pre-releases and/or betas, you can reference the pre-release like so in your Podfile:
+### Installation
-```rb
-pod 'Mapbox-iOS-SDK', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/<insert branch or tag>/ios/Mapbox-iOS-SDK.podspec'
-```
+There are several ways to install custom builds of the Mapbox iOS SDK:
#### Dynamic framework
@@ -113,6 +73,51 @@ If your application targets iOS 7.x, you’ll need to install the static framewo
- libsqlite3.tbd
- libz.tbd
+1. In the Build Settings tab, find the Other Linker Flags setting and add `-ObjC`.
+
+#### CocoaPods
+
+##### Testing pre-releases with CocoaPods
+
+To test pre-releases and/or betas, you can reference the pre-release like so in your Podfile:
+
+```rb
+pod 'Mapbox-iOS-SDK', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/<insert branch or tag>/ios/Mapbox-iOS-SDK.podspec'
+```
+
+##### Using your own build with CocoaPods
+
+To install a _development version_ of this SDK using CocoaPods you will need to build it from source manually per above, then include that build product in your Podfile.
+
+1. Zip up the build product.
+
+ ```bash
+ cd build/ios/pkg/
+ ZIP=mapbox-ios-sdk.zip
+ rm -f ../${ZIP}
+ zip -r ../${ZIP} *
+ ```
+
+1. Customize [`Mapbox-iOS-SDK.podspec`](../ios/Mapbox-iOS-SDK.podspec) to download this zip file.
+
+ ```rb
+ {...}
+
+ m.source = {
+ :path => "{...}/mapbox-ios-sdk.zip"
+ }
+
+ {...}
+ ```
+
+1. Update your app's `Podfile` to point to the `Mapbox-iOS-SDK.podspec`.
+
+ ```rb
+ pod 'Mapbox-iOS-SDK', :path => '{...}/Mapbox-iOS-SDK.podspec'
+ ```
+
+1. Run `pod update` to grab the newly-built library.
+
### Configuration
1. Mapbox vector tiles require a Mapbox account and API access token. In the project editor, select the application target, then go to the Info tab. Under the “Custom iOS Target Properties” section, set `MGLMapboxAccessToken` to your access token. You can obtain an access token from the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/).