From b8e21444dca7a677106be08c3766d6cc44f27255 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Fri, 25 Jan 2019 16:43:43 -0800 Subject: [ios] Remove IBDesignable agent code. --- platform/ios/src/MGLMapView.mm | 12 ++++-------- platform/ios/src/MGLSDKUpdateChecker.mm | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index bef4773b2f..04cf70b210 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -288,7 +288,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; @@ -390,14 +389,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]; @@ -432,7 +429,6 @@ public: - (void)commonInit { - _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent; _opaque = NO; BOOL background = [UIApplication sharedApplication].applicationState == UIApplicationStateBackground; @@ -474,7 +470,7 @@ public: _mbglMap = new mbgl::Map(*_rendererFrontend, *_mbglView, self.size, config.scaleFactor, *[config fileSource], *_mbglThreadPool, mbgl::MapMode::Continuous, mbgl::ConstrainMode::None, mbgl::ViewportMode::Default, enableCrossSourceCollisions); // start paused if in IB - if (_isTargetingInterfaceBuilder || background) { + if (background) { self.dormant = YES; } @@ -1051,7 +1047,7 @@ public: [self adjustContentInset]; - if (!_isTargetingInterfaceBuilder && _mbglMap) { + if (_mbglMap) { self.mbglMap.setSize([self size]); } @@ -5145,7 +5141,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/MGLSDKUpdateChecker.mm b/platform/ios/src/MGLSDKUpdateChecker.mm index c41fc51ac5..e40a31a225 100644 --- a/platform/ios/src/MGLSDKUpdateChecker.mm +++ b/platform/ios/src/MGLSDKUpdateChecker.mm @@ -7,8 +7,7 @@ + (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; } -- cgit v1.2.1