diff options
author | Jason Wray <jason@mapbox.com> | 2017-08-01 19:14:28 -0400 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2017-08-01 19:25:59 -0400 |
commit | e1d2fcee09088e8b6c28504713f17d7eef0477f3 (patch) | |
tree | 846bc4c8f2d4ce6eff38b65043377b13fb89773f | |
parent | b7bde8fdc390afda8ed524512f7368fe6f173d2b (diff) | |
download | qtlocation-mapboxgl-e1d2fcee09088e8b6c28504713f17d7eef0477f3.tar.gz |
[ios] Fix iosapp's third-party tiles SSL exemption, non-retinanessupstream/fb-iosapp-futzing
-rw-r--r-- | platform/ios/app/Info.plist | 13 | ||||
-rw-r--r-- | platform/ios/app/MBXViewController.m | 5 |
2 files changed, 2 insertions, 16 deletions
diff --git a/platform/ios/app/Info.plist b/platform/ios/app/Info.plist index f05e737a49..167e66fa09 100644 --- a/platform/ios/app/Info.plist +++ b/platform/ios/app/Info.plist @@ -51,19 +51,6 @@ <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> - <key>NSAppTransportSecurity</key> - <dict> - <key>NSExceptionDomains</key> - <dict> - <key>stamen.com</key> - <dict> - <key>NSIncludesSubdomains</key> - <true/> - <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> - <true/> - </dict> - </dict> - </dict> <key>UIApplicationShortcutItems</key> <array> <dict> diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index abdaaa5292..992b7d587a 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -1260,9 +1260,8 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { - (void)styleRasterSource { - // 3rd party raster source requires NSAppTransportSecurity exception for stamen.com - NSArray *tileURLTemplates = @[@"http://a.tile.stamen.com/terrain-background/{z}/{x}/{y}.jpg"]; - MGLRasterSource *rasterSource = [[MGLRasterSource alloc] initWithIdentifier:@"style-raster-source-id" tileURLTemplates:tileURLTemplates options:@{ + NSString *tileURL = [NSString stringWithFormat:@"https://stamen-tiles.a.ssl.fastly.net/terrain-background/{z}/{x}/{y}%@.jpg", UIScreen.mainScreen.nativeScale > 1 ? @"@2x" : @""]; + MGLRasterSource *rasterSource = [[MGLRasterSource alloc] initWithIdentifier:@"style-raster-source-id" tileURLTemplates:@[tileURL] options:@{ MGLTileSourceOptionTileSize: @256, }]; [self.mapView.style addSource:rasterSource]; |