From b90bd1c582114e6b9fef97d4c1293a5629457eeb Mon Sep 17 00:00:00 2001 From: tonyxiao Date: Thu, 24 Aug 2017 16:50:51 -0700 Subject: [PATCH] Use DEBUG preprocessor flag to conditionally disable assertions in prod (#711) --- Analytics/Classes/Internal/SEGAnalyticsUtils.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Analytics/Classes/Internal/SEGAnalyticsUtils.m b/Analytics/Classes/Internal/SEGAnalyticsUtils.m index 44b6b3072..9e44ea181 100644 --- a/Analytics/Classes/Internal/SEGAnalyticsUtils.m +++ b/Analytics/Classes/Internal/SEGAnalyticsUtils.m @@ -146,6 +146,7 @@ static id SEGCoerceJSONObject(id obj) static void AssertDictionaryTypes(id dict) { +#ifdef DEBUG assert([dict isKindOfClass:[NSDictionary class]]); for (id key in dict) { assert([key isKindOfClass:[NSString class]]); @@ -159,6 +160,7 @@ static void AssertDictionaryTypes(id dict) [value isKindOfClass:[NSDate class]] || [value isKindOfClass:[NSURL class]]); } +#endif } NSDictionary *SEGCoerceDictionary(NSDictionary *dict)