summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-02-09 13:50:00 -0500
committerJoel Fischer <joeljfischer@gmail.com>2018-02-09 13:50:00 -0500
commit25f26d824b83173d2b33610188d96dc9cd222365 (patch)
tree5460baa762d84f44ba44d797117ce4ffaf240788
parentb127a6fe01ec19a2e61ef4ee0cdc47c646b06296 (diff)
downloadsdl_ios-25f26d824b83173d2b33610188d96dc9cd222365.tar.gz
Update configuration issues for additional app types
-rw-r--r--SmartDeviceLink/SDLConfiguration.m4
-rw-r--r--SmartDeviceLink/SDLLifecycleConfiguration.h2
-rw-r--r--SmartDeviceLink/SDLLifecycleConfiguration.m2
3 files changed, 4 insertions, 4 deletions
diff --git a/SmartDeviceLink/SDLConfiguration.m b/SmartDeviceLink/SDLConfiguration.m
index cbf700ba9..98fddadc1 100644
--- a/SmartDeviceLink/SDLConfiguration.m
+++ b/SmartDeviceLink/SDLConfiguration.m
@@ -63,11 +63,11 @@ NS_ASSUME_NONNULL_BEGIN
if (_streamingMediaConfig != nil) {
// 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");
+ NSAssert(([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection] || [_lifecycleConfig.additionalAppTypes containsObject:SDLAppHMITypeNavigation] || [_lifecycleConfig.additionalAppTypes containsObject:SDLAppHMITypeProjection]), @"You should only set a streaming media configuration if your app is a NAVIGATION or PROJECTION HMI type");
_streamingMediaConfig = streamingMediaConfig;
} else {
// 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");
+ NSAssert(!([_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeNavigation] || [_lifecycleConfig.appType isEqualToEnum:SDLAppHMITypeProjection] || [_lifecycleConfig.additionalAppTypes containsObject:SDLAppHMITypeNavigation] || [_lifecycleConfig.additionalAppTypes containsObject:SDLAppHMITypeProjection]), @"If your app is a NAVIGATION or PROJECTION HMI type, you must set a streaming media configuration on SDLConfiguration");
}
return self;
diff --git a/SmartDeviceLink/SDLLifecycleConfiguration.h b/SmartDeviceLink/SDLLifecycleConfiguration.h
index 9dc208a38..8c79039e0 100644
--- a/SmartDeviceLink/SDLLifecycleConfiguration.h
+++ b/SmartDeviceLink/SDLLifecycleConfiguration.h
@@ -87,7 +87,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, null_resettable) SDLAppHMIType appType;
/**
- Additional applicatiion types beyond `appType`
+ Additional application types beyond `appType`
*/
@property (copy, nonatomic, nullable) NSArray<SDLAppHMIType> *additionalAppTypes;
diff --git a/SmartDeviceLink/SDLLifecycleConfiguration.m b/SmartDeviceLink/SDLLifecycleConfiguration.m
index d2dfa190f..d14f0b01b 100644
--- a/SmartDeviceLink/SDLLifecycleConfiguration.m
+++ b/SmartDeviceLink/SDLLifecycleConfiguration.m
@@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark Computed Properties
- (BOOL)isMedia {
- if ([self.appType isEqualToEnum:SDLAppHMITypeMedia]) {
+ if ([self.appType isEqualToEnum:SDLAppHMITypeMedia] || [self.additionalAppTypes containsObject:SDLAppHMITypeMedia]) {
return YES;
}