From 2f0af0e8f4e1f0fc0dbc4a6b13ab2f098adad0af Mon Sep 17 00:00:00 2001 From: Fabian Guerra Soto Date: Wed, 10 Apr 2019 13:01:59 -0700 Subject: [ios] Deactivate MGLMapView IBDesignable (#14379) Removed MGLMapView's IBDesignable attribute. The map's view render attributes uses GL, making changes through the inspectables were not reflected in the storyboard and were causing IB crashes. * [ios] Deactivate MGLMapView IBDesignable. * [ios] Remove IBDesignable agent code. * [ios, macos] Remove NSProcessInfo category from iOS. --- platform/darwin/src/MGLAccountManager.m | 5 +++++ platform/darwin/src/NSProcessInfo+MGLAdditions.h | 11 ----------- platform/darwin/src/NSProcessInfo+MGLAdditions.m | 10 ---------- 3 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 platform/darwin/src/NSProcessInfo+MGLAdditions.h delete mode 100644 platform/darwin/src/NSProcessInfo+MGLAdditions.m (limited to 'platform/darwin') diff --git a/platform/darwin/src/MGLAccountManager.m b/platform/darwin/src/MGLAccountManager.m index d914867628..63fa634884 100644 --- a/platform/darwin/src/MGLAccountManager.m +++ b/platform/darwin/src/MGLAccountManager.m @@ -1,6 +1,8 @@ #import "MGLAccountManager_Private.h" #import "NSBundle+MGLAdditions.h" +#if TARGET_OS_OSX #import "NSProcessInfo+MGLAdditions.h" +#endif #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR #import "MGLMapboxEvents.h" @@ -40,9 +42,12 @@ } + (instancetype)sharedManager { +#if TARGET_OS_OSX if (NSProcessInfo.processInfo.mgl_isInterfaceBuilderDesignablesAgent) { return nil; } +#endif + static dispatch_once_t onceToken; static MGLAccountManager *_sharedManager; void (^setupBlock)(void) = ^{ diff --git a/platform/darwin/src/NSProcessInfo+MGLAdditions.h b/platform/darwin/src/NSProcessInfo+MGLAdditions.h deleted file mode 100644 index 1dc1439d53..0000000000 --- a/platform/darwin/src/NSProcessInfo+MGLAdditions.h +++ /dev/null @@ -1,11 +0,0 @@ -#import - -@interface NSProcessInfo (MGLAdditions) - -/** - Returns YES if the current process is Interface Builder’s helper process for - rendering designables. - */ -- (BOOL)mgl_isInterfaceBuilderDesignablesAgent; - -@end diff --git a/platform/darwin/src/NSProcessInfo+MGLAdditions.m b/platform/darwin/src/NSProcessInfo+MGLAdditions.m deleted file mode 100644 index 0c287c030b..0000000000 --- a/platform/darwin/src/NSProcessInfo+MGLAdditions.m +++ /dev/null @@ -1,10 +0,0 @@ -#import "NSProcessInfo+MGLAdditions.h" - -@implementation NSProcessInfo (MGLAdditions) - -- (BOOL)mgl_isInterfaceBuilderDesignablesAgent { - NSString *processName = self.processName; - return [processName hasPrefix:@"IBAgent"] || [processName hasPrefix:@"IBDesignablesAgent"]; -} - -@end -- cgit v1.2.1