diff options
Diffstat (limited to 'platform/ios/src')
-rw-r--r-- | platform/ios/src/MGLMapView.h | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 13 | ||||
-rw-r--r-- | platform/ios/src/MGLMapboxEvents.m | 4 | ||||
-rw-r--r-- | platform/ios/src/MGLSDKUpdateChecker.mm | 4 |
4 files changed, 6 insertions, 17 deletions
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 589b7b547b..607a197840 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -179,7 +179,7 @@ FOUNDATION_EXTERN MGL_EXPORT MGLExceptionName const MGLResourceNotFoundException See the <a href="https://docs.mapbox.com/ios/maps/examples/simple-map-view/"> Simple map view</a> example to learn how to initialize a basic `MGLMapView`. */ -MGL_EXPORT IB_DESIGNABLE +MGL_EXPORT @interface MGLMapView : UIView #pragma mark Creating Instances diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 8bfd161cdb..232beb9b2e 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -48,7 +48,6 @@ #import "NSDate+MGLAdditions.h" #import "NSException+MGLAdditions.h" #import "NSPredicate+MGLPrivateAdditions.h" -#import "NSProcessInfo+MGLAdditions.h" #import "NSString+MGLAdditions.h" #import "NSURL+MGLAdditions.h" #import "UIDevice+MGLAdditions.h" @@ -299,7 +298,6 @@ public: /// True if a willChange notification has been issued for shape annotation layers and a didChange notification is pending. BOOL _isChangingAnnotationLayers; BOOL _isWaitingForRedundantReachableNotification; - BOOL _isTargetingInterfaceBuilder; CLLocationDegrees _pendingLatitude; CLLocationDegrees _pendingLongitude; @@ -404,14 +402,12 @@ public: } NSString *styleURLString = @(self.mbglMap.getStyle().getURL().c_str()).mgl_stringOrNilIfEmpty; - MGLAssert(styleURLString || _isTargetingInterfaceBuilder, @"Invalid style URL string %@", styleURLString); + MGLAssert(styleURLString, @"Invalid style URL string %@", styleURLString); return styleURLString ? [NSURL URLWithString:styleURLString] : nil; } - (void)setStyleURL:(nullable NSURL *)styleURL { - if (_isTargetingInterfaceBuilder) return; - if ( ! styleURL) { styleURL = [MGLStyle streetsStyleURLWithVersion:MGLStyleDefaultVersion]; @@ -446,7 +442,6 @@ public: - (void)commonInit { - _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent; _opaque = NO; _atLeastiOS_12_2_0 = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){12,2,0}]; @@ -501,7 +496,7 @@ public: _mbglMap = new mbgl::Map(*_rendererFrontend, *_mbglView, *_mbglThreadPool, mapOptions, resourceOptions); // start paused if in IB - if (_isTargetingInterfaceBuilder || background) { + if (background) { self.dormant = YES; } @@ -1006,7 +1001,7 @@ public: [self adjustContentInset]; - if (!_isTargetingInterfaceBuilder && _mbglMap) { + if (_mbglMap) { self.mbglMap.setSize([self size]); } @@ -5341,7 +5336,7 @@ public: - (void)setShowsUserLocation:(BOOL)showsUserLocation { MGLLogDebug(@"Setting showsUserLocation: %@", MGLStringFromBOOL(showsUserLocation)); - if (showsUserLocation == _showsUserLocation || _isTargetingInterfaceBuilder) return; + if (showsUserLocation == _showsUserLocation) return; _showsUserLocation = showsUserLocation; diff --git a/platform/ios/src/MGLMapboxEvents.m b/platform/ios/src/MGLMapboxEvents.m index 0635f974e1..eabd970edb 100644 --- a/platform/ios/src/MGLMapboxEvents.m +++ b/platform/ios/src/MGLMapboxEvents.m @@ -1,6 +1,5 @@ #import "MGLMapboxEvents.h" #import "NSBundle+MGLAdditions.h" -#import "NSProcessInfo+MGLAdditions.h" static NSString * const MGLAPIClientUserAgentBase = @"mapbox-maps-ios"; static NSString * const MGLMapboxAccountType = @"MGLMapboxAccountType"; @@ -32,9 +31,6 @@ static NSString * const MGLVariableGeofence = @"VariableGeofence"; } + (nullable instancetype)sharedInstance { - if (NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) { - return nil; - } static dispatch_once_t onceToken; static MGLMapboxEvents *_sharedInstance; diff --git a/platform/ios/src/MGLSDKUpdateChecker.mm b/platform/ios/src/MGLSDKUpdateChecker.mm index c41fc51ac5..cfea139bdb 100644 --- a/platform/ios/src/MGLSDKUpdateChecker.mm +++ b/platform/ios/src/MGLSDKUpdateChecker.mm @@ -1,14 +1,12 @@ #import "MGLSDKUpdateChecker.h" #import "NSBundle+MGLAdditions.h" -#import "NSProcessInfo+MGLAdditions.h" @implementation MGLSDKUpdateChecker + (void)checkForUpdates { #if TARGET_IPHONE_SIMULATOR // Abort if running in a playground. - if ([[NSBundle mainBundle].bundleIdentifier hasPrefix:@"com.apple.dt.playground."] || - NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) { + if ([[NSBundle mainBundle].bundleIdentifier hasPrefix:@"com.apple.dt.playground."]) { return; } |