diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 24ee30045..195635ef1 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -2568,10 +2568,12 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) - (void)addOverlays:(NS_ARRAY_OF(id ) *)overlays { +#if DEBUG for (id overlay in overlays) { NSAssert([overlay conformsToProtocol:@protocol(MGLOverlay)], @"overlay should conform to MGLOverlay"); } +#endif [self addAnnotations:overlays]; } @@ -2583,10 +2585,12 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) - (void)removeOverlays:(NS_ARRAY_OF(id ) *)overlays { +#if DEBUG for (id overlay in overlays) { NSAssert([overlay conformsToProtocol:@protocol(MGLOverlay)], @"overlay should conform to MGLOverlay"); } +#endif [self removeAnnotations:overlays]; }