Preparations for ios-v5.7.0-alpha.1 (#139)

* Podspec & changelog updates for 5.7.0-alpha.1

* Bump to mapbox-gl-native/d3a5ed

* Add files from #16031 (#140)

* [ios] Add changed files

* [ios] Add files to project

* [ios] Bumped submodule

* Bump vendor/mapbox-gl-native to master again

Co-authored-by: Jordan Kiley <jmkiley@users.noreply.github.com>
This commit is contained in:
Nadia Barbosa
2020-01-10 11:05:11 -08:00
committed by GitHub
parent 309e226f74
commit 87ada1e735
10 changed files with 148 additions and 7 deletions

View File

@@ -0,0 +1,8 @@
#import <Foundation/Foundation.h>
#include <mbgl/interface/native_apple_interface.h>
@interface MGLNetworkIntegrationManager : NSObject <MGLNativeNetworkDelegate>
+ (MGLNetworkIntegrationManager *)sharedManager;
@end

View File

@@ -0,0 +1,54 @@
#import "MGLNetworkIntegrationManager.h"
#import "MGLLoggingConfiguration_Private.h"
#import "MGLNetworkConfiguration_Private.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
#import "MGLAccountManager_Private.h"
#endif
@implementation MGLNetworkIntegrationManager
static MGLNetworkIntegrationManager *instance = nil;
+ (MGLNetworkIntegrationManager *)sharedManager {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[MGLNetworkIntegrationManager alloc] init];
});
return instance;
}
#pragma mark - MGLNativeAppleInterfaceManager delegate -
- (NSURLSessionConfiguration *)sessionConfiguration {
return [MGLNetworkConfiguration sharedManager].sessionConfiguration;
}
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
- (NSString *)skuToken {
return MGLAccountManager.skuToken;
}
#endif
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type {
[[MGLNetworkConfiguration sharedManager] startDownloadEvent:event type:@"tile"];
}
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response {
[[MGLNetworkConfiguration sharedManager] cancelDownloadEventForResponse:response];
}
- (void)stopDownloadEventForResponse:(NSURLResponse *)response {
[[MGLNetworkConfiguration sharedManager] stopDownloadEventForResponse:response];
}
- (void)debugLog:(NSString *)format, ... {
MGLLogDebug(format);
}
- (void)errorLog:(NSString *)format, ... {
MGLLogError(format);
}
@end

View File

@@ -0,0 +1,73 @@
#import <Foundation/Foundation.h>
#import <mbgl/interface/native_apple_interface.h>
@implementation MGLNativeNetworkManager
static MGLNativeNetworkManager *instance = nil;
+ (MGLNativeNetworkManager *)sharedManager {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[MGLNativeNetworkManager alloc] init];
});
return instance;
}
- (NSURLSessionConfiguration *)sessionConfiguration {
if (_delegate && [_delegate respondsToSelector:@selector(sessionConfiguration)]) {
return [_delegate sessionConfiguration];
}
// For testing. Since we get a `nil` return when SDK is modualar, we use this for testing requests.
// Same as `[MGLNetworkConfiguration defaultSessionConfiguration]` in `MGLNetworkConfiguration.m`.
return [self testSessionConfiguration];
}
- (NSURLSessionConfiguration *)testSessionConfiguration {
NSURLSessionConfiguration* sessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration];
sessionConfiguration.timeoutIntervalForResource = 30;
sessionConfiguration.HTTPMaximumConnectionsPerHost = 8;
sessionConfiguration.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
sessionConfiguration.URLCache = nil;
return sessionConfiguration;
}
- (NSString *)skuToken {
if(_delegate && [_delegate respondsToSelector:@selector(skuToken)]) {
return [_delegate skuToken];
}
return nil;
}
- (void)startDownloadEvent:(NSString *)event type:(NSString *)type {
if (_delegate && [_delegate respondsToSelector:@selector(startDownloadEvent:type:)]) {
[_delegate startDownloadEvent:event type:type];
}
}
- (void)cancelDownloadEventForResponse:(NSURLResponse *)response {
if (_delegate && [_delegate respondsToSelector:@selector(cancelDownloadEventForResponse:)]) {
return [_delegate cancelDownloadEventForResponse:response];
}
}
- (void)stopDownloadEventForResponse:(NSURLResponse *)response {
if (_delegate && [_delegate respondsToSelector:@selector(stopDownloadEventForResponse:)]) {
return [_delegate stopDownloadEventForResponse:response];
}
}
- (void)debugLog:(NSString *)format, ...{
if (_delegate && [_delegate respondsToSelector:@selector(debugLog:)]) {
return [_delegate debugLog:format];
}
}
- (void)errorLog:(NSString *)format, ...{
if (_delegate && [_delegate respondsToSelector:@selector(errorLog:)]) {
return [_delegate errorLog:format];
}
}
@end

View File

