[ios, macos] Look more widely for IBDesignablesAgent

The IBDesignablesAgent helper process has been renamed for each platform as of Xcode 10, so cast a wider net when trying to detect it.
This commit is contained in:
Minh Nguyễn
2018-06-13 10:50:46 -07:00
committed by Minh Nguyễn
parent caecdc8482
commit ee790818d8
2 changed files with 2 additions and 7 deletions

View File

@@ -1,15 +1,9 @@
#import "NSProcessInfo+MGLAdditions.h"
#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
static NSString * const MGLIBDesignablesAgentProcessName = @"IBDesignablesAgentCocoaTouch";
#elif TARGET_OS_MAC
static NSString * const MGLIBDesignablesAgentProcessName = @"IBDesignablesAgent";
#endif
@implementation NSProcessInfo (MGLAdditions)
- (BOOL)mgl_isInterfaceBuilderDesignablesAgent {
return [self.processName isEqualToString:MGLIBDesignablesAgentProcessName];
return [self.processName hasPrefix:@"IBDesignablesAgent"];
}
@end

View File

@@ -5,6 +5,7 @@
### Packaging
* The minimum deployment target for this SDK is now macOS 10.11.0. ([#11776](https://github.com/mapbox/mapbox-gl-native/pull/11776))
* Fixed an issue where `MGLMapView` produced a designable error in Interface Builder storyboards. ([#12140](https://github.com/mapbox/mapbox-gl-native/pull/12140))
### Style layers