summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra <fabian.guerra@mapbox.com>2019-01-25 16:43:43 -0800
committerFabian Guerra <fabian.guerra@mapbox.com>2019-04-09 13:55:04 -0700
commit171c2f2465bb0e6178df7d1e5dbc0ebc2da273d0 (patch)
treedf93367fe40915ae4ceb989677bcdf01eef7bdbc
parente96d6a01444c2799802a7c1224c0ad22b0274e57 (diff)
downloadqtlocation-mapboxgl-upstream/fabian-inspectables-13424.tar.gz
[ios] Remove IBDesignable agent code.upstream/fabian-inspectables-13424
-rw-r--r--platform/ios/src/MGLMapView.mm12
-rw-r--r--platform/ios/src/MGLSDKUpdateChecker.mm3
2 files changed, 5 insertions, 10 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 8bfd161cdb..663dc4899c 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -299,7 +299,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 +403,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 +443,6 @@ public:
- (void)commonInit
{
- _isTargetingInterfaceBuilder = NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent;
_opaque = NO;
_atLeastiOS_12_2_0 = [NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){12,2,0}];
@@ -501,7 +497,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 +1002,7 @@ public:
[self adjustContentInset];
- if (!_isTargetingInterfaceBuilder && _mbglMap) {
+ if (_mbglMap) {
self.mbglMap.setSize([self size]);
}
@@ -5341,7 +5337,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;
}