@@ -2,7 +2,7 @@
Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started.
## master
## 5.7.0
### Other changes
* Added new property `MGLMapView.panScrollingMode`, which allows you to limit the horizontal or vertical direction a user may pan on the map view. ([#108](https://github.com/mapbox/mapbox-gl-native-ios/pull/108))

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |m|
version = '5.6.0'
version = '5.7.0-alpha.1'
m.name = 'Mapbox-iOS-SDK-snapshot-dynamic'
m.version = "#{version}-snapshot"

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |m|
version = '5.6.0'
version = '5.7.0-alpha.1'
m.name = 'Mapbox-iOS-SDK-stripped'
m.version = "#{version}-stripped"

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |m|
version = '5.6.0'
version = '5.7.0-alpha.1'
m.name = 'Mapbox-iOS-SDK'
m.version = version

View File

@@ -56,7 +56,7 @@ GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_LABEL = YES
GCC_WARN_UNUSED_VARIABLE = YES
HEADER_SEARCH_PATHS = $(inherited) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/platform/default/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/variant/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/geometry.hpp/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/value/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/geojson.hpp/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/optional" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/typewrapper/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/weak/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/rapidjson/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/expected-lite/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/polylabel/include" "$(PROJECT_DIR)/../../platform/darwin/include"
HEADER_SEARCH_PATHS = $(inherited) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/platform/default/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/variant/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/geometry.hpp/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/value/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/geojson.hpp/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/optional" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/typewrapper/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/mapbox/weak/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/rapidjson/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/mapbox-base/extras/expected-lite/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/vendor/polylabel/include" "$(PROJECT_DIR)/../../platform/darwin/include" "$(PROJECT_DIR)/../../vendor/mapbox-gl-native/platform/darwin/include"
LD_GENERATE_MAP_FILE = YES
@@ -79,4 +79,4 @@ CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = NO
// Add developer config
#include? "developer.xcconfig"
#include? "developer.xcconfig"

View File

@@ -384,6 +384,7 @@
9C6E282D22A9815D0056B7BE /* MGLMapboxEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6E282922A980E50056B7BE /* MGLMapboxEvents.h */; };
9C6E282F22A9824B0056B7BE /* MGLTelemetryConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = AC518DFD201BB55A00EBC820 /* MGLTelemetryConfig.h */; };
9C6E283022A9824F0056B7BE /* MGLMapboxEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6E282922A980E50056B7BE /* MGLMapboxEvents.h */; };
A490C46D23C688CD009AC158 /* MGLNetworkIntegrationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = A490C46B23C688CC009AC158 /* MGLNetworkIntegrationManager.m */; };
A4DE3DCB23038C98005B3473 /* MGLMockGestureRecognizers.h in Sources */ = {isa = PBXBuildFile; fileRef = A4DE3DCA23038A7F005B3473 /* MGLMockGestureRecognizers.h */; };
A4DE3DCC23038CCA005B3473 /* MGLMockGestureRecognizers.m in Sources */ = {isa = PBXBuildFile; fileRef = A4DE3DC823038A07005B3473 /* MGLMockGestureRecognizers.m */; };
A4F3FB1D2254865900A30170 /* missing_icon.json in Resources */ = {isa = PBXBuildFile; fileRef = A4F3FB1C2254865900A30170 /* missing_icon.json */; };
@@ -1038,6 +1039,8 @@
9C6E286522A9849E0056B7BE /* release-notes-jazzy.md.ejs */ = {isa = PBXFileReference; lastKnownFileType = text; path = "release-notes-jazzy.md.ejs"; sourceTree = "<group>"; };
9C6E286622A9849E0056B7BE /* deploy-snapshot.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "deploy-snapshot.sh"; sourceTree = "<group>"; };
9C6E286722A9849E0056B7BE /* release-notes.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = "release-notes.js"; sourceTree = "<group>"; };
A490C46B23C688CC009AC158 /* MGLNetworkIntegrationManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLNetworkIntegrationManager.m; sourceTree = "<group>"; };
A490C46C23C688CC009AC158 /* MGLNetworkIntegrationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLNetworkIntegrationManager.h; sourceTree = "<group>"; };
A4DE3DC823038A07005B3473 /* MGLMockGestureRecognizers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGLMockGestureRecognizers.m; sourceTree = "<group>"; };
A4DE3DCA23038A7F005B3473 /* MGLMockGestureRecognizers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLMockGestureRecognizers.h; sourceTree = "<group>"; };
A4F3FB1C2254865900A30170 /* missing_icon.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = missing_icon.json; sourceTree = "<group>"; };
@@ -1956,6 +1959,8 @@
1F2B94BF221636D800210640 /* MGLNetworkConfiguration_Private.h */,
DD0902A21DB18DE700C5BDCE /* MGLNetworkConfiguration.m */,
3EA9337830C7738BF7F5493C /* MGLRendererConfiguration.h */,
A490C46C23C688CC009AC158 /* MGLNetworkIntegrationManager.h */,
A490C46B23C688CC009AC158 /* MGLNetworkIntegrationManager.m */,
3EA931BC4F087E166D538F21 /* MGLRendererConfiguration.mm */,
92F2C3EC1F0E3C3A00268EC0 /* MGLRendererFrontend.h */,
DA8847EC1CBAFA5100AB86E3 /* MGLStyle.h */,
@@ -2987,6 +2992,7 @@
files = (
DA1DC9971CB6E046006E619F /* main.m in Sources */,
354B839C1D2E9B48005D9406 /* MBXUserLocationAnnotationView.m in Sources */,
A490C46D23C688CD009AC158 /* MGLNetworkIntegrationManager.m in Sources */,
965DF51120F9430500438AAC /* MBXFrameTimeGraphView.m in Sources */,
DA1DC9991CB6E054006E619F /* MBXAppDelegate.m in Sources */,
6FA9341721EF372100AA9CA8 /* MBXOrnamentsViewController.m in Sources */,