diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec index 7369776b1..2e44ee9ec 100644 --- a/SmartDeviceLink-iOS.podspec +++ b/SmartDeviceLink-iOS.podspec @@ -12,7 +12,6 @@ s.source_files = "SmartDeviceLink/*.{h,m}" s.requires_arc = true s.resource_bundles = { 'SmartDeviceLink' => ['SmartDeviceLink/Assets/**/*', 'SmartDeviceLink/iOS 7 Assets/*'] } s.public_header_files = [ -'SmartDeviceLink/NSMutableDictionary+Store.h', 'SmartDeviceLink/SmartDeviceLink.h', 'SmartDeviceLink/SDLJingle.h', 'SmartDeviceLink/SDLProxy.h', diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 3bb5759c9..4fa757f46 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -867,7 +867,7 @@ 5DFFB9151BD7C89700DB3F04 /* SDLConnectionManagerType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DFFB9141BD7C89700DB3F04 /* SDLConnectionManagerType.h */; }; DA0C46AD1DCD35080001F2A8 /* SDLNames.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0C46AC1DCD35080001F2A8 /* SDLNames.m */; }; DA0C46AF1DCD41E30001F2A8 /* SDLMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DA318C1F1DD0F06C00C035AC /* NSMutableDictionary+Store.h in Headers */ = {isa = PBXBuildFile; fileRef = DA318C1D1DD0F06C00C035AC /* NSMutableDictionary+Store.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA318C1F1DD0F06C00C035AC /* NSMutableDictionary+Store.h in Headers */ = {isa = PBXBuildFile; fileRef = DA318C1D1DD0F06C00C035AC /* NSMutableDictionary+Store.h */; }; DA318C201DD0F06C00C035AC /* NSMutableDictionary+Store.m in Sources */ = {isa = PBXBuildFile; fileRef = DA318C1E1DD0F06C00C035AC /* NSMutableDictionary+Store.m */; }; DA4353DF1D271FD10099B8C4 /* CGPointUtilSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4353DE1D271FD10099B8C4 /* CGPointUtilSpec.m */; }; DA4353E31D2720A30099B8C4 /* SDLPinchGestureSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DA4353E21D2720A30099B8C4 /* SDLPinchGestureSpec.m */; }; diff --git a/SmartDeviceLink/NSMutableDictionary+Store.h b/SmartDeviceLink/NSMutableDictionary+Store.h index dca054d94..7bc77366a 100644 --- a/SmartDeviceLink/NSMutableDictionary+Store.h +++ b/SmartDeviceLink/NSMutableDictionary+Store.h @@ -19,8 +19,7 @@ typedef NSString* SDLEnum SDL_SWIFT_ENUM; - (void)sdl_setObject:(NSObject *)object forName:(SDLName)name; - (nullable id)sdl_objectForName:(SDLName)name; - (nullable id)sdl_objectForName:(SDLName)name ofClass:(Class)classType; -- (NSMutableArray *)sdl_objectsForName:(SDLName)name ofClass:(Class)classType; -- (NSMutableArray *)sdl_enumsForName:(SDLName)name; +- (NSArray *)sdl_objectsForName:(SDLName)name ofClass:(Class)classType; @end diff --git a/SmartDeviceLink/NSMutableDictionary+Store.m b/SmartDeviceLink/NSMutableDictionary+Store.m index 0fd7eec5c..92007cf25 100644 --- a/SmartDeviceLink/NSMutableDictionary+Store.m +++ b/SmartDeviceLink/NSMutableDictionary+Store.m @@ -33,29 +33,18 @@ - (nullable id)sdl_objectForName:(SDLName)name ofClass:(Class)classType { } } -- (NSMutableArray *)sdl_objectsForName:(SDLName)name ofClass:(Class)classType { - NSMutableArray *array = [self sdl_objectForName:name]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:classType.class]) { +- (NSArray *)sdl_objectsForName:(SDLName)name ofClass:(Class)classType { + NSArray *array = [self sdl_objectForName:name]; + if ([array count] < 1 || [array.firstObject isMemberOfClass:classType.class]) { + // It's an array of the actual class type, just return return array; } else { + // It's an array of dictionaries, make them into their class type NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]]; for (NSDictionary *dict in array) { [newList addObject:[[classType alloc] initWithDictionary:dict]]; } - return newList; - } -} - -- (NSMutableArray *)sdl_enumsForName:(SDLName)name { - NSMutableArray *array = [self sdl_objectForName:name]; - if ([array count] < 1) { - return array; - } else { - NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]]; - for (SDLEnum enumString in array) { - [newList addObject:enumString]; - } - return newList; + return [newList copy]; } } diff --git a/SmartDeviceLink/SDLAddCommand.h b/SmartDeviceLink/SDLAddCommand.h index 59ef5cb02..fb7ea7498 100644 --- a/SmartDeviceLink/SDLAddCommand.h +++ b/SmartDeviceLink/SDLAddCommand.h @@ -91,7 +91,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of Strings, Max String length 99 chars, Array size 1 - 100 */ -@property (nullable, strong, nonatomic) NSMutableArray *vrCommands; +@property (nullable, strong, nonatomic) NSArray *vrCommands; /** * @abstract Image struct containing a static or dynamic icon diff --git a/SmartDeviceLink/SDLAddCommand.m b/SmartDeviceLink/SDLAddCommand.m index ddf4ee4ce..4a5cb6659 100644 --- a/SmartDeviceLink/SDLAddCommand.m +++ b/SmartDeviceLink/SDLAddCommand.m @@ -84,11 +84,11 @@ - (nullable SDLMenuParams *)menuParams { return [parameters sdl_objectForName:SDLNameMenuParams ofClass:SDLMenuParams.class]; } -- (void)setVrCommands:(nullable NSMutableArray *)vrCommands { +- (void)setVrCommands:(nullable NSArray *)vrCommands { [parameters sdl_setObject:vrCommands forName:SDLNameVRCommands]; } -- (nullable NSMutableArray *)vrCommands { +- (nullable NSArray *)vrCommands { return [parameters sdl_objectForName:SDLNameVRCommands]; } diff --git a/SmartDeviceLink/SDLAlert.h b/SmartDeviceLink/SDLAlert.h index 22b4e9d50..d8f893b7e 100644 --- a/SmartDeviceLink/SDLAlert.h +++ b/SmartDeviceLink/SDLAlert.h @@ -111,7 +111,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see SDLTTSChunk */ -@property (nullable, strong, nonatomic) NSMutableArray *ttsChunks; +@property (nullable, strong, nonatomic) NSArray *ttsChunks; /** * @abstract The duration of the displayed portion of the alert, in milliseconds. @@ -153,7 +153,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see SDLSoftButton */ -@property (nullable, strong, nonatomic) NSMutableArray *softButtons; +@property (nullable, strong, nonatomic) NSArray *softButtons; @end diff --git a/SmartDeviceLink/SDLAlert.m b/SmartDeviceLink/SDLAlert.m index 2b5640505..0f7c78a10 100644 --- a/SmartDeviceLink/SDLAlert.m +++ b/SmartDeviceLink/SDLAlert.m @@ -44,7 +44,7 @@ - (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NS } - (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration { - NSMutableArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText]; + NSArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText]; return [self initWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:duration softButtons:nil]; } @@ -97,11 +97,11 @@ - (nullable NSString *)alertText3 { return [parameters sdl_objectForName:SDLNameAlertText3]; } -- (void)setTtsChunks:(nullable NSMutableArray *)ttsChunks { +- (void)setTtsChunks:(nullable NSArray *)ttsChunks { [parameters sdl_setObject:ttsChunks forName:SDLNameTTSChunks]; } -- (nullable NSMutableArray *)ttsChunks { +- (nullable NSArray *)ttsChunks { return [parameters sdl_objectsForName:SDLNameTTSChunks ofClass:SDLTTSChunk.class]; } @@ -129,11 +129,11 @@ - (void)setProgressIndicator:(nullable NSNumber *)progressIndicator { return [parameters sdl_objectForName:SDLNameProgressIndicator]; } -- (void)setSoftButtons:(nullable NSMutableArray *)softButtons { +- (void)setSoftButtons:(nullable NSArray *)softButtons { [parameters sdl_setObject:softButtons forName:SDLNameSoftButtons]; } -- (nullable NSMutableArray *)softButtons { +- (nullable NSArray *)softButtons { return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class]; } diff --git a/SmartDeviceLink/SDLAlertManeuver.h b/SmartDeviceLink/SDLAlertManeuver.h index 66baa8585..b7181c04f 100644 --- a/SmartDeviceLink/SDLAlertManeuver.h +++ b/SmartDeviceLink/SDLAlertManeuver.h @@ -19,8 +19,8 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithTTS:(nullable NSString *)ttsText softButtons:(nullable NSArray *)softButtons; - (instancetype)initWithTTSChunks:(nullable NSArray *)ttsChunks softButtons:(nullable NSArray *)softButtons; -@property (nullable, strong, nonatomic) NSMutableArray *ttsChunks; -@property (nullable, strong, nonatomic) NSMutableArray *softButtons; +@property (nullable, strong, nonatomic) NSArray *ttsChunks; +@property (nullable, strong, nonatomic) NSArray *softButtons; @end diff --git a/SmartDeviceLink/SDLAlertManeuver.m b/SmartDeviceLink/SDLAlertManeuver.m index 433669cab..f56a53572 100644 --- a/SmartDeviceLink/SDLAlertManeuver.m +++ b/SmartDeviceLink/SDLAlertManeuver.m @@ -21,7 +21,7 @@ - (instancetype)init { - (instancetype)initWithTTS:(nullable NSString *)ttsText softButtons:(nullable NSArray *)softButtons { - NSMutableArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText]; + NSArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText]; return [self initWithTTSChunks:ttsChunks softButtons:softButtons]; } @@ -37,19 +37,19 @@ - (instancetype)initWithTTSChunks:(nullable NSArray *)ttsChunks s return self; } -- (void)setTtsChunks:(nullable NSMutableArray *)ttsChunks { +- (void)setTtsChunks:(nullable NSArray *)ttsChunks { [parameters sdl_setObject:ttsChunks forName:SDLNameTTSChunks]; } -- (nullable NSMutableArray *)ttsChunks { +- (nullable NSArray *)ttsChunks { return [parameters sdl_objectsForName:SDLNameTTSChunks ofClass:SDLTTSChunk.class]; } -- (void)setSoftButtons:(nullable NSMutableArray *)softButtons { +- (void)setSoftButtons:(nullable NSArray *)softButtons { [parameters sdl_setObject:softButtons forName:SDLNameSoftButtons]; } -- (nullable NSMutableArray *)softButtons { +- (nullable NSArray *)softButtons { return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class]; } diff --git a/SmartDeviceLink/SDLChoice.h b/SmartDeviceLink/SDLChoice.h index 1e88f097b..d5f521882 100644 --- a/SmartDeviceLink/SDLChoice.h +++ b/SmartDeviceLink/SDLChoice.h @@ -36,7 +36,7 @@ * * * vrCommands - * NSMutableArray * + * NSArray * * An array of strings to be used as VR synonyms for this choice. If this array is provided, it must have at least one non-empty element * SmartDeviceLink 1.0 * @@ -77,7 +77,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of Strings, Array length 1 - 100, Max String length 99 chars */ -@property (strong, nonatomic) NSMutableArray *vrCommands; +@property (strong, nonatomic) NSArray *vrCommands; /** * @abstract The image of the choice diff --git a/SmartDeviceLink/SDLChoice.m b/SmartDeviceLink/SDLChoice.m index b5fd077f5..919ef6102 100644 --- a/SmartDeviceLink/SDLChoice.m +++ b/SmartDeviceLink/SDLChoice.m @@ -54,11 +54,11 @@ - (NSString *)menuName { return [store sdl_objectForName:SDLNameMenuName]; } -- (void)setVrCommands:(NSMutableArray *)vrCommands { +- (void)setVrCommands:(NSArray *)vrCommands { [store sdl_setObject:vrCommands forName:SDLNameVRCommands]; } -- (NSMutableArray *)vrCommands { +- (NSArray *)vrCommands { return [store sdl_objectForName:SDLNameVRCommands]; } diff --git a/SmartDeviceLink/SDLCreateInteractionChoiceSet.h b/SmartDeviceLink/SDLCreateInteractionChoiceSet.h index 2679f0266..80ae3e9a9 100644 --- a/SmartDeviceLink/SDLCreateInteractionChoiceSet.h +++ b/SmartDeviceLink/SDLCreateInteractionChoiceSet.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, SDLChoice, Array size 1 - 100 */ -@property (strong, nonatomic) NSMutableArray *choiceSet; +@property (strong, nonatomic) NSArray *choiceSet; @end diff --git a/SmartDeviceLink/SDLCreateInteractionChoiceSet.m b/SmartDeviceLink/SDLCreateInteractionChoiceSet.m index f9e5ca73e..570054eec 100644 --- a/SmartDeviceLink/SDLCreateInteractionChoiceSet.m +++ b/SmartDeviceLink/SDLCreateInteractionChoiceSet.m @@ -37,11 +37,11 @@ - (void)setInteractionChoiceSetID:(NSNumber *)interactionChoiceSetID { return [parameters sdl_objectForName:SDLNameInteractionChoiceSetId]; } -- (void)setChoiceSet:(NSMutableArray *)choiceSet { +- (void)setChoiceSet:(NSArray *)choiceSet { [parameters sdl_setObject:choiceSet forName:SDLNameChoiceSet]; } -- (NSMutableArray *)choiceSet { +- (NSArray *)choiceSet { return [parameters sdl_objectsForName:SDLNameChoiceSet ofClass:SDLChoice.class]; } diff --git a/SmartDeviceLink/SDLDiagnosticMessage.h b/SmartDeviceLink/SDLDiagnosticMessage.h index e5bff4a58..d056c5488 100644 --- a/SmartDeviceLink/SDLDiagnosticMessage.h +++ b/SmartDeviceLink/SDLDiagnosticMessage.h @@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of NSNumber (Integers), Array size 1 - 65535, Integer Size 0 - 255 */ -@property (strong, nonatomic) NSMutableArray *> *messageData; +@property (strong, nonatomic) NSArray *> *messageData; @end diff --git a/SmartDeviceLink/SDLDiagnosticMessage.m b/SmartDeviceLink/SDLDiagnosticMessage.m index 4b874a6e2..dff509a4d 100644 --- a/SmartDeviceLink/SDLDiagnosticMessage.m +++ b/SmartDeviceLink/SDLDiagnosticMessage.m @@ -46,11 +46,11 @@ - (void)setMessageLength:(NSNumber *)messageLength { return [parameters sdl_objectForName:SDLNameMessageLength]; } -- (void)setMessageData:(NSMutableArray *> *)messageData { +- (void)setMessageData:(NSArray *> *)messageData { [parameters sdl_setObject:messageData forName:SDLNameMessageData]; } -- (NSMutableArray *> *)messageData { +- (NSArray *> *)messageData { return [parameters sdl_objectForName:SDLNameMessageData]; } diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h index 5c4c8745f..60124540e 100644 --- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h +++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLDiagnosticMessageResponse : SDLRPCResponse -@property (strong, nonatomic) NSMutableArray *> *messageDataResult; +@property (strong, nonatomic) NSArray *> *messageDataResult; @end diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink/SDLDiagnosticMessageResponse.m index 9353a755f..3c8a31444 100644 --- a/SmartDeviceLink/SDLDiagnosticMessageResponse.m +++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.m @@ -16,11 +16,11 @@ - (instancetype)init { return self; } -- (void)setMessageDataResult:(NSMutableArray *> *)messageDataResult { +- (void)setMessageDataResult:(NSArray *> *)messageDataResult { [parameters sdl_setObject:messageDataResult forName:SDLNameMessageDataResult]; } -- (NSMutableArray *> *)messageDataResult { +- (NSArray *> *)messageDataResult { return [parameters objectForKey:SDLNameMessageDataResult]; } diff --git a/SmartDeviceLink/SDLDisplayCapabilities.h b/SmartDeviceLink/SDLDisplayCapabilities.h index 437f686fc..3ef70cb1b 100644 --- a/SmartDeviceLink/SDLDisplayCapabilities.h +++ b/SmartDeviceLink/SDLDisplayCapabilities.h @@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of SDLTextField, 1 - 100 objects */ -@property (strong, nonatomic) NSMutableArray *textFields; +@property (strong, nonatomic) NSArray *textFields; /** * @abstract An array of SDLImageField elements @@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of SDLImageField, 1 - 100 objects */ -@property (nullable, strong, nonatomic) NSMutableArray *imageFields; +@property (nullable, strong, nonatomic) NSArray *imageFields; /** * @abstract An array of SDLMediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of SDLMediaClockFormats, 0 - 100 objects */ -@property (strong, nonatomic) NSMutableArray *mediaClockFormats; +@property (strong, nonatomic) NSArray *mediaClockFormats; /** * @abstract The display's persistent screen supports. @@ -74,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of String, max string size 100, 0 - 100 objects */ -@property (nullable, strong, nonatomic) NSMutableArray *templatesAvailable; +@property (nullable, strong, nonatomic) NSArray *templatesAvailable; /** * @abstract A set of all parameters related to a prescribed screen area (e.g. for video / touch input) diff --git a/SmartDeviceLink/SDLDisplayCapabilities.m b/SmartDeviceLink/SDLDisplayCapabilities.m index dc3e45c5f..06a8912e7 100644 --- a/SmartDeviceLink/SDLDisplayCapabilities.m +++ b/SmartDeviceLink/SDLDisplayCapabilities.m @@ -21,28 +21,28 @@ - (SDLDisplayType)displayType { return [store sdl_objectForName:SDLNameDisplayType]; } -- (void)setTextFields:(NSMutableArray *)textFields { +- (void)setTextFields:(NSArray *)textFields { [store sdl_setObject:textFields forName:SDLNameTextFields]; } -- (NSMutableArray *)textFields { +- (NSArray *)textFields { return [store sdl_objectsForName:SDLNameTextFields ofClass:SDLTextField.class]; } -- (void)setImageFields:(nullable NSMutableArray *)imageFields { +- (void)setImageFields:(nullable NSArray *)imageFields { [store sdl_setObject:imageFields forName:SDLNameImageFields]; } -- (nullable NSMutableArray *)imageFields { +- (nullable NSArray *)imageFields { return [store sdl_objectsForName:SDLNameImageFields ofClass:SDLImageField.class]; } -- (void)setMediaClockFormats:(NSMutableArray *)mediaClockFormats { +- (void)setMediaClockFormats:(NSArray *)mediaClockFormats { [store sdl_setObject:mediaClockFormats forName:SDLNameMediaClockFormats]; } -- (NSMutableArray *)mediaClockFormats { - return [store sdl_enumsForName:SDLNameMediaClockFormats]; +- (NSArray *)mediaClockFormats { + return [store sdl_objectForName:SDLNameMediaClockFormats]; } - (void)setGraphicSupported:(NSNumber *)graphicSupported { @@ -53,11 +53,11 @@ - (void)setGraphicSupported:(NSNumber *)graphicSupported { return [store sdl_objectForName:SDLNameGraphicSupported]; } -- (void)setTemplatesAvailable:(nullable NSMutableArray *)templatesAvailable { +- (void)setTemplatesAvailable:(nullable NSArray *)templatesAvailable { [store sdl_setObject:templatesAvailable forName:SDLNameTemplatesAvailable]; } -- (nullable NSMutableArray *)templatesAvailable { +- (nullable NSArray *)templatesAvailable { return [store sdl_objectForName:SDLNameTemplatesAvailable]; } diff --git a/SmartDeviceLink/SDLEncodedSyncPData.h b/SmartDeviceLink/SDLEncodedSyncPData.h index 5d32ced74..2d2c8fe3d 100644 --- a/SmartDeviceLink/SDLEncodedSyncPData.h +++ b/SmartDeviceLink/SDLEncodedSyncPData.h @@ -8,7 +8,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLEncodedSyncPData : SDLRPCRequest -@property (strong, nonatomic) NSMutableArray *data; +@property (strong, nonatomic) NSArray *data; @end diff --git a/SmartDeviceLink/SDLEncodedSyncPData.m b/SmartDeviceLink/SDLEncodedSyncPData.m index 39873052f..3f9838509 100644 --- a/SmartDeviceLink/SDLEncodedSyncPData.m +++ b/SmartDeviceLink/SDLEncodedSyncPData.m @@ -17,11 +17,11 @@ - (instancetype)init { return self; } -- (void)setData:(NSMutableArray *)data { +- (void)setData:(NSArray *)data { [parameters sdl_setObject:data forName:SDLNameData]; } -- (NSMutableArray *)data { +- (NSArray *)data { return [parameters sdl_objectForName:SDLNameData]; } diff --git a/SmartDeviceLink/SDLGetDTCsResponse.h b/SmartDeviceLink/SDLGetDTCsResponse.h index 7368b42f2..dd87f377f 100644 --- a/SmartDeviceLink/SDLGetDTCsResponse.h +++ b/SmartDeviceLink/SDLGetDTCsResponse.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLGetDTCsResponse : SDLRPCResponse @property (strong, nonatomic) NSNumber *ecuHeader; -@property (strong, nonatomic) NSMutableArray *dtc; +@property (strong, nonatomic) NSArray *dtc; @end diff --git a/SmartDeviceLink/SDLGetDTCsResponse.m b/SmartDeviceLink/SDLGetDTCsResponse.m index f1ead9716..c2bf974b5 100644 --- a/SmartDeviceLink/SDLGetDTCsResponse.m +++ b/SmartDeviceLink/SDLGetDTCsResponse.m @@ -25,11 +25,11 @@ - (void)setEcuHeader:(NSNumber *)ecuHeader { return [parameters objectForKey:SDLNameECUHeader]; } -- (void)setDtc:(NSMutableArray *)dtc { +- (void)setDtc:(NSArray *)dtc { [parameters sdl_setObject:dtc forName:SDLNameDTC]; } -- (NSMutableArray *)dtc { +- (NSArray *)dtc { return [parameters objectForKey:SDLNameDTC]; } diff --git a/SmartDeviceLink/SDLHMIPermissions.h b/SmartDeviceLink/SDLHMIPermissions.h index a37f867e6..ca6f855a1 100644 --- a/SmartDeviceLink/SDLHMIPermissions.h +++ b/SmartDeviceLink/SDLHMIPermissions.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of SDLHMILevel, Array size 0 - 100 */ -@property (strong, nonatomic) NSMutableArray *allowed; +@property (strong, nonatomic) NSArray *allowed; /** * @abstract a set of all HMI levels that are prohibited for this given RPC @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of SDLHMILevel, Array size 0 - 100 */ -@property (strong, nonatomic) NSMutableArray *userDisallowed; +@property (strong, nonatomic) NSArray *userDisallowed; @end diff --git a/SmartDeviceLink/SDLHMIPermissions.m b/SmartDeviceLink/SDLHMIPermissions.m index 620c9ca6f..96d947aa5 100644 --- a/SmartDeviceLink/SDLHMIPermissions.m +++ b/SmartDeviceLink/SDLHMIPermissions.m @@ -11,20 +11,20 @@ @implementation SDLHMIPermissions -- (void)setAllowed:(NSMutableArray *)allowed { +- (void)setAllowed:(NSArray *)allowed { [store sdl_setObject:allowed forName:SDLNameAllowed]; } -- (NSMutableArray *)allowed { - return [store sdl_enumsForName:SDLNameAllowed]; +- (NSArray *)allowed { + return [store sdl_objectForName:SDLNameAllowed]; } -- (void)setUserDisallowed:(NSMutableArray *)userDisallowed { +- (void)setUserDisallowed:(NSArray *)userDisallowed { [store sdl_setObject:userDisallowed forName:SDLNameUserDisallowed]; } -- (NSMutableArray *)userDisallowed { - return [store sdl_enumsForName:SDLNameUserDisallowed]; +- (NSArray *)userDisallowed { + return [store sdl_objectForName:SDLNameUserDisallowed]; } @end diff --git a/SmartDeviceLink/SDLImageField.h b/SmartDeviceLink/SDLImageField.h index 429e77343..f9ec61950 100644 --- a/SmartDeviceLink/SDLImageField.h +++ b/SmartDeviceLink/SDLImageField.h @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLImageField : SDLRPCStruct @property (strong, nonatomic) SDLImageFieldName name; -@property (strong, nonatomic) NSMutableArray *imageTypeSupported; +@property (strong, nonatomic) NSArray *imageTypeSupported; @property (nullable, strong, nonatomic) SDLImageResolution *imageResolution; @end diff --git a/SmartDeviceLink/SDLImageField.m b/SmartDeviceLink/SDLImageField.m index dfa223b3c..d25b6e213 100644 --- a/SmartDeviceLink/SDLImageField.m +++ b/SmartDeviceLink/SDLImageField.m @@ -20,12 +20,12 @@ - (SDLImageFieldName)name { return [store sdl_objectForName:SDLNameName]; } -- (void)setImageTypeSupported:(NSMutableArray *)imageTypeSupported { +- (void)setImageTypeSupported:(NSArray *)imageTypeSupported { [store sdl_setObject:imageTypeSupported forName:SDLNameImageTypeSupported]; } -- (NSMutableArray *)imageTypeSupported { - return [store sdl_enumsForName:SDLNameImageTypeSupported]; +- (NSArray *)imageTypeSupported { + return [store sdl_objectForName:SDLNameImageTypeSupported]; } - (void)setImageResolution:(nullable SDLImageResolution *)imageResolution { diff --git a/SmartDeviceLink/SDLKeyboardProperties.h b/SmartDeviceLink/SDLKeyboardProperties.h index 576053bd9..30927710f 100644 --- a/SmartDeviceLink/SDLKeyboardProperties.h +++ b/SmartDeviceLink/SDLKeyboardProperties.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, strong, nonatomic) SDLLanguage language; @property (nullable, strong, nonatomic) SDLKeyboardLayout keyboardLayout; @property (nullable, strong, nonatomic) SDLKeypressMode keypressMode; -@property (nullable, strong, nonatomic) NSMutableArray *limitedCharacterList; +@property (nullable, strong, nonatomic) NSArray *limitedCharacterList; @property (nullable, strong, nonatomic) NSString *autoCompleteText; @end diff --git a/SmartDeviceLink/SDLKeyboardProperties.m b/SmartDeviceLink/SDLKeyboardProperties.m index 90899cf17..3c79612f8 100644 --- a/SmartDeviceLink/SDLKeyboardProperties.m +++ b/SmartDeviceLink/SDLKeyboardProperties.m @@ -49,11 +49,11 @@ - (nullable SDLKeypressMode)keypressMode { return [store sdl_objectForName:SDLNameKeypressMode]; } -- (void)setLimitedCharacterList:(nullable NSMutableArray *)limitedCharacterList { +- (void)setLimitedCharacterList:(nullable NSArray *)limitedCharacterList { [store sdl_setObject:limitedCharacterList forName:SDLNameLimitedCharacterList]; } -- (nullable NSMutableArray *)limitedCharacterList { +- (nullable NSArray *)limitedCharacterList { return [store sdl_objectForName:SDLNameLimitedCharacterList]; } diff --git a/SmartDeviceLink/SDLListFilesResponse.h b/SmartDeviceLink/SDLListFilesResponse.h index c07d617fe..4acb007ec 100644 --- a/SmartDeviceLink/SDLListFilesResponse.h +++ b/SmartDeviceLink/SDLListFilesResponse.h @@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLListFilesResponse : SDLRPCResponse -@property (nullable, strong, nonatomic) NSMutableArray *filenames; +@property (nullable, strong, nonatomic) NSArray *filenames; @property (strong, nonatomic) NSNumber *spaceAvailable; @end diff --git a/SmartDeviceLink/SDLListFilesResponse.m b/SmartDeviceLink/SDLListFilesResponse.m index e803a83b5..56e3f0ede 100644 --- a/SmartDeviceLink/SDLListFilesResponse.m +++ b/SmartDeviceLink/SDLListFilesResponse.m @@ -17,11 +17,11 @@ - (instancetype)init { return self; } -- (void)setFilenames:(nullable NSMutableArray *)filenames { +- (void)setFilenames:(nullable NSArray *)filenames { [parameters sdl_setObject:filenames forName:SDLNameFilenames]; } -- (nullable NSMutableArray *)filenames { +- (nullable NSArray *)filenames { return [parameters objectForKey:SDLNameFilenames]; } diff --git a/SmartDeviceLink/SDLOnEncodedSyncPData.h b/SmartDeviceLink/SDLOnEncodedSyncPData.h index 9bcbdae45..4694cf798 100644 --- a/SmartDeviceLink/SDLOnEncodedSyncPData.h +++ b/SmartDeviceLink/SDLOnEncodedSyncPData.h @@ -7,7 +7,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLOnEncodedSyncPData : SDLRPCNotification -@property (strong, nonatomic) NSMutableArray *data; +@property (strong, nonatomic) NSArray *data; @property (nullable, strong, nonatomic) NSString *URL; @property (nullable, strong, nonatomic) NSNumber *Timeout; diff --git a/SmartDeviceLink/SDLOnEncodedSyncPData.m b/SmartDeviceLink/SDLOnEncodedSyncPData.m index 3a8eefe78..d9796b4cb 100644 --- a/SmartDeviceLink/SDLOnEncodedSyncPData.m +++ b/SmartDeviceLink/SDLOnEncodedSyncPData.m @@ -16,11 +16,11 @@ - (instancetype)init { return self; } -- (void)setData:(NSMutableArray *)data { +- (void)setData:(NSArray *)data { [parameters sdl_setObject:data forName:SDLNameData]; } -- (NSMutableArray *)data { +- (NSArray *)data { return [parameters sdl_objectForName:SDLNameData]; } diff --git a/SmartDeviceLink/SDLOnPermissionsChange.h b/SmartDeviceLink/SDLOnPermissionsChange.h index daec5ec66..007a5e736 100644 --- a/SmartDeviceLink/SDLOnPermissionsChange.h +++ b/SmartDeviceLink/SDLOnPermissionsChange.h @@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see SDLPermissionItem */ -@property (strong, nonatomic) NSMutableArray *permissionItem; +@property (strong, nonatomic) NSArray *permissionItem; @end diff --git a/SmartDeviceLink/SDLOnPermissionsChange.m b/SmartDeviceLink/SDLOnPermissionsChange.m index d6350f2b2..da908698a 100644 --- a/SmartDeviceLink/SDLOnPermissionsChange.m +++ b/SmartDeviceLink/SDLOnPermissionsChange.m @@ -17,21 +17,12 @@ - (instancetype)init { return self; } -- (void)setPermissionItem:(NSMutableArray *)permissionItem { +- (void)setPermissionItem:(NSArray *)permissionItem { [parameters sdl_setObject:permissionItem forName:SDLNamePermissionItem]; } -- (NSMutableArray *)permissionItem { - NSMutableArray *array = [parameters sdl_objectForName:SDLNamePermissionItem]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLPermissionItem.class]) { - return array; - } else { - NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]]; - for (NSDictionary *dict in array) { - [newList addObject:[[SDLPermissionItem alloc] initWithDictionary:(NSDictionary *)dict]]; - } - return newList; - } +- (NSArray *)permissionItem { + return [parameters sdl_objectsForName:SDLNamePermissionItem ofClass:SDLPermissionItem.class]; } @end diff --git a/SmartDeviceLink/SDLOnTouchEvent.h b/SmartDeviceLink/SDLOnTouchEvent.h index 21b3e1c5b..f9fa91907 100644 --- a/SmartDeviceLink/SDLOnTouchEvent.h +++ b/SmartDeviceLink/SDLOnTouchEvent.h @@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLOnTouchEvent : SDLRPCNotification @property (strong, nonatomic) SDLTouchType type; -@property (strong, nonatomic) NSMutableArray *event; +@property (strong, nonatomic) NSArray *event; @end diff --git a/SmartDeviceLink/SDLOnTouchEvent.m b/SmartDeviceLink/SDLOnTouchEvent.m index e0fc56bb5..08cb844c1 100644 --- a/SmartDeviceLink/SDLOnTouchEvent.m +++ b/SmartDeviceLink/SDLOnTouchEvent.m @@ -26,21 +26,12 @@ - (SDLTouchType)type { return (SDLTouchType)obj; } -- (void)setEvent:(NSMutableArray *)event { +- (void)setEvent:(NSArray *)event { [parameters sdl_setObject:event forName:SDLNameEvent]; } -- (NSMutableArray *)event { - NSMutableArray *array = [parameters sdl_objectForName:SDLNameEvent]; - if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTouchEvent.class]) { - return array; - } else { - NSMutableArray *newList = [NSMutableArray arrayWithCapacity:[array count]]; - for (NSDictionary *dict in array) { - [newList addObject:[[SDLTouchEvent alloc] initWithDictionary:(NSDictionary *)dict]]; - } - return newList; - } +- (NSArray *)event { + return [parameters sdl_objectsForName:SDLNameEvent ofClass:SDLTouchEvent.class]; } @end diff --git a/SmartDeviceLink/SDLParameterPermissions.h b/SmartDeviceLink/SDLParameterPermissions.h index c2356665a..0a1bdcc00 100644 --- a/SmartDeviceLink/SDLParameterPermissions.h +++ b/SmartDeviceLink/SDLParameterPermissions.h @@ -19,13 +19,13 @@ NS_ASSUME_NONNULL_BEGIN * * Required, Array of String, max String length = 100, Array size 0 - 100 */ -@property (strong, nonatomic) NSMutableArray *allowed; +@property (strong, nonatomic) NSArray *allowed; /** * @abstract A set of all parameters that are prohibited for this given RPC. * * Required, Array of String, max String length = 100, Array size 0 - 100 */ -@property (strong, nonatomic) NSMutableArray *userDisallowed; +@property (strong, nonatomic) NSArray *userDisallowed; @end diff --git a/SmartDeviceLink/SDLParameterPermissions.m b/SmartDeviceLink/SDLParameterPermissions.m index 9f1db88e0..bcc2f7047 100644 --- a/SmartDeviceLink/SDLParameterPermissions.m +++ b/SmartDeviceLink/SDLParameterPermissions.m @@ -11,19 +11,19 @@ @implementation SDLParameterPermissions -- (void)setAllowed:(NSMutableArray *)allowed { +- (void)setAllowed:(NSArray *)allowed { [store sdl_setObject:allowed forName:SDLNameAllowed]; } -- (NSMutableArray *)allowed { +- (NSArray *)allowed { return [store sdl_objectForName:SDLNameAllowed]; } -- (void)setUserDisallowed:(NSMutableArray *)userDisallowed { +- (void)setUserDisallowed:(NSArray *)userDisallowed { [store sdl_setObject:userDisallowed forName:SDLNameUserDisallowed]; } -- (NSMutableArray *)userDisallowed { +- (NSArray *)userDisallowed { return [store sdl_objectForName:SDLNameUserDisallowed]; } diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.h b/SmartDeviceLink/SDLPerformAudioPassThru.h index a48a44cbb..bd8ca6a4c 100644 --- a/SmartDeviceLink/SDLPerformAudioPassThru.h +++ b/SmartDeviceLink/SDLPerformAudioPassThru.h @@ -47,7 +47,7 @@ NS_ASSUME_NONNULL_BEGIN *
  • Array Maxsize: 100
  • * */ -@property (nullable, strong, nonatomic) NSMutableArray *initialPrompt; +@property (nullable, strong, nonatomic) NSArray *initialPrompt; /** * @abstract a line of text displayed during audio capture * @discussion audioPassThruDisplayText1 diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.m b/SmartDeviceLink/SDLPerformAudioPassThru.m index d137400f3..06611af6b 100644 --- a/SmartDeviceLink/SDLPerformAudioPassThru.m +++ b/SmartDeviceLink/SDLPerformAudioPassThru.m @@ -46,11 +46,11 @@ - (instancetype)initWithSamplingRate:(SDLSamplingRate)samplingRate bitsPerSample return self; } -- (void)setInitialPrompt:(nullable NSMutableArray *)initialPrompt { +- (void)setInitialPrompt:(nullable NSArray *)initialPrompt { [parameters sdl_setObject:initialPrompt forName:SDLNameInitialPrompt]; } -- (nullable NSMutableArray *)initialPrompt { +- (nullable NSArray *)initialPrompt { return [parameters sdl_objectsForName:SDLNameInitialPrompt ofClass:SDLTTSChunk.class]; } diff --git a/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink/SDLPerformInteraction.h index 4c61a9fd4..c8d27e22a 100644 --- a/SmartDeviceLink/SDLPerformInteraction.h +++ b/SmartDeviceLink/SDLPerformInteraction.h @@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN * @abstract An array of one or more TTSChunks that, taken together, specify * what is to be spoken to the user at the start of an interaction */ -@property (nullable, strong, nonatomic) NSMutableArray *initialPrompt; +@property (nullable, strong, nonatomic) NSArray *initialPrompt; /** * @abstract The Indicates mode that indicate how user selects interaction * choice. User can choose either by voice (VR_ONLY), by visual selection @@ -68,17 +68,17 @@ NS_ASSUME_NONNULL_BEGIN * @abstract A Vector value representing an Array of one or more Choice * Set IDs */ -@property (strong, nonatomic) NSMutableArray *> *interactionChoiceSetIDList; +@property (strong, nonatomic) NSArray *> *interactionChoiceSetIDList; /** * @abstract A Vector which taken together, specify the help phrase to * be spoken when the user says "help" during the VR session */ -@property (nullable, strong, nonatomic) NSMutableArray *helpPrompt; +@property (nullable, strong, nonatomic) NSArray *helpPrompt; /** * @abstract An array of TTSChunks which, taken together, specify the phrase to * be spoken when the listen times out during the VR session */ -@property (nullable, strong, nonatomic) NSMutableArray *timeoutPrompt; +@property (nullable, strong, nonatomic) NSArray *timeoutPrompt; /** * @abstract An Integer value representing the amount of time, in milliseconds, * SDL will wait for the user to make a choice (VR or Menu) @@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN * display on-screen during Perform Interaction * @since SmartDeviceLink 2.0 */ -@property (nullable, strong, nonatomic) NSMutableArray *vrHelp; +@property (nullable, strong, nonatomic) NSArray *vrHelp; @property (nullable, strong, nonatomic) SDLLayoutMode interactionLayout; @end diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m index 708902eb1..b5208e914 100644 --- a/SmartDeviceLink/SDLPerformInteraction.m +++ b/SmartDeviceLink/SDLPerformInteraction.m @@ -51,9 +51,9 @@ - (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initial } - (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray *)vrHelp { - NSMutableArray *initialChunks = [SDLTTSChunk textChunksFromString:initialPrompt]; - NSMutableArray *helpChunks = [SDLTTSChunk textChunksFromString:helpPrompt]; - NSMutableArray *timeoutChunks = [SDLTTSChunk textChunksFromString:timeoutPrompt]; + NSArray *initialChunks = [SDLTTSChunk textChunksFromString:initialPrompt]; + NSArray *helpChunks = [SDLTTSChunk textChunksFromString:helpPrompt]; + NSArray *timeoutChunks = [SDLTTSChunk textChunksFromString:timeoutPrompt]; return [self initWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:helpChunks timeoutChunks:timeoutChunks interactionMode:interactionMode timeout:timeout vrHelp:vrHelp]; } @@ -98,11 +98,11 @@ - (NSString *)initialText { return [parameters sdl_objectForName:SDLNameInitialText]; } -- (void)setInitialPrompt:(nullable NSMutableArray *)initialPrompt { +- (void)setInitialPrompt:(nullable NSArray *)initialPrompt { [parameters sdl_setObject:initialPrompt forName:SDLNameInitialPrompt]; } -- (nullable NSMutableArray *)initialPrompt { +- (nullable NSArray *)initialPrompt { return [parameters sdl_objectsForName:SDLNameInitialPrompt ofClass:SDLTTSChunk.class]; } @@ -114,27 +114,27 @@ - (SDLInteractionMode)interactionMode { return [parameters sdl_objectForName:SDLNameInteractionMode]; } -- (void)setInteractionChoiceSetIDList:(NSMutableArray *> *)interactionChoiceSetIDList { +- (void)setInteractionChoiceSetIDList:(NSArray *> *)interactionChoiceSetIDList { [parameters sdl_setObject:interactionChoiceSetIDList forName:SDLNameInteractionChoiceSetIdList]; } -- (NSMutableArray *> *)interactionChoiceSetIDList { +- (NSArray *> *)interactionChoiceSetIDList { return [parameters sdl_objectForName:SDLNameInteractionChoiceSetIdList]; } -- (void)setHelpPrompt:(nullable NSMutableArray *)helpPrompt { +- (void)setHelpPrompt:(nullable NSArray *)helpPrompt { [parameters sdl_setObject:helpPrompt forName:SDLNameHelpPrompt]; } -- (nullable NSMutableArray *)helpPrompt { +- (nullable NSArray *)helpPrompt { return [parameters sdl_objectsForName:SDLNameHelpPrompt ofClass:SDLTTSChunk.class]; } -- (void)setTimeoutPrompt:(nullable NSMutableArray *)timeoutPrompt { +- (void)setTimeoutPrompt:(nullable NSArray *)timeoutPrompt { [parameters sdl_setObject:timeoutPrompt forName:SDLNameTimeoutPrompt]; } -- (nullable NSMutableArray *)timeoutPrompt { +- (nullable NSArray *)timeoutPrompt { return [parameters sdl_objectsForName:SDLNameTimeoutPrompt ofClass:SDLTTSChunk.class]; } @@ -146,11 +146,11 @@ - (void)setTimeout:(nullable NSNumber *)timeout { return [parameters sdl_objectForName:SDLNameTimeout]; } -- (void)setVrHelp:(nullable NSMutableArray *)vrHelp { +- (void)setVrHelp:(nullable NSArray *)vrHelp { [parameters sdl_setObject:vrHelp forName:SDLNameVRHelp]; } -- (nullable NSMutableArray *)vrHelp { +- (nullable NSArray *)vrHelp { return [parameters sdl_objectsForName:SDLNameVRHelp ofClass:SDLVRHelpItem.class]; } diff --git a/SmartDeviceLink/SDLReadDID.h b/SmartDeviceLink/SDLReadDID.h index d275f694e..153ea6a59 100644 --- a/SmartDeviceLink/SDLReadDID.h +++ b/SmartDeviceLink/SDLReadDID.h @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN *
  • ArrayMin:0; ArrayMax:1000
  • * */ -@property (strong, nonatomic) NSMutableArray *> *didLocation; +@property (strong, nonatomic) NSArray *> *didLocation; @end diff --git a/SmartDeviceLink/SDLReadDID.m b/SmartDeviceLink/SDLReadDID.m index 5c491825e..9e2a906fd 100644 --- a/SmartDeviceLink/SDLReadDID.m +++ b/SmartDeviceLink/SDLReadDID.m @@ -37,11 +37,11 @@ - (void)setEcuName:(NSNumber *)ecuName { return [parameters sdl_objectForName:SDLNameECUName]; } -- (void)setDidLocation:(NSMutableArray *> *)didLocation { +- (void)setDidLocation:(NSArray *> *)didLocation { [parameters sdl_setObject:didLocation forName:SDLNameDIDLocation]; } -- (NSMutableArray *> *)didLocation { +- (NSArray *> *)didLocation { return [parameters sdl_objectForName:SDLNameDIDLocation]; } diff --git a/SmartDeviceLink/SDLReadDIDResponse.h b/SmartDeviceLink/SDLReadDIDResponse.h index 7fcd0ed9c..850940944 100644 --- a/SmartDeviceLink/SDLReadDIDResponse.h +++ b/SmartDeviceLink/SDLReadDIDResponse.h @@ -16,7 +16,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLReadDIDResponse : SDLRPCResponse -@property (nullable, strong, nonatomic) NSMutableArray *didResult; +@property (nullable, strong, nonatomic) NSArray *didResult; @end diff --git a/SmartDeviceLink/SDLReadDIDResponse.m b/SmartDeviceLink/SDLReadDIDResponse.m index a0f71b20e..5b3901950 100644 --- a/SmartDeviceLink/SDLReadDIDResponse.m +++ b/SmartDeviceLink/SDLReadDIDResponse.m @@ -18,11 +18,11 @@ - (instancetype)init { return self; } -- (void)setDidResult:(nullable NSMutableArray *)didResult { +- (void)setDidResult:(nullable NSArray *)didResult { [parameters sdl_setObject:didResult forName:SDLNameDIDResult]; } -- (nullable NSMutableArray *)didResult { +- (nullable NSArray *)didResult { return [parameters sdl_objectsForName:SDLNameDIDResult ofClass:SDLDIDResult.class]; } diff --git a/SmartDeviceLink/SDLRegisterAppInterface.h b/SmartDeviceLink/SDLRegisterAppInterface.h index a8b6fdc37..6201dfbfe 100644 --- a/SmartDeviceLink/SDLRegisterAppInterface.h +++ b/SmartDeviceLink/SDLRegisterAppInterface.h @@ -130,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN * @since SDL 2.0 * @see SDLTTSChunk */ -@property (nullable, strong, nonatomic) NSMutableArray *ttsName; +@property (nullable, strong, nonatomic) NSArray *ttsName; /** * @abstract A String representing an abbreviated version of the mobile application's name (if necessary) that will be displayed on the media screen @@ -148,7 +148,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of Strings, Array length 1 - 100, Max String length 40 */ -@property (nullable, strong, nonatomic) NSMutableArray *vrSynonyms; +@property (nullable, strong, nonatomic) NSArray *vrSynonyms; /** * @abstract Indicates if the application is a media or a non-media application. @@ -187,7 +187,7 @@ NS_ASSUME_NONNULL_BEGIN * @since SDL 2.0 * @see SDLAppHMIType */ -@property (nullable, strong, nonatomic) NSMutableArray *appHMIType; +@property (nullable, strong, nonatomic) NSArray *appHMIType; /** * @abstract ID used to uniquely identify current state of all app data that can persist through connection cycles (e.g. ignition cycles). diff --git a/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink/SDLRegisterAppInterface.m index acf94b418..7cf17ba86 100644 --- a/SmartDeviceLink/SDLRegisterAppInterface.m +++ b/SmartDeviceLink/SDLRegisterAppInterface.m @@ -56,7 +56,7 @@ - (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId lang self.isMediaApplication = @(isMediaApp); if (appType != nil) { - self.appHMIType = [NSMutableArray arrayWithObject:appType]; + self.appHMIType = [NSArray arrayWithObject:appType]; } self.ngnMediaScreenAppName = shortAppName; @@ -94,11 +94,11 @@ - (NSString *)appName { return [parameters sdl_objectForName:SDLNameAppName]; } -- (void)setTtsName:(nullable NSMutableArray *)ttsName { +- (void)setTtsName:(nullable NSArray *)ttsName { [parameters sdl_setObject:ttsName forName:SDLNameTTSName]; } -- (nullable NSMutableArray *)ttsName { +- (nullable NSArray *)ttsName { return [parameters sdl_objectsForName:SDLNameTTSName ofClass:SDLTTSChunk.class]; } @@ -110,11 +110,11 @@ - (nullable NSString *)ngnMediaScreenAppName { return [parameters sdl_objectForName:SDLNameNGNMediaScreenAppName]; } -- (void)setVrSynonyms:(nullable NSMutableArray *)vrSynonyms { +- (void)setVrSynonyms:(nullable NSArray *)vrSynonyms { [parameters sdl_setObject:vrSynonyms forName:SDLNameVRSynonyms]; } -- (nullable NSMutableArray *)vrSynonyms { +- (nullable NSArray *)vrSynonyms { return [parameters sdl_objectForName:SDLNameVRSynonyms]; } @@ -142,12 +142,12 @@ - (SDLLanguage)hmiDisplayLanguageDesired { return [parameters sdl_objectForName:SDLNameHMIDisplayLanguageDesired]; } -- (void)setAppHMIType:(nullable NSMutableArray *)appHMIType { +- (void)setAppHMIType:(nullable NSArray *)appHMIType { [parameters sdl_setObject:appHMIType forName:SDLNameAppHMIType]; } -- (nullable NSMutableArray *)appHMIType { - return [parameters sdl_enumsForName:SDLNameAppHMIType]; +- (nullable NSArray *)appHMIType { + return [parameters sdl_objectForName:SDLNameAppHMIType]; } - (void)setHashID:(nullable NSString *)hashID { diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h index 32dc5e40c..1c19d75e4 100644 --- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h +++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h @@ -68,7 +68,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of length 1 - 100, of SDLButtonCapabilities */ -@property (nullable, strong, nonatomic) NSMutableArray *buttonCapabilities; +@property (nullable, strong, nonatomic) NSArray *buttonCapabilities; /** * If returned, the platform supports on-screen SoftButtons @@ -77,7 +77,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of length 1 - 100, of SDLSoftButtonCapabilities */ -@property (nullable, strong, nonatomic) NSMutableArray *softButtonCapabilities; +@property (nullable, strong, nonatomic) NSArray *softButtonCapabilities; /** * If returned, the platform supports custom on-screen Presets @@ -93,35 +93,35 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of length 1 - 100, of SDLHMIZoneCapabilities */ -@property (nullable, strong, nonatomic) NSMutableArray *hmiZoneCapabilities; +@property (nullable, strong, nonatomic) NSArray *hmiZoneCapabilities; /** * @see SDLSpeechCapabilities * * Optional, Array of length 1 - 100, of SDLSpeechCapabilities */ -@property (nullable, strong, nonatomic) NSMutableArray *speechCapabilities; +@property (nullable, strong, nonatomic) NSArray *speechCapabilities; /** * @see SDLPrerecordedSpeech * * Optional, Array of length 1 - 100, of SDLPrerecordedSpeech */ -@property (nullable, strong, nonatomic) NSMutableArray *prerecordedSpeech; +@property (nullable, strong, nonatomic) NSArray *prerecordedSpeech; /** * @see SDLVRCapabilities * * Optional, Array of length 1 - 100, of SDLVRCapabilities */ -@property (nullable, strong, nonatomic) NSMutableArray *vrCapabilities; +@property (nullable, strong, nonatomic) NSArray *vrCapabilities; /** * @see SDLAudioPassThruCapabilities * * Optional, Array of length 1 - 100, of SDLAudioPassThruCapabilities */ -@property (nullable, strong, nonatomic) NSMutableArray *audioPassThruCapabilities; +@property (nullable, strong, nonatomic) NSArray *audioPassThruCapabilities; /** * Specifies the vehicle's type @@ -137,7 +137,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of length 1 - 100, Integer 0 - 255 */ -@property (nullable, strong, nonatomic) NSMutableArray *> *supportedDiagModes; +@property (nullable, strong, nonatomic) NSArray *> *supportedDiagModes; /** * @see SDLHMICapabilities diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m index e26c64431..0ba2d53d6 100644 --- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m +++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m @@ -57,19 +57,19 @@ - (nullable SDLDisplayCapabilities *)displayCapabilities { return [parameters sdl_objectForName:SDLNameDisplayCapabilities ofClass:SDLDisplayCapabilities.class]; } -- (void)setButtonCapabilities:(nullable NSMutableArray *)buttonCapabilities { +- (void)setButtonCapabilities:(nullable NSArray *)buttonCapabilities { [parameters sdl_setObject:buttonCapabilities forName:SDLNameButtonCapabilities]; } -- (nullable NSMutableArray *)buttonCapabilities { +- (nullable NSArray *)buttonCapabilities { return [parameters sdl_objectsForName:SDLNameButtonCapabilities ofClass:SDLButtonCapabilities.class]; } -- (void)setSoftButtonCapabilities:(nullable NSMutableArray *)softButtonCapabilities { +- (void)setSoftButtonCapabilities:(nullable NSArray *)softButtonCapabilities { [parameters sdl_setObject:softButtonCapabilities forName:SDLNameSoftButtonCapabilities]; } -- (nullable NSMutableArray *)softButtonCapabilities { +- (nullable NSArray *)softButtonCapabilities { return [parameters sdl_objectsForName:SDLNameSoftButtonCapabilities ofClass:SDLSoftButtonCapabilities.class]; } @@ -81,43 +81,43 @@ - (nullable SDLPresetBankCapabilities *)presetBankCapabilities { return [parameters sdl_objectForName:SDLNamePresetBankCapabilities ofClass:SDLPresetBankCapabilities.class]; } -- (void)setHmiZoneCapabilities:(nullable NSMutableArray *)hmiZoneCapabilities { +- (void)setHmiZoneCapabilities:(nullable NSArray *)hmiZoneCapabilities { [parameters sdl_setObject:hmiZoneCapabilities forName:SDLNameHMIZoneCapabilities]; } -- (nullable NSMutableArray *)hmiZoneCapabilities { +- (nullable NSArray *)hmiZoneCapabilities { return [parameters sdl_objectForName:SDLNameHMIZoneCapabilities]; } -- (void)setSpeechCapabilities:(nullable NSMutableArray *)speechCapabilities { +- (void)setSpeechCapabilities:(nullable NSArray *)speechCapabilities { [parameters sdl_setObject:speechCapabilities forName:SDLNameSpeechCapabilities]; } -- (nullable NSMutableArray *)speechCapabilities { +- (nullable NSArray *)speechCapabilities { return [parameters sdl_objectForName:SDLNameSpeechCapabilities]; } -- (void)setPrerecordedSpeech:(nullable NSMutableArray *)prerecordedSpeech { +- (void)setPrerecordedSpeech:(nullable NSArray *)prerecordedSpeech { [parameters sdl_setObject:prerecordedSpeech forName:SDLNamePrerecordedSpeech]; } -- (nullable NSMutableArray *)prerecordedSpeech { +- (nullable NSArray *)prerecordedSpeech { return [parameters sdl_objectForName:SDLNamePrerecordedSpeech]; } -- (void)setVrCapabilities:(nullable NSMutableArray *)vrCapabilities { +- (void)setVrCapabilities:(nullable NSArray *)vrCapabilities { [parameters sdl_setObject:vrCapabilities forName:SDLNameVRCapabilities]; } -- (nullable NSMutableArray *)vrCapabilities { +- (nullable NSArray *)vrCapabilities { return [parameters sdl_objectForName:SDLNameVRCapabilities]; } -- (void)setAudioPassThruCapabilities:(nullable NSMutableArray *)audioPassThruCapabilities { +- (void)setAudioPassThruCapabilities:(nullable NSArray *)audioPassThruCapabilities { [parameters sdl_setObject:audioPassThruCapabilities forName:SDLNameAudioPassThruCapabilities]; } -- (nullable NSMutableArray *)audioPassThruCapabilities { +- (nullable NSArray *)audioPassThruCapabilities { return [parameters sdl_objectsForName:SDLNameAudioPassThruCapabilities ofClass:SDLAudioPassThruCapabilities.class]; } @@ -129,11 +129,11 @@ - (nullable SDLVehicleType *)vehicleType { return [parameters sdl_objectForName:SDLNameVehicleType ofClass:SDLVehicleType.class]; } -- (void)setSupportedDiagModes:(nullable NSMutableArray *> *)supportedDiagModes { +- (void)setSupportedDiagModes:(nullable NSArray *> *)supportedDiagModes { [parameters sdl_setObject:supportedDiagModes forName:SDLNameSupportedDiagnosticModes]; } -- (nullable NSMutableArray *> *)supportedDiagModes { +- (nullable NSArray *> *)supportedDiagModes { return [parameters sdl_objectForName:SDLNameSupportedDiagnosticModes]; } diff --git a/SmartDeviceLink/SDLResetGlobalProperties.h b/SmartDeviceLink/SDLResetGlobalProperties.h index 7c842e5c1..1b77b8edc 100644 --- a/SmartDeviceLink/SDLResetGlobalProperties.h +++ b/SmartDeviceLink/SDLResetGlobalProperties.h @@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN * @abstract An array of one or more GlobalProperty enumeration elements * indicating which global properties to reset to their default value */ -@property (strong, nonatomic) NSMutableArray *properties; +@property (strong, nonatomic) NSArray *properties; @end diff --git a/SmartDeviceLink/SDLResetGlobalProperties.m b/SmartDeviceLink/SDLResetGlobalProperties.m index 8c7b317b4..21242cbab 100644 --- a/SmartDeviceLink/SDLResetGlobalProperties.m +++ b/SmartDeviceLink/SDLResetGlobalProperties.m @@ -29,12 +29,12 @@ - (instancetype)initWithProperties:(NSArray *)properties { return self; } -- (void)setProperties:(NSMutableArray *)properties { +- (void)setProperties:(NSArray *)properties { [parameters sdl_setObject:properties forName:SDLNameProperties]; } -- (NSMutableArray *)properties { - return [parameters sdl_enumsForName:SDLNameProperties]; +- (NSArray *)properties { + return [parameters sdl_objectForName:SDLNameProperties]; } @end diff --git a/SmartDeviceLink/SDLResponseDispatcher.m b/SmartDeviceLink/SDLResponseDispatcher.m index a1fbd9303..f6e07ea1e 100644 --- a/SmartDeviceLink/SDLResponseDispatcher.m +++ b/SmartDeviceLink/SDLResponseDispatcher.m @@ -115,7 +115,7 @@ - (void)clear { [self.customButtonHandlerMap removeAllObjects]; } -- (void)sdl_addToCustomButtonHandlerMap:(NSMutableArray *)softButtons { +- (void)sdl_addToCustomButtonHandlerMap:(NSArray *)softButtons { for (SDLSoftButton *sb in softButtons) { if (!sb.softButtonID) { @throw [NSException sdl_missingIdException]; diff --git a/SmartDeviceLink/SDLScrollableMessage.h b/SmartDeviceLink/SDLScrollableMessage.h index 87ed0be98..a74aa5c27 100644 --- a/SmartDeviceLink/SDLScrollableMessage.h +++ b/SmartDeviceLink/SDLScrollableMessage.h @@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN *

    * Notes: Minsize=0, Maxsize=8 */ -@property (nullable, strong, nonatomic) NSMutableArray *softButtons; +@property (nullable, strong, nonatomic) NSArray *softButtons; @end diff --git a/SmartDeviceLink/SDLScrollableMessage.m b/SmartDeviceLink/SDLScrollableMessage.m index f156e5453..f9c92c796 100644 --- a/SmartDeviceLink/SDLScrollableMessage.m +++ b/SmartDeviceLink/SDLScrollableMessage.m @@ -57,11 +57,11 @@ - (void)setTimeout:(nullable NSNumber *)timeout { return [parameters sdl_objectForName:SDLNameTimeout]; } -- (void)setSoftButtons:(nullable NSMutableArray *)softButtons { +- (void)setSoftButtons:(nullable NSArray *)softButtons { [parameters sdl_setObject:softButtons forName:SDLNameSoftButtons]; } -- (nullable NSMutableArray *)softButtons { +- (nullable NSArray *)softButtons { return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class]; } diff --git a/SmartDeviceLink/SDLSetDisplayLayoutResponse.h b/SmartDeviceLink/SDLSetDisplayLayoutResponse.h index edacb17ed..e1e88138d 100644 --- a/SmartDeviceLink/SDLSetDisplayLayoutResponse.h +++ b/SmartDeviceLink/SDLSetDisplayLayoutResponse.h @@ -19,8 +19,8 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLSetDisplayLayoutResponse : SDLRPCResponse @property (nullable, strong, nonatomic) SDLDisplayCapabilities *displayCapabilities; -@property (nullable, strong, nonatomic) NSMutableArray *buttonCapabilities; -@property (nullable, strong, nonatomic) NSMutableArray *softButtonCapabilities; +@property (nullable, strong, nonatomic) NSArray *buttonCapabilities; +@property (nullable, strong, nonatomic) NSArray *softButtonCapabilities; @property (nullable, strong, nonatomic) SDLPresetBankCapabilities *presetBankCapabilities; @end diff --git a/SmartDeviceLink/SDLSetDisplayLayoutResponse.m b/SmartDeviceLink/SDLSetDisplayLayoutResponse.m index 2d1795413..c37086684 100644 --- a/SmartDeviceLink/SDLSetDisplayLayoutResponse.m +++ b/SmartDeviceLink/SDLSetDisplayLayoutResponse.m @@ -29,19 +29,19 @@ - (nullable SDLDisplayCapabilities *)displayCapabilities { return [parameters sdl_objectForName:SDLNameDisplayCapabilities ofClass:SDLDisplayCapabilities.class]; } -- (void)setButtonCapabilities:(nullable NSMutableArray *)buttonCapabilities { +- (void)setButtonCapabilities:(nullable NSArray *)buttonCapabilities { [parameters sdl_setObject:buttonCapabilities forName:SDLNameButtonCapabilities]; } -- (nullable NSMutableArray *)buttonCapabilities { +- (nullable NSArray *)buttonCapabilities { return [parameters sdl_objectsForName:SDLNameButtonCapabilities ofClass:SDLButtonCapabilities.class]; } -- (void)setSoftButtonCapabilities:(nullable NSMutableArray *)softButtonCapabilities { +- (void)setSoftButtonCapabilities:(nullable NSArray *)softButtonCapabilities { [parameters sdl_setObject:softButtonCapabilities forName:SDLNameSoftButtonCapabilities]; } -- (nullable NSMutableArray *)softButtonCapabilities { +- (nullable NSArray *)softButtonCapabilities { return [parameters sdl_objectsForName:SDLNameSoftButtonCapabilities ofClass:SDLSoftButtonCapabilities.class]; } diff --git a/SmartDeviceLink/SDLSetGlobalProperties.h b/SmartDeviceLink/SDLSetGlobalProperties.h index 95c803bae..f6ac19b36 100644 --- a/SmartDeviceLink/SDLSetGlobalProperties.h +++ b/SmartDeviceLink/SDLSetGlobalProperties.h @@ -42,14 +42,14 @@ NS_ASSUME_NONNULL_BEGIN *

  • Only optional it timeoutPrompt has been specified
  • * */ -@property (strong, nonatomic, nullable) NSMutableArray *helpPrompt; +@property (strong, nonatomic, nullable) NSArray *helpPrompt; /** * @abstract A Vector for Timeout Prompt representing Array of one or * more TTSChunk elements specifying the help prompt used in an interaction * started by PTT * */ -@property (strong, nonatomic, nullable) NSMutableArray *timeoutPrompt; +@property (strong, nonatomic, nullable) NSArray *timeoutPrompt; /** * @abstract Sets a voice recognition Help Title * @@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN * * @since SmartDeviceLink 2.0 */ -@property (strong, nonatomic, nullable) NSMutableArray *vrHelp; +@property (strong, nonatomic, nullable) NSArray *vrHelp; @property (strong, nonatomic, nullable) NSString *menuTitle; @property (strong, nonatomic, nullable) SDLImage *menuIcon; @property (strong, nonatomic, nullable) SDLKeyboardProperties *keyboardProperties; diff --git a/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink/SDLSetGlobalProperties.m index 8cc46bdc1..7052bbd6a 100644 --- a/SmartDeviceLink/SDLSetGlobalProperties.m +++ b/SmartDeviceLink/SDLSetGlobalProperties.m @@ -46,19 +46,19 @@ - (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(null return self; } -- (void)setHelpPrompt:(nullable NSMutableArray *)helpPrompt { +- (void)setHelpPrompt:(nullable NSArray *)helpPrompt { [parameters sdl_setObject:helpPrompt forName:SDLNameHelpPrompt]; } -- (nullable NSMutableArray *)helpPrompt { +- (nullable NSArray *)helpPrompt { return [parameters sdl_objectsForName:SDLNameHelpPrompt ofClass:SDLTTSChunk.class]; } -- (void)setTimeoutPrompt:(nullable NSMutableArray *)timeoutPrompt { +- (void)setTimeoutPrompt:(nullable NSArray *)timeoutPrompt { [parameters sdl_setObject:timeoutPrompt forName:SDLNameTimeoutPrompt]; } -- (nullable NSMutableArray *)timeoutPrompt { +- (nullable NSArray *)timeoutPrompt { return [parameters sdl_objectsForName:SDLNameTimeoutPrompt ofClass:SDLTTSChunk.class]; } @@ -70,11 +70,11 @@ - (nullable NSString *)vrHelpTitle { return [parameters sdl_objectForName:SDLNameVRHelpTitle]; } -- (void)setVrHelp:(nullable NSMutableArray *)vrHelp { +- (void)setVrHelp:(nullable NSArray *)vrHelp { [parameters sdl_setObject:vrHelp forName:SDLNameVRHelp]; } -- (nullable NSMutableArray *)vrHelp { +- (nullable NSArray *)vrHelp { return [parameters sdl_objectsForName:SDLNameVRHelp ofClass:SDLVRHelpItem.class]; } diff --git a/SmartDeviceLink/SDLShow.h b/SmartDeviceLink/SDLShow.h index fb6c16411..d18c52647 100644 --- a/SmartDeviceLink/SDLShow.h +++ b/SmartDeviceLink/SDLShow.h @@ -215,7 +215,7 @@ NS_ASSUME_NONNULL_BEGIN * * @since SmartDeviceLink 2.0 */ -@property (strong, nonatomic, nullable) NSMutableArray *softButtons; +@property (strong, nonatomic, nullable) NSArray *softButtons; /** * @abstract The Custom Presets defined by the App * @@ -229,7 +229,7 @@ NS_ASSUME_NONNULL_BEGIN * * @since SmartDeviceLink 2.0 */ -@property (strong, nonatomic, nullable) NSMutableArray *customPresets; +@property (strong, nonatomic, nullable) NSArray *customPresets; @end diff --git a/SmartDeviceLink/SDLShow.m b/SmartDeviceLink/SDLShow.m index 39977b640..a01c1f316 100644 --- a/SmartDeviceLink/SDLShow.m +++ b/SmartDeviceLink/SDLShow.m @@ -132,19 +132,19 @@ - (nullable SDLImage *)secondaryGraphic { return [parameters sdl_objectForName:SDLNameSecondaryGraphic ofClass:SDLImage.class]; } -- (void)setSoftButtons:(nullable NSMutableArray *)softButtons { +- (void)setSoftButtons:(nullable NSArray *)softButtons { [parameters sdl_setObject:softButtons forName:SDLNameSoftButtons]; } -- (nullable NSMutableArray *)softButtons { +- (nullable NSArray *)softButtons { return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class]; } -- (void)setCustomPresets:(nullable NSMutableArray *)customPresets { +- (void)setCustomPresets:(nullable NSArray *)customPresets { [parameters sdl_setObject:customPresets forName:SDLNameCustomPresets]; } -- (nullable NSMutableArray *)customPresets { +- (nullable NSArray *)customPresets { return [parameters sdl_objectForName:SDLNameCustomPresets]; } diff --git a/SmartDeviceLink/SDLShowConstantTBT.h b/SmartDeviceLink/SDLShowConstantTBT.h index 90604befa..8d25893bc 100644 --- a/SmartDeviceLink/SDLShowConstantTBT.h +++ b/SmartDeviceLink/SDLShowConstantTBT.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) NSNumber *distanceToManeuver; @property (strong, nonatomic, nullable) NSNumber *distanceToManeuverScale; @property (strong, nonatomic, nullable) NSNumber *maneuverComplete; -@property (strong, nonatomic, nullable) NSMutableArray *softButtons; +@property (strong, nonatomic, nullable) NSArray *softButtons; @end diff --git a/SmartDeviceLink/SDLShowConstantTBT.m b/SmartDeviceLink/SDLShowConstantTBT.m index f410b85af..f4565d923 100644 --- a/SmartDeviceLink/SDLShowConstantTBT.m +++ b/SmartDeviceLink/SDLShowConstantTBT.m @@ -120,11 +120,11 @@ - (void)setManeuverComplete:(nullable NSNumber *)maneuverComplete { return [parameters sdl_objectForName:SDLNameManeuverComplete]; } -- (void)setSoftButtons:(nullable NSMutableArray *)softButtons { +- (void)setSoftButtons:(nullable NSArray *)softButtons { [parameters sdl_setObject:softButtons forName:SDLNameSoftButtons]; } -- (nullable NSMutableArray *)softButtons { +- (nullable NSArray *)softButtons { return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class]; } diff --git a/SmartDeviceLink/SDLSlider.h b/SmartDeviceLink/SDLSlider.h index 31a312bd7..fa1dc7acc 100644 --- a/SmartDeviceLink/SDLSlider.h +++ b/SmartDeviceLink/SDLSlider.h @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN * * Optional, Array of Strings, Array length 1 - 26, Max string length 500 chars */ -@property (strong, nonatomic, nullable) NSMutableArray *sliderFooter; +@property (strong, nonatomic, nullable) NSArray *sliderFooter; /** * @abstract An App defined timeout diff --git a/SmartDeviceLink/SDLSlider.m b/SmartDeviceLink/SDLSlider.m index 702ca2531..cf2f9519c 100644 --- a/SmartDeviceLink/SDLSlider.m +++ b/SmartDeviceLink/SDLSlider.m @@ -77,11 +77,11 @@ - (NSString *)sliderHeader { return [parameters sdl_objectForName:SDLNameSliderHeader]; } -- (void)setSliderFooter:(nullable NSMutableArray *)sliderFooter { +- (void)setSliderFooter:(nullable NSArray *)sliderFooter { [parameters sdl_setObject:sliderFooter forName:SDLNameSliderFooter]; } -- (nullable NSMutableArray *)sliderFooter { +- (nullable NSArray *)sliderFooter { return [parameters sdl_objectForName:SDLNameSliderFooter]; } diff --git a/SmartDeviceLink/SDLSpeak.h b/SmartDeviceLink/SDLSpeak.h index 528c3f133..33046a8eb 100644 --- a/SmartDeviceLink/SDLSpeak.h +++ b/SmartDeviceLink/SDLSpeak.h @@ -56,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see SDLTTSChunk */ -@property (strong, nonatomic) NSMutableArray *ttsChunks; +@property (strong, nonatomic) NSArray *ttsChunks; @end diff --git a/SmartDeviceLink/SDLSpeak.m b/SmartDeviceLink/SDLSpeak.m index 774947831..35516ff43 100644 --- a/SmartDeviceLink/SDLSpeak.m +++ b/SmartDeviceLink/SDLSpeak.m @@ -19,7 +19,7 @@ - (instancetype)init { } - (instancetype)initWithTTS:(NSString *)ttsText { - NSMutableArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText]; + NSArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText]; return [self initWithTTSChunks:ttsChunks]; } @@ -34,11 +34,11 @@ - (instancetype)initWithTTSChunks:(NSArray *)ttsChunks { return self; } -- (void)setTtsChunks:(NSMutableArray *)ttsChunks { +- (void)setTtsChunks:(NSArray *)ttsChunks { [parameters sdl_setObject:ttsChunks forName:SDLNameTTSChunks]; } -- (NSMutableArray *)ttsChunks { +- (NSArray *)ttsChunks { return [parameters sdl_objectsForName:SDLNameTTSChunks ofClass:SDLTTSChunk.class]; } diff --git a/SmartDeviceLink/SDLTTSChunk.h b/SmartDeviceLink/SDLTTSChunk.h index ad7690ef0..6d97aceae 100644 --- a/SmartDeviceLink/SDLTTSChunk.h +++ b/SmartDeviceLink/SDLTTSChunk.h @@ -43,15 +43,15 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithText:(NSString *)text type:(SDLSpeechCapabilities)type; -+ (NSMutableArray *)textChunksFromString:(NSString *)string; ++ (NSArray *)textChunksFromString:(NSString *)string; -+ (NSMutableArray *)sapiChunksFromString:(NSString *)string; ++ (NSArray *)sapiChunksFromString:(NSString *)string; -+ (NSMutableArray *)lhPlusChunksFromString:(NSString *)string; ++ (NSArray *)lhPlusChunksFromString:(NSString *)string; -+ (NSMutableArray *)prerecordedChunksFromString:(NSString *)string; ++ (NSArray *)prerecordedChunksFromString:(NSString *)string; -+ (NSMutableArray *)silenceChunks; ++ (NSArray *)silenceChunks; /** diff --git a/SmartDeviceLink/SDLTTSChunk.m b/SmartDeviceLink/SDLTTSChunk.m index 6be3153fb..e553d6342 100644 --- a/SmartDeviceLink/SDLTTSChunk.m +++ b/SmartDeviceLink/SDLTTSChunk.m @@ -22,32 +22,32 @@ - (instancetype)initWithText:(NSString *)text type:(SDLSpeechCapabilities)type { return self; } -+ (NSMutableArray *)textChunksFromString:(NSString *)string { ++ (NSArray *)textChunksFromString:(NSString *)string { return [self sdl_chunksFromString:string type:SDLSpeechCapabilitiesText]; } -+ (NSMutableArray *)sapiChunksFromString:(NSString *)string { ++ (NSArray *)sapiChunksFromString:(NSString *)string { return [self sdl_chunksFromString:string type:SDLSpeechCapabilitiesSAPIPhonemes]; } -+ (NSMutableArray *)lhPlusChunksFromString:(NSString *)string { ++ (NSArray *)lhPlusChunksFromString:(NSString *)string { return [self sdl_chunksFromString:string type:SDLSpeechCapabilitiesLHPlusPhonemes]; } -+ (NSMutableArray *)prerecordedChunksFromString:(NSString *)string { ++ (NSArray *)prerecordedChunksFromString:(NSString *)string { return [self sdl_chunksFromString:string type:SDLSpeechCapabilitiesPrerecorded]; } -+ (NSMutableArray *)silenceChunks { ++ (NSArray *)silenceChunks { return [self sdl_chunksFromString:nil type:SDLSpeechCapabilitiesSilence]; } -+ (nullable NSMutableArray *)sdl_chunksFromString:(nullable NSString *)string type:(SDLSpeechCapabilities)type { ++ (nullable NSArray *)sdl_chunksFromString:(nullable NSString *)string type:(SDLSpeechCapabilities)type { if (string.length == 0) { return nil; } - return [NSMutableArray arrayWithObject:[[[self class] alloc] initWithText:string type:type]]; + return [NSArray arrayWithObject:[[[self class] alloc] initWithText:string type:type]]; } - (void)setText:(NSString *)text { diff --git a/SmartDeviceLink/SDLTouchEvent.h b/SmartDeviceLink/SDLTouchEvent.h index 353b0a625..56a6dc6d5 100644 --- a/SmartDeviceLink/SDLTouchEvent.h +++ b/SmartDeviceLink/SDLTouchEvent.h @@ -30,12 +30,12 @@ NS_ASSUME_NONNULL_BEGIN Mandatory, array size 1-1000, contains size 0-5000000000 */ -@property (strong, nonatomic) NSMutableArray *> *timeStamp; +@property (strong, nonatomic) NSArray *> *timeStamp; /** * Mandatory, array size 1-1000, contains SDLTouchCoord */ -@property (strong, nonatomic) NSMutableArray *coord; +@property (strong, nonatomic) NSArray *coord; @end diff --git a/SmartDeviceLink/SDLTouchEvent.m b/SmartDeviceLink/SDLTouchEvent.m index 69616940b..7ff82b3c7 100644 --- a/SmartDeviceLink/SDLTouchEvent.m +++ b/SmartDeviceLink/SDLTouchEvent.m @@ -20,19 +20,19 @@ - (void)setTouchEventId:(NSNumber *)touchEventId { return [store sdl_objectForName:SDLNameId]; } -- (void)setTimeStamp:(NSMutableArray *> *)timeStamp { +- (void)setTimeStamp:(NSArray *> *)timeStamp { [store sdl_setObject:timeStamp forName:SDLNameTimestamp]; } -- (NSMutableArray *> *)timeStamp { +- (NSArray *> *)timeStamp { return [store sdl_objectForName:SDLNameTimestamp]; } -- (void)setCoord:(NSMutableArray *)coord { +- (void)setCoord:(NSArray *)coord { [store sdl_setObject:coord forName:SDLNameCoordinate]; } -- (NSMutableArray *)coord { +- (NSArray *)coord { return [store sdl_objectsForName:SDLNameCoordinate ofClass:SDLTouchCoord.class]; } diff --git a/SmartDeviceLink/SDLUpdateTurnList.h b/SmartDeviceLink/SDLUpdateTurnList.h index 63a3473aa..96d54a55a 100644 --- a/SmartDeviceLink/SDLUpdateTurnList.h +++ b/SmartDeviceLink/SDLUpdateTurnList.h @@ -22,12 +22,12 @@ NS_ASSUME_NONNULL_BEGIN /** * Optional, SDLTurn, 1 - 100 entries */ -@property (strong, nonatomic, nullable) NSMutableArray *turnList; +@property (strong, nonatomic, nullable) NSArray *turnList; /** * Required, SDLSoftButton, 0 - 1 Entries */ -@property (strong, nonatomic, nullable) NSMutableArray *softButtons; +@property (strong, nonatomic, nullable) NSArray *softButtons; @end diff --git a/SmartDeviceLink/SDLUpdateTurnList.m b/SmartDeviceLink/SDLUpdateTurnList.m index 59b332505..b6361f666 100644 --- a/SmartDeviceLink/SDLUpdateTurnList.m +++ b/SmartDeviceLink/SDLUpdateTurnList.m @@ -31,19 +31,19 @@ - (instancetype)initWithTurnList:(nullable NSArray *)turnList softBut return self; } -- (void)setTurnList:(nullable NSMutableArray *)turnList { +- (void)setTurnList:(nullable NSArray *)turnList { [parameters sdl_setObject:turnList forName:SDLNameTurnList]; } -- (nullable NSMutableArray *)turnList { +- (nullable NSArray *)turnList { return [parameters sdl_objectsForName:SDLNameTurnList ofClass:SDLTurn.class]; } -- (void)setSoftButtons:(nullable NSMutableArray *)softButtons { +- (void)setSoftButtons:(nullable NSArray *)softButtons { [parameters sdl_setObject:softButtons forName:SDLNameSoftButtons]; } -- (nullable NSMutableArray *)softButtons { +- (nullable NSArray *)softButtons { return [parameters sdl_objectsForName:SDLNameSoftButtons ofClass:SDLSoftButton.class]; } diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h index 9a9f7f0f2..9ca9975b4 100644 --- a/SmartDeviceLink/SmartDeviceLink.h +++ b/SmartDeviceLink/SmartDeviceLink.h @@ -306,7 +306,6 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLPermissionManager.h" // Utilities -#import "NSMutableDictionary+Store.h" #import "NSNumber+NumberType.h" #import "SDLErrorConstants.h" #import "SDLNotificationConstants.h" diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m index fa955718b..b0ecb8bb9 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLFileManagerSpec.m @@ -94,7 +94,7 @@ @interface SDLFileManager () testListFilesResponse = [[SDLListFilesResponse alloc] init]; testListFilesResponse.success = @YES; testListFilesResponse.spaceAvailable = @(initialSpaceAvailable); - testListFilesResponse.filenames = [NSMutableArray arrayWithArray:[testInitialFileNames allObjects]]; + testListFilesResponse.filenames = [NSArray arrayWithArray:[testInitialFileNames allObjects]]; [testConnectionManager respondToLastRequestWithResponse:testListFilesResponse]; }); diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLListFilesOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLListFilesOperationSpec.m index 5047d54ce..bb45a0374 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLListFilesOperationSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLListFilesOperationSpec.m @@ -45,11 +45,11 @@ context(@"when a good response comes back", ^{ __block SDLListFilesResponse *goodResponse = nil; __block NSNumber *responseSpaceAvailable = nil; - __block NSMutableArray *responseFileNames = nil; + __block NSArray *responseFileNames = nil; beforeEach(^{ responseSpaceAvailable = @(11212512); - responseFileNames = [NSMutableArray arrayWithArray:@[@"test1", @"test2"]]; + responseFileNames = @[@"test1", @"test2"]; goodResponse = [[SDLListFilesResponse alloc] init]; goodResponse.success = @YES; @@ -76,14 +76,14 @@ context(@"when a bad response comes back", ^{ __block SDLListFilesResponse *badResponse = nil; __block NSNumber *responseSpaceAvailable = nil; - __block NSMutableArray *responseFileNames = nil; + __block NSArray *responseFileNames = nil; __block NSString *responseErrorDescription = nil; __block NSString *responseErrorReason = nil; beforeEach(^{ responseSpaceAvailable = @(0); - responseFileNames = [NSMutableArray arrayWithArray:@[]]; + responseFileNames = @[]; responseErrorDescription = @"some description"; responseErrorReason = @"some reason"; diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m index a565194d3..eeecebf6c 100644 --- a/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m +++ b/SmartDeviceLinkTests/DevAPISpecs/SDLPermissionsManagerSpec.m @@ -55,18 +55,18 @@ // Permission states testHMIPermissionsAllAllowed = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsAllAllowed.allowed = [NSMutableArray arrayWithArray:@[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]]; + testHMIPermissionsAllAllowed.allowed = @[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]; testHMIPermissionsAllDisallowed = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsAllDisallowed.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]]; + testHMIPermissionsAllDisallowed.userDisallowed = @[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]; testHMIPermissionsFullLimitedAllowed = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsFullLimitedAllowed.allowed = [NSMutableArray arrayWithArray:@[SDLHMILevelFull, SDLHMILevelLimited]]; - testHMIPermissionsFullLimitedAllowed.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelBackground, SDLHMILevelNone]]; + testHMIPermissionsFullLimitedAllowed.allowed = @[SDLHMILevelFull, SDLHMILevelLimited]; + testHMIPermissionsFullLimitedAllowed.userDisallowed = @[SDLHMILevelBackground, SDLHMILevelNone]; testHMIPermissionsFullLimitedBackgroundAllowed = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsFullLimitedBackgroundAllowed.allowed = [NSMutableArray arrayWithArray:@[SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelBackground]]; - testHMIPermissionsFullLimitedBackgroundAllowed.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelNone]]; + testHMIPermissionsFullLimitedBackgroundAllowed.allowed = @[SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelBackground]; + testHMIPermissionsFullLimitedBackgroundAllowed.userDisallowed = @[SDLHMILevelNone]; // Assemble Permissions SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init]; @@ -103,7 +103,7 @@ // Create OnPermissionsChange object testPermissionsChange = [[SDLOnPermissionsChange alloc] init]; - testPermissionsChange.permissionItem = [NSMutableArray arrayWithArray:@[testPermissionAllAllowed, testPermissionAllDisallowed, testPermissionFullLimitedAllowed, testPermissionFullLimitedBackgroundAllowed]]; + testPermissionsChange.permissionItem = @[testPermissionAllAllowed, testPermissionAllDisallowed, testPermissionFullLimitedAllowed, testPermissionFullLimitedBackgroundAllowed]; // Permission Notifications testPermissionsNotification = [[SDLRPCNotificationNotification alloc] initWithName:SDLDidChangePermissionsNotification object:nil rpcNotification:testPermissionsChange]; @@ -391,8 +391,8 @@ // Create a permission update disallowing our current HMI level for the observed permission SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init]; SDLHMIPermissions *testHMIPermissionsUpdated = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsUpdated.allowed = [NSMutableArray arrayWithArray:@[SDLHMILevelBackground, SDLHMILevelFull]]; - testHMIPermissionsUpdated.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelLimited, SDLHMILevelNone]]; + testHMIPermissionsUpdated.allowed = @[SDLHMILevelBackground, SDLHMILevelFull]; + testHMIPermissionsUpdated.userDisallowed = @[SDLHMILevelLimited, SDLHMILevelNone]; testPermissionUpdated = [[SDLPermissionItem alloc] init]; testPermissionUpdated.rpcName = testRPCNameAllAllowed; @@ -400,7 +400,7 @@ testPermissionUpdated.parameterPermissions = testParameterPermissions; testPermissionChangeUpdate = [[SDLOnPermissionsChange alloc] init]; - testPermissionChangeUpdate.permissionItem = [NSMutableArray arrayWithObject:testPermissionUpdated]; + testPermissionChangeUpdate.permissionItem = [NSArray arrayWithObject:testPermissionUpdated]; // Send the permission update NSNotification *updatedNotification = [NSNotification notificationWithName:SDLDidChangePermissionsNotification object:nil userInfo:@{SDLNotificationUserInfoObject: testPermissionChangeUpdate}]; @@ -459,8 +459,8 @@ // Create a permission update allowing our current HMI level for the observed permission SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init]; SDLHMIPermissions *testHMIPermissionsUpdated = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsUpdated.allowed = [NSMutableArray arrayWithArray:@[SDLHMILevelLimited, SDLHMILevelNone, SDLHMILevelBackground, SDLHMILevelFull]]; - testHMIPermissionsUpdated.userDisallowed = [NSMutableArray arrayWithArray:@[]]; + testHMIPermissionsUpdated.allowed = @[SDLHMILevelLimited, SDLHMILevelNone, SDLHMILevelBackground, SDLHMILevelFull]; + testHMIPermissionsUpdated.userDisallowed = @[]; testPermissionUpdated = [[SDLPermissionItem alloc] init]; testPermissionUpdated.rpcName = testRPCNameAllDisallowed; @@ -468,7 +468,7 @@ testPermissionUpdated.parameterPermissions = testParameterPermissions; testPermissionChangeUpdate = [[SDLOnPermissionsChange alloc] init]; - testPermissionChangeUpdate.permissionItem = [NSMutableArray arrayWithObject:testPermissionUpdated]; + testPermissionChangeUpdate.permissionItem = [NSArray arrayWithObject:testPermissionUpdated]; // Send the permission update NSNotification *updatedNotification = [NSNotification notificationWithName:SDLDidChangePermissionsNotification object:nil userInfo:@{SDLNotificationUserInfoObject: testPermissionChangeUpdate}]; @@ -502,8 +502,8 @@ // Create a permission update disallowing our current HMI level for the observed permission SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init]; SDLHMIPermissions *testHMIPermissionsUpdated = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsUpdated.allowed = [NSMutableArray arrayWithArray:@[]]; - testHMIPermissionsUpdated.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]]; + testHMIPermissionsUpdated.allowed = @[]; + testHMIPermissionsUpdated.userDisallowed = @[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]; testPermissionUpdated = [[SDLPermissionItem alloc] init]; testPermissionUpdated.rpcName = testRPCNameAllAllowed; @@ -511,7 +511,7 @@ testPermissionUpdated.parameterPermissions = testParameterPermissions; testPermissionChangeUpdate = [[SDLOnPermissionsChange alloc] init]; - testPermissionChangeUpdate.permissionItem = [NSMutableArray arrayWithObject:testPermissionUpdated]; + testPermissionChangeUpdate.permissionItem = [NSArray arrayWithObject:testPermissionUpdated]; // Send the permission update NSNotification *updatedNotification = [NSNotification notificationWithName:SDLDidChangePermissionsNotification object:nil userInfo:@{SDLNotificationUserInfoObject: testPermissionChangeUpdate}]; @@ -565,8 +565,8 @@ // Create a permission update disallowing our current HMI level for the observed permission SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init]; SDLHMIPermissions *testHMIPermissionsUpdated = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsUpdated.allowed = [NSMutableArray arrayWithArray:@[]]; - testHMIPermissionsUpdated.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]]; + testHMIPermissionsUpdated.allowed = @[]; + testHMIPermissionsUpdated.userDisallowed = @[SDLHMILevelBackground, SDLHMILevelFull, SDLHMILevelLimited, SDLHMILevelNone]; testPermissionUpdated = [[SDLPermissionItem alloc] init]; testPermissionUpdated.rpcName = testRPCNameAllAllowed; @@ -574,7 +574,7 @@ testPermissionUpdated.parameterPermissions = testParameterPermissions; testPermissionChangeUpdate = [[SDLOnPermissionsChange alloc] init]; - testPermissionChangeUpdate.permissionItem = [NSMutableArray arrayWithObject:testPermissionUpdated]; + testPermissionChangeUpdate.permissionItem = [NSArray arrayWithObject:testPermissionUpdated]; // Send the permission update NSNotification *updatedNotification = [NSNotification notificationWithName:SDLDidChangePermissionsNotification object:nil userInfo:@{SDLNotificationUserInfoObject: testPermissionChangeUpdate}]; @@ -599,8 +599,8 @@ // Create a permission update disallowing our current HMI level for the observed permission SDLParameterPermissions *testParameterPermissions = [[SDLParameterPermissions alloc] init]; SDLHMIPermissions *testHMIPermissionsUpdated = [[SDLHMIPermissions alloc] init]; - testHMIPermissionsUpdated.allowed = [NSMutableArray arrayWithArray:@[SDLHMILevelLimited, SDLHMILevelBackground]]; - testHMIPermissionsUpdated.userDisallowed = [NSMutableArray arrayWithArray:@[SDLHMILevelFull, SDLHMILevelNone]]; + testHMIPermissionsUpdated.allowed = @[SDLHMILevelLimited, SDLHMILevelBackground]; + testHMIPermissionsUpdated.userDisallowed = @[SDLHMILevelFull, SDLHMILevelNone]; testPermissionUpdated = [[SDLPermissionItem alloc] init]; testPermissionUpdated.rpcName = testRPCNameAllAllowed; @@ -608,7 +608,7 @@ testPermissionUpdated.parameterPermissions = testParameterPermissions; testPermissionChangeUpdate = [[SDLOnPermissionsChange alloc] init]; - testPermissionChangeUpdate.permissionItem = [NSMutableArray arrayWithObject:testPermissionUpdated]; + testPermissionChangeUpdate.permissionItem = [NSArray arrayWithObject:testPermissionUpdated]; // Send the permission update NSNotification *updatedNotification = [NSNotification notificationWithName:SDLDidChangePermissionsNotification object:nil userInfo:@{SDLNotificationUserInfoObject: testPermissionChangeUpdate}]; diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLPinchGestureSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLPinchGestureSpec.m index 99293ac8c..370b7876d 100644 --- a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLPinchGestureSpec.m +++ b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLPinchGestureSpec.m @@ -46,8 +46,8 @@ SDLTouchEvent* firstTouchEvent = [[SDLTouchEvent alloc] init]; firstTouchEvent.touchEventId = @0; - firstTouchEvent.coord = [NSMutableArray arrayWithObject:firstCoord]; - firstTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(timeStamp)]; + firstTouchEvent.coord = [NSArray arrayWithObject:firstCoord]; + firstTouchEvent.timeStamp = [NSArray arrayWithObject:@(timeStamp)]; SDLTouch* firstTouch = [[SDLTouch alloc] initWithTouchEvent:firstTouchEvent]; @@ -57,8 +57,8 @@ SDLTouchEvent* secondTouchEvent = [[SDLTouchEvent alloc] init]; secondTouchEvent.touchEventId = @1; - secondTouchEvent.coord = [NSMutableArray arrayWithObject:secondCoord]; - secondTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(secondTimeStamp)]; + secondTouchEvent.coord = [NSArray arrayWithObject:secondCoord]; + secondTouchEvent.timeStamp = [NSArray arrayWithObject:@(secondTimeStamp)]; SDLTouch* secondTouch = [[SDLTouch alloc] initWithTouchEvent:secondTouchEvent]; @@ -103,8 +103,8 @@ SDLTouchEvent* firstTouchEvent = [[SDLTouchEvent alloc] init]; firstTouchEvent.touchEventId = @0; - firstTouchEvent.coord = [NSMutableArray arrayWithObject:firstCoord]; - firstTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(timeStamp)]; + firstTouchEvent.coord = [NSArray arrayWithObject:firstCoord]; + firstTouchEvent.timeStamp = [NSArray arrayWithObject:@(timeStamp)]; SDLTouch* firstTouch = [[SDLTouch alloc] initWithTouchEvent:firstTouchEvent]; @@ -114,8 +114,8 @@ SDLTouchEvent* secondTouchEvent = [[SDLTouchEvent alloc] init]; secondTouchEvent.touchEventId = @1; - secondTouchEvent.coord = [NSMutableArray arrayWithObject:secondCoord]; - secondTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(secondTimeStamp)]; + secondTouchEvent.coord = [NSArray arrayWithObject:secondCoord]; + secondTouchEvent.timeStamp = [NSArray arrayWithObject:@(secondTimeStamp)]; SDLTouch* secondTouch = [[SDLTouch alloc] initWithTouchEvent:secondTouchEvent]; @@ -128,13 +128,13 @@ SDLTouchEvent* newFirstTouchEvent = [[SDLTouchEvent alloc] init]; newFirstTouchEvent.touchEventId = @0; - newFirstTouchEvent.coord = [NSMutableArray arrayWithObject:newCoord]; - newFirstTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(newTimeStamp)]; + newFirstTouchEvent.coord = [NSArray arrayWithObject:newCoord]; + newFirstTouchEvent.timeStamp = [NSArray arrayWithObject:@(newTimeStamp)]; SDLTouchEvent* newSecondTouchEvent = [[SDLTouchEvent alloc] init]; newSecondTouchEvent.touchEventId = @1; - newSecondTouchEvent.coord = [NSMutableArray arrayWithObject:newCoord]; - newSecondTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(newTimeStamp)]; + newSecondTouchEvent.coord = [NSArray arrayWithObject:newCoord]; + newSecondTouchEvent.timeStamp = [NSArray arrayWithObject:@(newTimeStamp)]; newFirstTouch = [[SDLTouch alloc] initWithTouchEvent:newFirstTouchEvent]; newSecondTouch = [[SDLTouch alloc] initWithTouchEvent:newSecondTouchEvent]; @@ -179,4 +179,4 @@ }); }); -QuickSpecEnd \ No newline at end of file +QuickSpecEnd diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m index 730922b36..acc51197b 100644 --- a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m +++ b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchManagerSpec.m @@ -177,16 +177,16 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent SDLTouchEvent* touchEvent = [[SDLTouchEvent alloc] init]; touchEvent.touchEventId = @0; - touchEvent.coord = [NSMutableArray arrayWithObject:firstTouchCoord]; - touchEvent.timeStamp = [NSMutableArray arrayWithObject:@(firstTouchTimeStamp)]; + touchEvent.coord = [NSArray arrayWithObject:firstTouchCoord]; + touchEvent.timeStamp = [NSArray arrayWithObject:@(firstTouchTimeStamp)]; firstOnTouchEventStart = [[SDLOnTouchEvent alloc] init]; firstOnTouchEventStart.type = SDLTouchTypeBegin; - firstOnTouchEventStart.event = [NSMutableArray arrayWithObject:touchEvent]; + firstOnTouchEventStart.event = [NSArray arrayWithObject:touchEvent]; firstOnTouchEventEnd = [[SDLOnTouchEvent alloc] init]; firstOnTouchEventEnd.type = SDLTouchTypeEnd; - firstOnTouchEventEnd.event = [NSMutableArray arrayWithObject:touchEvent]; + firstOnTouchEventEnd.event = [NSArray arrayWithObject:touchEvent]; }); describe(@"when receiving a single tap", ^{ @@ -237,7 +237,7 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent secondTouchEvent = [[SDLTouchEvent alloc] init]; secondTouchEvent.touchEventId = @0; NSUInteger secondTouchTimeStamp = firstTouchTimeStamp + (touchManager.tapTimeThreshold - 0.1) * 1000; - secondTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(secondTouchTimeStamp)]; + secondTouchEvent.timeStamp = [NSArray arrayWithObject:@(secondTouchTimeStamp)]; }); context(@"near the same point", ^{ @@ -246,11 +246,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent touchCoord.x = @(firstTouchCoord.x.floatValue + touchManager.tapDistanceThreshold); touchCoord.y = @(firstTouchCoord.y.floatValue + touchManager.tapDistanceThreshold); - secondTouchEvent.coord = [NSMutableArray arrayWithObject:touchCoord]; + secondTouchEvent.coord = [NSArray arrayWithObject:touchCoord]; - secondOnTouchEventStart.event = [NSMutableArray arrayWithObject:secondTouchEvent]; + secondOnTouchEventStart.event = [NSArray arrayWithObject:secondTouchEvent]; - secondOnTouchEventEnd.event = [NSMutableArray arrayWithObject:secondTouchEvent]; + secondOnTouchEventEnd.event = [NSArray arrayWithObject:secondTouchEvent]; averagePoint = CGPointMake((firstTouchCoord.x.floatValue + touchCoord.x.floatValue) / 2.0f, (firstTouchCoord.y.floatValue + touchCoord.y.floatValue) / 2.0f); @@ -291,11 +291,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent touchCoord.x = @(firstTouchCoord.x.floatValue + touchManager.tapDistanceThreshold + 1); touchCoord.y = @(firstTouchCoord.y.floatValue + touchManager.tapDistanceThreshold + 1); - secondTouchEvent.coord = [NSMutableArray arrayWithObject:touchCoord]; + secondTouchEvent.coord = [NSArray arrayWithObject:touchCoord]; - secondOnTouchEventStart.event = [NSMutableArray arrayWithObject:secondTouchEvent]; + secondOnTouchEventStart.event = [NSArray arrayWithObject:secondTouchEvent]; - secondOnTouchEventEnd.event = [NSMutableArray arrayWithObject:secondTouchEvent]; + secondOnTouchEventEnd.event = [NSArray arrayWithObject:secondTouchEvent]; }); it(@"should should not issue delegate callbacks", ^{ @@ -343,11 +343,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent NSUInteger panStartTimeStamp = ([[NSDate date] timeIntervalSince1970] * 1000) + movementTimeThresholdOffset; SDLTouchEvent* panStartTouchEvent = [[SDLTouchEvent alloc] init]; - panStartTouchEvent.coord = [NSMutableArray arrayWithObject:panStartTouchCoord]; - panStartTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(panStartTimeStamp)]; + panStartTouchEvent.coord = [NSArray arrayWithObject:panStartTouchCoord]; + panStartTouchEvent.timeStamp = [NSArray arrayWithObject:@(panStartTimeStamp)]; panStartOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - panStartOnTouchEvent.event = [NSMutableArray arrayWithObject:panStartTouchEvent]; + panStartOnTouchEvent.event = [NSArray arrayWithObject:panStartTouchEvent]; panStartOnTouchEvent.type = SDLTouchTypeBegin; // Finger Move @@ -360,11 +360,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent NSUInteger panMoveTimeStamp = panStartTimeStamp + movementTimeThresholdOffset; SDLTouchEvent* panMoveTouchEvent = [[SDLTouchEvent alloc] init]; - panMoveTouchEvent.coord = [NSMutableArray arrayWithObject:panMoveTouchCoord]; - panMoveTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(panMoveTimeStamp)]; + panMoveTouchEvent.coord = [NSArray arrayWithObject:panMoveTouchCoord]; + panMoveTouchEvent.timeStamp = [NSArray arrayWithObject:@(panMoveTimeStamp)]; panMoveOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - panMoveOnTouchEvent.event = [NSMutableArray arrayWithObject:panMoveTouchEvent]; + panMoveOnTouchEvent.event = [NSArray arrayWithObject:panMoveTouchEvent]; panMoveOnTouchEvent.type = SDLTouchTypeMove; // Finger Move @@ -377,11 +377,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent NSUInteger panSecondMoveTimeStamp = panMoveTimeStamp + movementTimeThresholdOffset; SDLTouchEvent* panSecondMoveTouchEvent = [[SDLTouchEvent alloc] init]; - panSecondMoveTouchEvent.coord = [NSMutableArray arrayWithObject:panSecondMoveTouchCoord]; - panSecondMoveTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(panSecondMoveTimeStamp)]; + panSecondMoveTouchEvent.coord = [NSArray arrayWithObject:panSecondMoveTouchCoord]; + panSecondMoveTouchEvent.timeStamp = [NSArray arrayWithObject:@(panSecondMoveTimeStamp)]; panSecondMoveOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - panSecondMoveOnTouchEvent.event = [NSMutableArray arrayWithObject:panSecondMoveTouchEvent]; + panSecondMoveOnTouchEvent.event = [NSArray arrayWithObject:panSecondMoveTouchEvent]; panSecondMoveOnTouchEvent.type = SDLTouchTypeMove; // Finger End @@ -394,11 +394,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent NSUInteger panEndTimeStamp = panSecondMoveTimeStamp + movementTimeThresholdOffset; SDLTouchEvent* panEndTouchEvent = [[SDLTouchEvent alloc] init]; - panEndTouchEvent.coord = [NSMutableArray arrayWithObject:panEndTouchCoord]; - panEndTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(panEndTimeStamp)]; + panEndTouchEvent.coord = [NSArray arrayWithObject:panEndTouchCoord]; + panEndTouchEvent.timeStamp = [NSArray arrayWithObject:@(panEndTimeStamp)]; panEndOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - panEndOnTouchEvent.event = [NSMutableArray arrayWithObject:panEndTouchEvent]; + panEndOnTouchEvent.event = [NSArray arrayWithObject:panEndTouchEvent]; panEndOnTouchEvent.type = SDLTouchTypeEnd; }); @@ -479,11 +479,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent NSUInteger firstFingerTimeStamp = [[NSDate date] timeIntervalSince1970] * 1000; SDLTouchEvent* firstFingerTouchEvent = [[SDLTouchEvent alloc] init]; - firstFingerTouchEvent.coord = [NSMutableArray arrayWithObject:firstFingerTouchCoord]; - firstFingerTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(firstFingerTimeStamp)]; + firstFingerTouchEvent.coord = [NSArray arrayWithObject:firstFingerTouchCoord]; + firstFingerTouchEvent.timeStamp = [NSArray arrayWithObject:@(firstFingerTimeStamp)]; pinchStartFirstFingerOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - pinchStartFirstFingerOnTouchEvent.event = [NSMutableArray arrayWithObject:firstFingerTouchEvent]; + pinchStartFirstFingerOnTouchEvent.event = [NSArray arrayWithObject:firstFingerTouchEvent]; pinchStartFirstFingerOnTouchEvent.type = SDLTouchTypeBegin; // Second finger touch down @@ -495,11 +495,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent SDLTouchEvent* secondFingerTouchEvent = [[SDLTouchEvent alloc] init]; secondFingerTouchEvent.touchEventId = @1; - secondFingerTouchEvent.coord = [NSMutableArray arrayWithObject:secondFingerTouchCoord]; - secondFingerTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(secondFingerTimeStamp)]; + secondFingerTouchEvent.coord = [NSArray arrayWithObject:secondFingerTouchCoord]; + secondFingerTouchEvent.timeStamp = [NSArray arrayWithObject:@(secondFingerTimeStamp)]; pinchStartSecondFingerOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - pinchStartSecondFingerOnTouchEvent.event = [NSMutableArray arrayWithObject:secondFingerTouchEvent]; + pinchStartSecondFingerOnTouchEvent.event = [NSArray arrayWithObject:secondFingerTouchEvent]; pinchStartSecondFingerOnTouchEvent.type = SDLTouchTypeBegin; pinchStartCenter = CGPointMake((firstFingerTouchCoord.x.floatValue + secondFingerTouchCoord.x.floatValue) / 2.0f, @@ -517,11 +517,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent SDLTouchEvent* secondFingerMoveTouchEvent = [[SDLTouchEvent alloc] init]; secondFingerMoveTouchEvent.touchEventId = @1; - secondFingerMoveTouchEvent.coord = [NSMutableArray arrayWithObject:secondFingerMoveTouchCoord]; - secondFingerMoveTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(secondFingerMoveTimeStamp)]; + secondFingerMoveTouchEvent.coord = [NSArray arrayWithObject:secondFingerMoveTouchCoord]; + secondFingerMoveTouchEvent.timeStamp = [NSArray arrayWithObject:@(secondFingerMoveTimeStamp)]; pinchMoveSecondFingerOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - pinchMoveSecondFingerOnTouchEvent.event = [NSMutableArray arrayWithObject:secondFingerMoveTouchEvent]; + pinchMoveSecondFingerOnTouchEvent.event = [NSArray arrayWithObject:secondFingerMoveTouchEvent]; pinchMoveSecondFingerOnTouchEvent.type = SDLTouchTypeMove; pinchMoveCenter = CGPointMake((firstFingerTouchCoord.x.floatValue + secondFingerMoveTouchCoord.x.floatValue) / 2.0f, @@ -539,11 +539,11 @@ __block void (^performTouchEvent)(SDLTouchManager* touchManager, SDLOnTouchEvent SDLTouchEvent* secondFingerEndTouchEvent = [[SDLTouchEvent alloc] init]; secondFingerEndTouchEvent.touchEventId = @1; - secondFingerEndTouchEvent.coord = [NSMutableArray arrayWithObject:secondFingerEndTouchCoord]; - secondFingerEndTouchEvent.timeStamp = [NSMutableArray arrayWithObject:@(secondFingerEndTimeStamp)]; + secondFingerEndTouchEvent.coord = [NSArray arrayWithObject:secondFingerEndTouchCoord]; + secondFingerEndTouchEvent.timeStamp = [NSArray arrayWithObject:@(secondFingerEndTimeStamp)]; pinchEndSecondFingerOnTouchEvent = [[SDLOnTouchEvent alloc] init]; - pinchEndSecondFingerOnTouchEvent.event = [NSMutableArray arrayWithObject:secondFingerEndTouchEvent]; + pinchEndSecondFingerOnTouchEvent.event = [NSArray arrayWithObject:secondFingerEndTouchEvent]; pinchEndSecondFingerOnTouchEvent.type = SDLTouchTypeEnd; pinchEndCenter = CGPointMake((firstFingerTouchCoord.x.floatValue + secondFingerEndTouchCoord.x.floatValue) / 2.0f, diff --git a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchSpec.m b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchSpec.m index c629cd72e..29973ffcb 100644 --- a/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchSpec.m +++ b/SmartDeviceLinkTests/UtilitiesSpecs/Touches/SDLTouchSpec.m @@ -48,8 +48,8 @@ SDLTouchEvent* touchEvent = [[SDLTouchEvent alloc] init]; touchEvent.touchEventId = @0; - touchEvent.coord = [NSMutableArray arrayWithObject:coord]; - touchEvent.timeStamp = [NSMutableArray arrayWithObject:@(timeStamp)]; + touchEvent.coord = [NSArray arrayWithObject:coord]; + touchEvent.timeStamp = [NSArray arrayWithObject:@(timeStamp)]; touch = [[SDLTouch alloc] initWithTouchEvent:touchEvent]; }); @@ -81,8 +81,8 @@ SDLTouchEvent* touchEvent = [[SDLTouchEvent alloc] init]; touchEvent.touchEventId = @1; - touchEvent.coord = [NSMutableArray arrayWithObject:coord]; - touchEvent.timeStamp = [NSMutableArray arrayWithObject:@(timeStamp)]; + touchEvent.coord = [NSArray arrayWithObject:coord]; + touchEvent.timeStamp = [NSArray arrayWithObject:@(timeStamp)]; touch = [[SDLTouch alloc] initWithTouchEvent:touchEvent]; }); @@ -104,4 +104,4 @@ }); }); -QuickSpecEnd \ No newline at end of file +QuickSpecEnd diff --git a/SmartDeviceLink_Example/Classes/ProxyManager.m b/SmartDeviceLink_Example/Classes/ProxyManager.m index 17fcc1687..6aac2f59f 100644 --- a/SmartDeviceLink_Example/Classes/ProxyManager.m +++ b/SmartDeviceLink_Example/Classes/ProxyManager.m @@ -176,7 +176,7 @@ + (SDLAddCommand *)speakNameCommandWithManager:(SDLManager *)manager { commandMenuParams.menuName = commandName; SDLAddCommand *speakNameCommand = [[SDLAddCommand alloc] init]; - speakNameCommand.vrCommands = [NSMutableArray arrayWithObject:commandName]; + speakNameCommand.vrCommands = @[commandName]; speakNameCommand.menuParams = commandMenuParams; speakNameCommand.cmdID = @0; @@ -194,7 +194,7 @@ + (SDLAddCommand *)interactionSetCommandWithManager:(SDLManager *)manager { commandMenuParams.menuName = commandName; SDLAddCommand *performInteractionCommand = [[SDLAddCommand alloc] init]; - performInteractionCommand.vrCommands = [NSMutableArray arrayWithObject:commandName]; + performInteractionCommand.vrCommands = @[commandName]; performInteractionCommand.menuParams = commandMenuParams; performInteractionCommand.cmdID = @1; @@ -236,9 +236,9 @@ + (SDLCreateInteractionChoiceSet *)createOnlyChoiceInteractionSet { SDLChoice *theOnlyChoice = [[SDLChoice alloc] init]; theOnlyChoice.choiceID = @0; theOnlyChoice.menuName = theOnlyChoiceName; - theOnlyChoice.vrCommands = [NSMutableArray arrayWithObject:theOnlyChoiceName]; + theOnlyChoice.vrCommands = @[theOnlyChoiceName]; - createInteractionSet.choiceSet = [NSMutableArray arrayWithArray:@[theOnlyChoice]]; + createInteractionSet.choiceSet = @[theOnlyChoice]; return createInteractionSet; } @@ -248,7 +248,7 @@ + (void)sendPerformOnlyChoiceInteractionWithManager:(SDLManager *)manager { performOnlyChoiceInteraction.initialText = @"Choose the only one! You have 5 seconds..."; performOnlyChoiceInteraction.initialPrompt = [SDLTTSChunk textChunksFromString:@"Choose it"]; performOnlyChoiceInteraction.interactionMode = SDLInteractionModeBoth; - performOnlyChoiceInteraction.interactionChoiceSetIDList = [NSMutableArray arrayWithObject:@0]; + performOnlyChoiceInteraction.interactionChoiceSetIDList = @[@0]; performOnlyChoiceInteraction.helpPrompt = [SDLTTSChunk textChunksFromString:@"Do it"]; performOnlyChoiceInteraction.timeoutPrompt = [SDLTTSChunk textChunksFromString:@"Too late"]; performOnlyChoiceInteraction.timeout = @5000;