summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2017-09-25 11:34:57 -0400
committerJoel Fischer <joeljfischer@gmail.com>2017-09-25 11:34:57 -0400
commite75038a5009681c8a64595b862889e9630a38dbd (patch)
tree089cef737a438dfa83d02bac3b0d6487bc82f535
parent99562c42549badec2f2a00fca28c587e5f0690d1 (diff)
downloadsdl_ios-e75038a5009681c8a64595b862889e9630a38dbd.tar.gz
Update streaming config with correct asserts
-rw-r--r--SmartDeviceLink/SDLConfiguration.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/SmartDeviceLink/SDLConfiguration.m b/SmartDeviceLink/SDLConfiguration.m
index 957e19635..bff1e8aad 100644
--- a/SmartDeviceLink/SDLConfiguration.m
+++ b/SmartDeviceLink/SDLConfiguration.m
@@ -62,10 +62,12 @@ NS_ASSUME_NONNULL_BEGIN
_streamingMediaConfig = streamingMediaConfig;
if (_streamingMediaConfig != nil) {
- NSAssert(!([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection]), @"You should only set a streaming media configuration if your app is a NAVIGATION or PROJECTION HMI type");
+ // If we have a streaming config, the apptype MUST be navigation or projection
+ NSAssert(([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection]), @"You should only set a streaming media configuration if your app is a NAVIGATION or PROJECTION HMI type");
_streamingMediaConfig = streamingMediaConfig;
} else {
- NSAssert(([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection]), @"If your app is a NAVIGATION or PROJECTION HMI type, you must set a streaming media configuration on SDLConfiguration");
+ // If we don't have a streaming config, we MUST NOT be navigation or projection
+ NSAssert(!([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection]), @"If your app is a NAVIGATION or PROJECTION HMI type, you must set a streaming media configuration on SDLConfiguration");
}
return self;