diff options
Diffstat (limited to 'platform/darwin/src/MGLSource.mm')
-rw-r--r-- | platform/darwin/src/MGLSource.mm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLSource.mm b/platform/darwin/src/MGLSource.mm index ef23fe30e7..1d7b46e1cc 100644 --- a/platform/darwin/src/MGLSource.mm +++ b/platform/darwin/src/MGLSource.mm @@ -3,6 +3,10 @@ #import "MGLMapView_Private.h" #import "NSBundle+MGLAdditions.h" +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +#import "MMEEventsManager.h" +#endif + #include <mbgl/style/style.hpp> #include <mbgl/map/map.hpp> #include <mbgl/style/source.hpp> @@ -86,6 +90,10 @@ const MGLExceptionName MGLInvalidStyleSourceException = @"MGLInvalidStyleSourceE *outError = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeSourceIsInUseCannotRemove userInfo:@{ NSLocalizedDescriptionKey : localizedDescription }]; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + [[MMEEventsManager sharedManager] reportError:*outError]; +#endif + } } else if (outError) { // TODO: Consider raising an exception here @@ -96,6 +104,9 @@ const MGLExceptionName MGLInvalidStyleSourceException = @"MGLInvalidStyleSourceE *outError = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeSourceIdentifierMismatch userInfo:@{ NSLocalizedDescriptionKey : localizedDescription }]; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + [[MMEEventsManager sharedManager] reportError:*outError]; +#endif } return removed; |