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

Merge release-ios-v3.6.0-android-v5.1.0 #9416

Merged
merged 134 commits into from
Jul 5, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
08916f2
[android] Update release script to support CircleCI builds (#8950)
zugaldia May 11, 2017
db370a0
[core] When a layer is added, reload its source's tiles
jfirebaugh May 11, 2017
ad46d67
[android] - keep observer when timeout occurs, make observer param nu…
tobrun May 11, 2017
850b008
[android] - avoid crashing when deleting already deleted region (#8920)
tobrun May 11, 2017
e681f69
[android] - update LOST to 2.3.0 (#8872)
tobrun May 12, 2017
cb73736
[android] - update proguard config, allow debug mimification, update …
tobrun May 12, 2017
0ef1293
[core, android, ios, macos, qt] v10 default styles
1ec5 Sep 9, 2016
d85471b
[ios, macos] Updated documented default style version
1ec5 Sep 9, 2016
c5ee41a
[ios, macos] Undeprecated unversioned style URL factory methods
1ec5 Apr 26, 2017
886bf25
[core, android, ios, macos] Added Traffic Day/Night to default styles
1ec5 May 9, 2017
a68788a
[android] Release android-v5.1.0-beta.2 (#8976)
tobrun May 12, 2017
5944216
[android] - MarkerView deselect events with OnMarkerViewClickListener…
tobrun May 15, 2017
627455c
[android] - publish SNAPSHOT from release 5.1.0 branch (#8995)
tobrun May 15, 2017
c7acb55
[ios, macos] edited identity interpolation mode documentation (#8657)
jmkiley May 15, 2017
30b9191
[ios, macos] Factored out tile URL template guide
1ec5 May 10, 2017
4f90d7a
[ios] Telemetry button in modal view controllers (#9027)
jmkiley May 17, 2017
eb83c72
[android] - bump tools and support lib version due to SNAPSHOT depend…
tobrun May 19, 2017
f0b0167
[core] Make destructor virtual to avoid object splicing during destru…
kkaefer May 18, 2017
b52e171
[core] add error for non-virtual destructor deletes + add virtual dtors
kkaefer May 18, 2017
f4f587f
[android] - remove marker from selected markers when removing marker…
tobrun May 19, 2017
3b109c8
Observe layout guides (#7716)
frederoni May 19, 2017
7612e23
[ios, macos] Change == to = in style function initializers
boundsj May 17, 2017
554b1cf
[ios] Add annotation view initializer with annotation and reuse id (#…
boundsj May 19, 2017
b9d3ccc
[ios] Remove annotation view from container view when annotation remo…
boundsj May 19, 2017
4d8625b
[android] - correct bearing conversion when animating the map with ju…
tobrun May 19, 2017
13dee80
[ios, macos] Updated `maximumZoomLevel` description, cherry-picked #8…
jmkiley May 1, 2017
ade7b0e
[ios] Updated podspecs and changelog for v3.5.3 (#8870)
jmkiley May 2, 2017
9ae7371
[ios] Update podspecs and changelog for iOS v3.5.4
boundsj May 9, 2017
e630e8c
[ios, macos] Updated changelogs
1ec5 May 19, 2017
a19fd81
[ios, macos] changed TRUE -> 'true' (#9059) fixes #9056
jmkiley May 19, 2017
e52249c
[ios, macos] Light property implementation in MGLStyle (#9043)
fabian-guerra May 23, 2017
71b6865
[android] - horizontally rotated in snapshot (#9083)
tobrun May 23, 2017
fe17f7e
Cherry-pick arabic text to release branch v3.6.0 (#9071)
fabian-guerra May 23, 2017
a57e9bc
[ios,macos] multipolygon coordinate (#8713)
fabian-guerra May 23, 2017
c9de6cd
[ios, macos] More robust Streets localization
1ec5 May 21, 2017
9b11bb9
[ios] Fallback to Mapbox.bundle as the framework bundle (#9074)
friedbunny May 23, 2017
d90c172
[ios] Move image resources to an asset catalog & switch to PDFs
friedbunny May 19, 2017
bf000c7
[ios, macos] Updated changelogs
1ec5 May 23, 2017
091d3d1
[ios] Update pods spec for iOS v3.6.0-beta.1
fabian-guerra May 23, 2017
8c73cb1
[macos] Enable View ‣ Traffic Night
1ec5 May 23, 2017
3c35bf1
[android] - stop location updates when toggle MyLocationView state (#…
tobrun May 24, 2017
8199315
[android] - LatLngBounds bearing default value (#9102)
tobrun May 24, 2017
e1431f9
[ios, macos] Fix MGLLight.achor to accept style functions
fabian-guerra May 24, 2017
fce7747
[ios] Fix annotation initializers for subclasses of MGLAnnotationView…
boundsj May 25, 2017
35f548a
[ios] Moved `MGLLight` in jazzy table of contents (#9111)
jmkiley May 26, 2017
c392c67
[android] - logo placement for creating a Mapview programatically (#9…
tobrun May 26, 2017
5716bd3
[android] - add binding support for Light (#9013)
tobrun May 26, 2017
82a3a7e
[android] Update Lost to final version 3.0.0 (#9112)
Guardiola31337 May 26, 2017
bc5b147
[android] - convert dp to pixels when getting meters per pixel at. (#…
tobrun May 26, 2017
40a73b3
Release Android v5.1.0-beta.3 (#9115)
tobrun May 26, 2017
fc495de
[android] - harden orientation changes (#9128)
tobrun May 30, 2017
7b85bcc
[ios] Remove filter of single metric event
boundsj May 30, 2017
608fd66
[ios] remove layout guide observers
frederoni May 25, 2017
a39116a
Migrate to GL JS–powered feedback form (#9078)
1ec5 May 30, 2017
83df8a8
[android] - javadoc update for 5.1.0 release (#9138)
tobrun May 31, 2017
b6a4f12
[android] fix missing access token variable issue (#9151)
Guardiola31337 May 31, 2017
af25477
[ios] Update pods spec for iOS v3.6.0-beta.2
fabian-guerra May 31, 2017
52eba42
[android] Cherry picking 9133 (#9145)
Guardiola31337 Jun 1, 2017
b2f277a
add null check in custom location engine activity to prevent null poi…
Guardiola31337 Jun 1, 2017
0d171db
[core] Make TransformState LatLngBounds optional
brunoabinader May 31, 2017
012e88c
[ios] Make annotation view rotation alignment configurable (#9147)
boundsj Jun 1, 2017
3b837d9
Merge branch 'release-ios-v3.6.0-android-v5.1.0' of github.com:mapbox…
fabian-guerra Jun 1, 2017
da53200
[android] - validate if gestures should execute (#9173)
tobrun Jun 2, 2017
ef7b355
[android] - only invoke callback if fling scrolling animation isn't g…
tobrun Jun 6, 2017
a1f8de6
[android] - dealing with infinite camera move callbacks (#9177) (#9194)
LukasPaczos Jun 6, 2017
45327b6
[android] - keep location tracking mode after screen rotation (#9187)
LukasPaczos Jun 6, 2017
facc3d5
fix #8300 flyTo for close points
ansis Jun 6, 2017
ae837f4
[android] - remove conversion from pixels to dp (#9205)
tobrun Jun 7, 2017
78eca86
[android] - option to disable camera animation while following positi…
LukasPaczos Jun 7, 2017
233117f
[android] - invalidating MyLocationView bearing when not following po…
tobrun Jun 8, 2017
9f88e37
Custom location source fix (#9142)
tobrun Jun 9, 2017
fa972fa
[android] - update components with camera values when animating (#9174)
tobrun Jun 9, 2017
6ec5e4f
Cherry picks to release branch (#9230)
tobrun Jun 9, 2017
294f4f8
[android] - update changelog for v5.1.0-beta.4 (#9232)
tobrun Jun 9, 2017
e59766f
[android] - run MapboxMap invocations to ui thread for instrumentatio…
tobrun Jun 12, 2017
87a05b2
[ios, macos] Fix MGLSphericalPosition.radial misleading type.
fabian-guerra Jun 12, 2017
0c275ad
[android] - correct source changed map event javadoc (#9243)
tobrun Jun 13, 2017
7bfcce0
Cherry pick release (#9263)
tobrun Jun 14, 2017
441b80d
[core] Reduce number of varyings to 8 or less
jfirebaugh Jun 12, 2017
951f599
[core] store vertex attribute binding to prevent duplicate binds
kkaefer Jun 4, 2017
eaa8f23
[core] only bind uniforms that exist in the program
kkaefer Jun 4, 2017
b141707
[core] add shader defines for enabling/disabling attributes/uniforms …
kkaefer Jun 4, 2017
cf85873
[core] add uniforms to DataDrivenPaintPropertys
kkaefer Jun 4, 2017
a648282
[core] add constant DDS values as uniforms
kkaefer Jun 4, 2017
212ae52
[core] cleanup ProgramParameters
jfirebaugh Jun 13, 2017
d618d4a
[core] Dynamic program compilation for data-driven properties
jfirebaugh Jun 5, 2017
d277406
[core] Don't upload the FrameHistory texture in frames where it's not…
jfirebaugh Jun 13, 2017
df3af97
[ios, macos] Revised descriptions for abstract classes (#9095)
jmkiley Jun 14, 2017
6cba15f
[ios] Remove old Fabric build infrastructure
friedbunny Jun 14, 2017
67c09b1
MGLLight autogenerate scripts (#9260)
fabian-guerra Jun 16, 2017
6a78141
[ios] Update pods spec for iOS v3.6.0-beta.3
fabian-guerra Jun 16, 2017
8699bcd
[ios, macos] Updated changelogs
1ec5 Jun 16, 2017
1de8aee
[core] Fix composite function approximation for non-integer stops
jfirebaugh Jun 16, 2017
505999a
[ios] Update telemetry cert pinning (#9292)
boundsj Jun 19, 2017
f6bfa07
[core] Trigger repaint on source changes
jfirebaugh Jun 19, 2017
78322a3
[android] - update activity test generation with newest classes, make…
tobrun Jun 20, 2017
399c007
Validate camera position before transforming (#9275)
tobrun Jun 20, 2017
20cb791
[android] fix custom marker views anchor issue (#9282)
Guardiola31337 Jun 20, 2017
985ff4c
[android] fix pulse marker view options parcelable creator (#9283)
Guardiola31337 Jun 20, 2017
78426f1
fix trackball long press timeout calling the main thread method on a …
Guardiola31337 Jun 20, 2017
899d2b0
[android] Update to LOST 3.0.1 (#9302)
zugaldia Jun 20, 2017
a9f52e2
Revisit Javadoc for 5.1.0 (#9266)
tobrun Jun 20, 2017
584bfb7
[android] update mapboxServicesVersion to 2.1.2 (#9311)
zugaldia Jun 20, 2017
651e70a
[android] - update CHANGELOG for release 5.1.0-beta.5 (#9316)
tobrun Jun 21, 2017
d47eab0
[android] - restore LatLngBounds conversion, add regression test (#9324)
tobrun Jun 21, 2017
72e7165
[build] Unbreak Travis
jfirebaugh Jun 21, 2017
d373024
7910: cancel tracking if ongoing animation is stopped manually (#7916)
RomainQuidet Jun 22, 2017
2a5dc2d
[ios, macos] Rewrote MGLStyle class documentation
1ec5 Jun 15, 2017
b7ec96d
[ios, macos] Corrected MGLSource subclassing documentation
1ec5 Jun 16, 2017
a1c5b32
Boxing ObjC structs (#9343)
fabian-guerra Jun 22, 2017
eedd055
[ios] Allow delegate to keep wandering pinch from panning map
1ec5 Jun 22, 2017
9436eca
[ios] Added Hungarian localization from Transifex
1ec5 Jun 22, 2017
5b4f8fd
[ios] Updated German localization
1ec5 Jun 22, 2017
5092243
[ios, macos] Updated changelogs
1ec5 Jun 22, 2017
3e40cab
[ios] Update pods spec for iOS v3.6.0-rc.1
fabian-guerra Jun 22, 2017
9b0b74d
[ios] Fixed infinite loop zooming in past z23
1ec5 Jun 23, 2017
361dda2
[ios, macos] Fix size and color of default marker image
friedbunny Jun 26, 2017
6aecc66
[ios] Minimize tilt gesture delay
friedbunny Jun 28, 2017
34453eb
[core] Fix iterator invalidation in erase_if
jfirebaugh Jun 29, 2017
200d184
OnCameraIdle hook into quickzoom gesture (#9339)
tobrun Jun 29, 2017
8abe210
[ios] moved changes to darwin (#9387)
jmkiley Jun 29, 2017
ae7dc8c
[macos] Reorganized changelog
1ec5 Jun 29, 2017
9215776
[macos] Fixed cursor shifting after drag gesture
1ec5 Jun 29, 2017
dafba03
ios] Update pods spec for iOS v3.6.0
fabian-guerra Jun 29, 2017
47ca78b
[macos] Updated screenshot
1ec5 Jun 30, 2017
3821ce2
macos-v0.5.0
1ec5 Jun 30, 2017
95735c0
Downgrade location provider dependency (#9394)
tobrun Jun 30, 2017
b9a4add
[android] - bump Mapbox Android Services to latest for 5.1.0 final re…
tobrun Jun 30, 2017
d2d8a57
[android] - update changelog for 5.1.0 release (#9405)
tobrun Jul 1, 2017
14c221f
Merge branch 'release-ios-v3.6.0-android-v5.1.0'
tobrun Jul 5, 2017
87081b8
[core] Fix iterator invalidation in erase_if
jfirebaugh Jun 29, 2017
9ab04a2
[android] - invible marker views performance fix #9419 (#9420)
LukasPaczos Jul 5, 2017
79d849d
[darwin] - re-add swift documentation
tobrun Jul 5, 2017
6ca8cd7
[macos] - add Styles header to CHANGELOG.md
tobrun Jul 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[ios] Update telemetry cert pinning (#9292)
  • Loading branch information
boundsj committed Jun 19, 2017
commit 505999a52df625c21791eae352342ae25e9c48af
36 changes: 24 additions & 12 deletions platform/ios/ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,23 @@
404C26E71D89C55D000AA13D /* MGLTileSource_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 404C26E61D89C515000AA13D /* MGLTileSource_Private.h */; };
404C26E81D89C55D000AA13D /* MGLTileSource_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 404C26E61D89C515000AA13D /* MGLTileSource_Private.h */; };
40599F0C1DEE1B7600182B5D /* api_mapbox_staging.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F001DEE1B2400182B5D /* api_mapbox_staging.der */; };
40599F0D1DEE1B7A00182B5D /* api_mapbox_com-digicert.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F011DEE1B2400182B5D /* api_mapbox_com-digicert.der */; };
40599F0E1DEE1B7E00182B5D /* api_mapbox_com-geotrust.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust.der */; };
40599F0D1DEE1B7A00182B5D /* api_mapbox_com-digicert_2016.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F011DEE1B2400182B5D /* api_mapbox_com-digicert_2016.der */; };
40599F0E1DEE1B7E00182B5D /* api_mapbox_com-geotrust_2016.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust_2016.der */; };
4085AF091D933DEA00F11B22 /* MGLTileSetTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4085AF081D933DEA00F11B22 /* MGLTileSetTests.mm */; };
408982E91DEE208200754016 /* api_mapbox_staging.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F001DEE1B2400182B5D /* api_mapbox_staging.der */; };
408982EA1DEE208B00754016 /* api_mapbox_com-digicert.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F011DEE1B2400182B5D /* api_mapbox_com-digicert.der */; };
408982EB1DEE209100754016 /* api_mapbox_com-geotrust.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust.der */; };
408982EA1DEE208B00754016 /* api_mapbox_com-digicert_2016.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F011DEE1B2400182B5D /* api_mapbox_com-digicert_2016.der */; };
408982EB1DEE209100754016 /* api_mapbox_com-geotrust_2016.der in Resources */ = {isa = PBXBuildFile; fileRef = 40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust_2016.der */; };
408AA8571DAEDA1700022900 /* NSDictionary+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 408AA8551DAEDA0800022900 /* NSDictionary+MGLAdditions.h */; };
408AA8581DAEDA1E00022900 /* NSDictionary+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 408AA8561DAEDA0800022900 /* NSDictionary+MGLAdditions.mm */; };
408AA8591DAEDA1E00022900 /* NSDictionary+MGLAdditions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 408AA8561DAEDA0800022900 /* NSDictionary+MGLAdditions.mm */; };
409D0A0D1ED614CE00C95D0C /* MGLAnnotationViewIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 409D0A0C1ED614CE00C95D0C /* MGLAnnotationViewIntegrationTests.swift */; };
409F43FD1E9E781C0048729D /* MGLMapViewDelegateIntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 409F43FC1E9E781C0048729D /* MGLMapViewDelegateIntegrationTests.swift */; };
40CF6DBB1DAC3C6600A4D18B /* MGLShape_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 40CF6DBA1DAC3C1800A4D18B /* MGLShape_Private.h */; };
40CFA6511D7875BB008103BD /* MGLShapeSourceTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 40CFA6501D787579008103BD /* MGLShapeSourceTests.mm */; };
40EA6BC11EF4599600FCCDA2 /* api_mapbox_com-digicert_2017.der in Resources */ = {isa = PBXBuildFile; fileRef = 40EA6BBD1EF4598900FCCDA2 /* api_mapbox_com-digicert_2017.der */; };
40EA6BC21EF4599700FCCDA2 /* api_mapbox_com-digicert_2017.der in Resources */ = {isa = PBXBuildFile; fileRef = 40EA6BBD1EF4598900FCCDA2 /* api_mapbox_com-digicert_2017.der */; };
40EA6BC31EF4599D00FCCDA2 /* api_mapbox_com-geotrust_2017.der in Resources */ = {isa = PBXBuildFile; fileRef = 40EA6BBE1EF4598900FCCDA2 /* api_mapbox_com-geotrust_2017.der */; };
40EA6BC41EF4599D00FCCDA2 /* api_mapbox_com-geotrust_2017.der in Resources */ = {isa = PBXBuildFile; fileRef = 40EA6BBE1EF4598900FCCDA2 /* api_mapbox_com-geotrust_2017.der */; };
40EDA1C01CFE0E0200D9EA68 /* MGLAnnotationContainerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 40EDA1BD1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.h */; };
40EDA1C11CFE0E0500D9EA68 /* MGLAnnotationContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 40EDA1BE1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.m */; };
40EDA1C21CFE0E0500D9EA68 /* MGLAnnotationContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 40EDA1BE1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.m */; };
Expand Down Expand Up @@ -635,15 +639,17 @@
404C26E11D89B877000AA13D /* MGLTileSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLTileSource.mm; sourceTree = "<group>"; };
404C26E61D89C515000AA13D /* MGLTileSource_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLTileSource_Private.h; sourceTree = "<group>"; };
40599F001DEE1B2400182B5D /* api_mapbox_staging.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = api_mapbox_staging.der; sourceTree = "<group>"; };
40599F011DEE1B2400182B5D /* api_mapbox_com-digicert.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "api_mapbox_com-digicert.der"; sourceTree = "<group>"; };
40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "api_mapbox_com-geotrust.der"; sourceTree = "<group>"; };
40599F011DEE1B2400182B5D /* api_mapbox_com-digicert_2016.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "api_mapbox_com-digicert_2016.der"; sourceTree = "<group>"; };
40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust_2016.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "api_mapbox_com-geotrust_2016.der"; sourceTree = "<group>"; };
4085AF081D933DEA00F11B22 /* MGLTileSetTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLTileSetTests.mm; path = ../../darwin/test/MGLTileSetTests.mm; sourceTree = "<group>"; };
408AA8551DAEDA0800022900 /* NSDictionary+MGLAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+MGLAdditions.h"; sourceTree = "<group>"; };
408AA8561DAEDA0800022900 /* NSDictionary+MGLAdditions.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = "NSDictionary+MGLAdditions.mm"; sourceTree = "<group>"; };
409D0A0C1ED614CE00C95D0C /* MGLAnnotationViewIntegrationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MGLAnnotationViewIntegrationTests.swift; sourceTree = "<group>"; };
409F43FC1E9E781C0048729D /* MGLMapViewDelegateIntegrationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MGLMapViewDelegateIntegrationTests.swift; sourceTree = "<group>"; };
40CF6DBA1DAC3C1800A4D18B /* MGLShape_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLShape_Private.h; sourceTree = "<group>"; };
40CFA6501D787579008103BD /* MGLShapeSourceTests.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = MGLShapeSourceTests.mm; path = ../../darwin/test/MGLShapeSourceTests.mm; sourceTree = "<group>"; };
40EA6BBD1EF4598900FCCDA2 /* api_mapbox_com-digicert_2017.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "api_mapbox_com-digicert_2017.der"; sourceTree = "<group>"; };
40EA6BBE1EF4598900FCCDA2 /* api_mapbox_com-geotrust_2017.der */ = {isa = PBXFileReference; lastKnownFileType = file; path = "api_mapbox_com-geotrust_2017.der"; sourceTree = "<group>"; };
40EDA1BD1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAnnotationContainerView.h; sourceTree = "<group>"; };
40EDA1BE1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLAnnotationContainerView.m; sourceTree = "<group>"; };
40F8876F1D7A1DB8008ECB67 /* MGLShapeSource_Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLShapeSource_Private.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1347,8 +1353,10 @@
DAC49C5F1CD02BC9009E1AA3 /* Localizable.stringsdict */,
DA8933EF1CCD387900E68420 /* strip-frameworks.sh */,
40599F001DEE1B2400182B5D /* api_mapbox_staging.der */,
40599F011DEE1B2400182B5D /* api_mapbox_com-digicert.der */,
40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust.der */,
40599F011DEE1B2400182B5D /* api_mapbox_com-digicert_2016.der */,
40599F021DEE1B2400182B5D /* api_mapbox_com-geotrust_2016.der */,
40EA6BBD1EF4598900FCCDA2 /* api_mapbox_com-digicert_2017.der */,
40EA6BBE1EF4598900FCCDA2 /* api_mapbox_com-geotrust_2017.der */,
);
name = "Kit Resources";
path = resources;
Expand Down Expand Up @@ -2069,9 +2077,11 @@
DA8933F01CCD387900E68420 /* strip-frameworks.sh in Resources */,
DAC49C5C1CD02BC9009E1AA3 /* Localizable.stringsdict in Resources */,
DA8933BF1CCD2CAD00E68420 /* Foundation.stringsdict in Resources */,
40EA6BC11EF4599600FCCDA2 /* api_mapbox_com-digicert_2017.der in Resources */,
408982E91DEE208200754016 /* api_mapbox_staging.der in Resources */,
408982EA1DEE208B00754016 /* api_mapbox_com-digicert.der in Resources */,
408982EB1DEE209100754016 /* api_mapbox_com-geotrust.der in Resources */,
408982EA1DEE208B00754016 /* api_mapbox_com-digicert_2016.der in Resources */,
40EA6BC31EF4599D00FCCDA2 /* api_mapbox_com-geotrust_2017.der in Resources */,
408982EB1DEE209100754016 /* api_mapbox_com-geotrust_2016.der in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -2083,10 +2093,12 @@
DA8933DB1CCD31D400E68420 /* Foundation.strings in Resources */,
960D0C371ECF5AAF008E151F /* Images.xcassets in Resources */,
DA8933DC1CCD31D400E68420 /* Foundation.stringsdict in Resources */,
40EA6BC41EF4599D00FCCDA2 /* api_mapbox_com-geotrust_2017.der in Resources */,
DAC49C5D1CD02BC9009E1AA3 /* Localizable.stringsdict in Resources */,
40599F0C1DEE1B7600182B5D /* api_mapbox_staging.der in Resources */,
40599F0D1DEE1B7A00182B5D /* api_mapbox_com-digicert.der in Resources */,
40599F0E1DEE1B7E00182B5D /* api_mapbox_com-geotrust.der in Resources */,
40599F0D1DEE1B7A00182B5D /* api_mapbox_com-digicert_2016.der in Resources */,
40599F0E1DEE1B7E00182B5D /* api_mapbox_com-geotrust_2016.der in Resources */,
40EA6BC21EF4599700FCCDA2 /* api_mapbox_com-digicert_2017.der in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Binary file not shown.
Binary file not shown.
114 changes: 49 additions & 65 deletions platform/ios/src/MGLAPIClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ @interface MGLAPIClient ()

@property (nonatomic, copy) NSURLSession *session;
@property (nonatomic, copy) NSURL *baseURL;
@property (nonatomic, copy) NSData *digicertCert;
@property (nonatomic, copy) NSData *geoTrustCert;
@property (nonatomic, copy) NSData *digicertCert_2016;
@property (nonatomic, copy) NSData *geoTrustCert_2016;
@property (nonatomic, copy) NSData *digicertCert_2017;
@property (nonatomic, copy) NSData *geoTrustCert_2017;
@property (nonatomic, copy) NSData *testServerCert;
@property (nonatomic, copy) NSString *userAgent;
@property (nonatomic) BOOL usesTestServer;
Expand Down Expand Up @@ -107,10 +109,14 @@ - (void)setupBaseURL {

- (void)loadCertificates {
NSData *certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_com-geotrust"];
self.geoTrustCert = certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_com-digicert"];
self.digicertCert = certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_com-geotrust_2016"];
self.geoTrustCert_2016 = certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_com-digicert_2016"];
self.digicertCert_2016 = certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_com-geotrust_2017"];
self.geoTrustCert_2017 = certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_com-digicert_2017"];
self.digicertCert_2017 = certificate;
[self loadCertificate:&certificate withResource:@"api_mapbox_staging"];
self.testServerCert = certificate;
}
Expand Down Expand Up @@ -141,75 +147,53 @@ - (NSData *)serializedDataForEvents:(NS_ARRAY_OF(MGLMapboxEventAttributes *) *)e

#pragma mark NSURLSessionDelegate

- (BOOL)evaluateCertificateWithCertificateData:(NSData *)certificateData keyCount:(CFIndex)keyCount serverTrust:(SecTrustRef)serverTrust challenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^) (NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler {
for (int lc = 0; lc < keyCount; lc++) {
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, lc);
NSData *remoteCertificateData = CFBridgingRelease(SecCertificateCopyData(certificate));
if ([remoteCertificateData isEqualToData:certificateData]) {
completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
return YES;
}
}
return NO;
}

- (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^) (NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler {

if([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {

SecTrustRef serverTrust = [[challenge protectionSpace] serverTrust];
SecTrustResultType trustResult;

// Validate the certificate chain with the device's trust store anyway
// This *might* give use revocation checking

// Validate the certificate chain with the device's trust store anyway this *might* use revocation checking
SecTrustEvaluate(serverTrust, &trustResult);
if (trustResult == kSecTrustResultUnspecified)
{

BOOL found = NO; // For clarity; we start in a state where the challange has not been completed and no certificate has been found

if (trustResult == kSecTrustResultUnspecified) {
// Look for a pinned certificate in the server's certificate chain
long numKeys = SecTrustGetCertificateCount(serverTrust);

BOOL found = NO;
// Try GeoTrust Cert First
for (int lc = 0; lc < numKeys; lc++) {
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, lc);
NSData *remoteCertificateData = CFBridgingRelease(SecCertificateCopyData(certificate));

// Compare Remote Key With Local Version
if ([remoteCertificateData isEqualToData:_geoTrustCert]) {
// Found the certificate; continue connecting
completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
found = YES;
break;
}
CFIndex numKeys = SecTrustGetCertificateCount(serverTrust);

// Check certs in the following order: digicert 2016, digicert 2017, geotrust 2016, geotrust 2017
found = [self evaluateCertificateWithCertificateData:self.digicertCert_2016 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler];
if (!found) {
found = [self evaluateCertificateWithCertificateData:self.digicertCert_2017 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler];
}

if (!found) {
// Fallback to Digicert Cert
for (int lc = 0; lc < numKeys; lc++) {
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, lc);
NSData *remoteCertificateData = CFBridgingRelease(SecCertificateCopyData(certificate));

// Compare Remote Key With Local Version
if ([remoteCertificateData isEqualToData:_digicertCert]) {
// Found the certificate; continue connecting
completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
found = YES;
break;
}
}

if (!found && _usesTestServer) {
// See if this is test server
for (int lc = 0; lc < numKeys; lc++) {
SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, lc);
NSData *remoteCertificateData = CFBridgingRelease(SecCertificateCopyData(certificate));

// Compare Remote Key With Local Version
if ([remoteCertificateData isEqualToData:_testServerCert]) {
// Found the certificate; continue connecting
completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
found = YES;
break;
}
}
}

if (!found) {
// The certificate wasn't found in GeoTrust nor Digicert. Cancel the connection.
completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
}
found = [self evaluateCertificateWithCertificateData:self.geoTrustCert_2016 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler];
}
if (!found) {
found = [self evaluateCertificateWithCertificateData:self.geoTrustCert_2017 keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler];
}

// If challenge can't be completed with any of the above certs, then try the test server if the app is configured to use the test server
if (!found && _usesTestServer) {
found = [self evaluateCertificateWithCertificateData:self.testServerCert keyCount:numKeys serverTrust:serverTrust challenge:challenge completionHandler:completionHandler];
}
}
else
{
// Certificate chain validation failed; cancel the connection

if (!found) {
// No certificate was found so cancel the connection.
completionHandler(NSURLSessionAuthChallengeCancelAuthenticationChallenge, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
}
}
Expand Down