From b3ea068e5db3147dda87a1f39a0391807ff9ff25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Wed, 8 Jul 2015 12:41:34 -0700 Subject: [PATCH] Assert if -mapView:symbolNameForAnnotation: is implemented Fixes #1851. --- platform/ios/MGLMapView.mm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index d6500889f..32ba5a03c 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -455,6 +455,14 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) if (_delegate == delegate) return; _delegate = delegate; + + if ([delegate respondsToSelector:@selector(mapView:symbolNameForAnnotation:)]) + { + [NSException raise:@"Method unavailable" format: + @"-mapView:symbolNameForAnnotation: has been removed from the MGLMapViewDelegate protocol, but %@ still implements it. " + @"Implement -[%@ mapView:imageForAnnotation:] instead.", + NSStringFromClass([delegate class]), NSStringFromClass([delegate class])]; + } } #pragma mark - Layout -