Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit dd4d1a9

Browse files
authored
[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.
1 parent c95ffe6 commit dd4d1a9

File tree

2 files changed

+52
-45
lines changed

2 files changed

+52
-45
lines changed

platform/ios/INSTALL.md

+50-45
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Integrating the Mapbox iOS SDK into your application
1+
# Integrating custom builds of the Mapbox iOS SDK into your application
22

3-
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).
3+
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).
44

55
### Requirements
66

@@ -28,51 +28,11 @@ The Mapbox iOS SDK requires Xcode 7.3 or higher.
2828
- a `documentation` folder with HTML API documentation
2929
- an example `Settings.bundle` containing an optional Mapbox Telemetry opt-out setting
3030

31-
### Installation
32-
33-
There are a few ways to install the Mapbox iOS SDK:
34-
35-
#### CocoaPods
36-
37-
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.
38-
39-
1. Zip up the build product.
40-
41-
```bash
42-
cd build/ios/pkg/
43-
ZIP=mapbox-ios-sdk.zip
44-
rm -f ../${ZIP}
45-
zip -r ../${ZIP} *
46-
```
47-
48-
1. Customize [`Mapbox-iOS-SDK.podspec`](../ios/Mapbox-iOS-SDK.podspec) to download this zip file.
49-
50-
```rb
51-
{...}
52-
53-
m.source = {
54-
:http => "http://{...}/mapbox-ios-sdk.zip",
55-
:flatten => true
56-
}
57-
58-
{...}
59-
```
60-
61-
1. Update your app's `Podfile` to point to the `Mapbox-iOS-SDK.podspec`.
62-
63-
```rb
64-
pod 'Mapbox-iOS-SDK', :podspec => 'http://{...}/Mapbox-iOS-SDK.podspec'
65-
```
31+
See the [packaging documentation](DEVELOPING.md#packaging-builds) for other build options.
6632

67-
1. Run `pod update` to grab the newly-built library.
68-
69-
##### Testing pre-releases with CocoaPods
70-
71-
To test pre-releases and/or betas, you can reference the pre-release like so in your Podfile:
33+
### Installation
7234

73-
```rb
74-
pod 'Mapbox-iOS-SDK', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/<insert branch or tag>/ios/Mapbox-iOS-SDK.podspec'
75-
```
35+
There are several ways to install custom builds of the Mapbox iOS SDK:
7636

7737
#### Dynamic framework
7838

@@ -113,6 +73,51 @@ If your application targets iOS 7.x, you’ll need to install the static framewo
11373
- libsqlite3.tbd
11474
- libz.tbd
11575

76+
1. In the Build Settings tab, find the Other Linker Flags setting and add `-ObjC`.
77+
78+
#### CocoaPods
79+
80+
##### Testing pre-releases with CocoaPods
81+
82+
To test pre-releases and/or betas, you can reference the pre-release like so in your Podfile:
83+
84+
```rb
85+
pod 'Mapbox-iOS-SDK', podspec: 'https://raw.githubusercontent.com/mapbox/mapbox-gl-native/<insert branch or tag>/ios/Mapbox-iOS-SDK.podspec'
86+
```
87+
88+
##### Using your own build with CocoaPods
89+
90+
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.
91+
92+
1. Zip up the build product.
93+
94+
```bash
95+
cd build/ios/pkg/
96+
ZIP=mapbox-ios-sdk.zip
97+
rm -f ../${ZIP}
98+
zip -r ../${ZIP} *
99+
```
100+
101+
1. Customize [`Mapbox-iOS-SDK.podspec`](../ios/Mapbox-iOS-SDK.podspec) to download this zip file.
102+
103+
```rb
104+
{...}
105+
106+
m.source = {
107+
:path => "{...}/mapbox-ios-sdk.zip"
108+
}
109+
110+
{...}
111+
```
112+
113+
1. Update your app's `Podfile` to point to the `Mapbox-iOS-SDK.podspec`.
114+
115+
```rb
116+
pod 'Mapbox-iOS-SDK', :path => '{...}/Mapbox-iOS-SDK.podspec'
117+
```
118+
119+
1. Run `pod update` to grab the newly-built library.
120+
116121
### Configuration
117122
118123
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/).

platform/ios/docs/pod-README.md

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ If your application targets iOS 7.x, you’ll need to install the static framewo
5252
- libsqlite3.tbd
5353
- libz.tbd
5454

55+
1. In the Build Settings tab, find the Other Linker Flags setting and add `-ObjC`.
56+
5557
{{/STATIC}}
5658

5759
## Configuration

0 commit comments

Comments
 (0)