summaryrefslogtreecommitdiff
path: root/SmartDeviceLink
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2016-12-22 12:19:14 -0500
committerMuller, Alexander (A.) <amulle19@ford.com>2016-12-22 12:19:14 -0500
commitf3f1abc532e359b69290d1944723f865f2ff8358 (patch)
treea4c80be41e0eeca7de0f97dd49ff738544424dfc /SmartDeviceLink
parente8c21ac87e9756cf2a4e380aec40ef8e26e3f4d4 (diff)
downloadsdl_ios-f3f1abc532e359b69290d1944723f865f2ff8358.tar.gz
Added nullability annotations for requests.
Diffstat (limited to 'SmartDeviceLink')
-rw-r--r--SmartDeviceLink/SDLAddCommand.h21
-rw-r--r--SmartDeviceLink/SDLAddCommand.m48
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.h7
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.m8
-rw-r--r--SmartDeviceLink/SDLAlert.h41
-rw-r--r--SmartDeviceLink/SDLAlert.m56
-rw-r--r--SmartDeviceLink/SDLAlertManeuver.h13
-rw-r--r--SmartDeviceLink/SDLAlertManeuver.m16
-rw-r--r--SmartDeviceLink/SDLChangeRegistration.h15
-rw-r--r--SmartDeviceLink/SDLChangeRegistration.m18
-rw-r--r--SmartDeviceLink/SDLChoice.h14
-rw-r--r--SmartDeviceLink/SDLChoice.m22
-rw-r--r--SmartDeviceLink/SDLCreateInteractionChoiceSet.h4
-rw-r--r--SmartDeviceLink/SDLCreateInteractionChoiceSet.m4
-rw-r--r--SmartDeviceLink/SDLDeleteCommand.h5
-rw-r--r--SmartDeviceLink/SDLDeleteCommand.m4
-rw-r--r--SmartDeviceLink/SDLDeleteFile.h5
-rw-r--r--SmartDeviceLink/SDLDeleteFile.m4
-rw-r--r--SmartDeviceLink/SDLDeleteInteractionChoiceSet.h5
-rw-r--r--SmartDeviceLink/SDLDeleteInteractionChoiceSet.m4
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.h5
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessage.h5
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessage.m4
-rw-r--r--SmartDeviceLink/SDLDialNumber.h5
-rw-r--r--SmartDeviceLink/SDLEncodedSyncPData.h4
-rw-r--r--SmartDeviceLink/SDLEncodedSyncPData.m4
-rw-r--r--SmartDeviceLink/SDLEndAudioPassThru.h5
-rw-r--r--SmartDeviceLink/SDLEndAudioPassThru.m4
-rw-r--r--SmartDeviceLink/SDLGetDTCs.h7
-rw-r--r--SmartDeviceLink/SDLGetDTCs.m8
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.h55
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.m104
-rw-r--r--SmartDeviceLink/SDLGetWaypoints.h4
-rw-r--r--SmartDeviceLink/SDLGetWaypoints.m4
-rw-r--r--SmartDeviceLink/SDLImage.h5
-rw-r--r--SmartDeviceLink/SDLImage.m4
-rw-r--r--SmartDeviceLink/SDLListFiles.h5
-rw-r--r--SmartDeviceLink/SDLListFiles.m4
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThru.h15
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThru.m22
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.h27
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.m57
-rw-r--r--SmartDeviceLink/SDLPutFile.h13
-rw-r--r--SmartDeviceLink/SDLPutFile.m20
-rw-r--r--SmartDeviceLink/SDLRPCMessage.h14
-rw-r--r--SmartDeviceLink/SDLRPCMessage.m12
-rw-r--r--SmartDeviceLink/SDLRPCNotification.h4
-rw-r--r--SmartDeviceLink/SDLRPCNotification.m4
-rw-r--r--SmartDeviceLink/SDLRPCPayload.h9
-rw-r--r--SmartDeviceLink/SDLRPCPayload.m8
-rw-r--r--SmartDeviceLink/SDLRPCRequest.h6
-rw-r--r--SmartDeviceLink/SDLRPCRequest.m8
-rw-r--r--SmartDeviceLink/SDLRPCResponse.h12
-rw-r--r--SmartDeviceLink/SDLRPCResponse.m20
-rw-r--r--SmartDeviceLink/SDLRPCStruct.h4
-rw-r--r--SmartDeviceLink/SDLRPCStruct.m4
-rw-r--r--SmartDeviceLink/SDLReadDID.h5
-rw-r--r--SmartDeviceLink/SDLReadDID.m4
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.h23
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.m81
-rw-r--r--SmartDeviceLink/SDLRequestHandler.h4
-rw-r--r--SmartDeviceLink/SDLResetGlobalProperties.h5
-rw-r--r--SmartDeviceLink/SDLResetGlobalProperties.m4
-rw-r--r--SmartDeviceLink/SDLScrollableMessage.h11
-rw-r--r--SmartDeviceLink/SDLScrollableMessage.m14
-rw-r--r--SmartDeviceLink/SDLSendLocation.h28
-rw-r--r--SmartDeviceLink/SDLSendLocation.m47
-rw-r--r--SmartDeviceLink/SDLSetAppIcon.h5
-rw-r--r--SmartDeviceLink/SDLSetDisplayLayout.h5
-rw-r--r--SmartDeviceLink/SDLSetDisplayLayout.m4
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.h25
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.m37
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimer.h9
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimer.m12
-rw-r--r--SmartDeviceLink/SDLShow.h38
-rw-r--r--SmartDeviceLink/SDLShowConstantTBT.h29
-rw-r--r--SmartDeviceLink/SDLShowConstantTBT.m50
-rw-r--r--SmartDeviceLink/SDLSlider.h13
-rw-r--r--SmartDeviceLink/SDLSlider.m16
-rw-r--r--SmartDeviceLink/SDLSpeak.h5
-rw-r--r--SmartDeviceLink/SDLSpeak.m4
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.h9
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.m7
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.h53
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.m100
-rw-r--r--SmartDeviceLink/SDLSubscribeWaypoints.h4
-rw-r--r--SmartDeviceLink/SDLSubscribeWaypoints.m4
-rw-r--r--SmartDeviceLink/SDLSyncPData.h4
-rw-r--r--SmartDeviceLink/SDLSyncPData.m4
-rw-r--r--SmartDeviceLink/SDLSystemRequest.h9
-rw-r--r--SmartDeviceLink/SDLSystemRequest.m10
-rw-r--r--SmartDeviceLink/SDLUnregisterAppInterface.h5
-rw-r--r--SmartDeviceLink/SDLUnregisterAppInterface.m4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButton.h5
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButton.m4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.h53
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.m100
-rw-r--r--SmartDeviceLink/SDLUnsubscribeWaypoints.h4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeWaypoints.m4
-rw-r--r--SmartDeviceLink/SDLUpdateTurnList.h11
-rw-r--r--SmartDeviceLink/SDLUpdateTurnList.m14
102 files changed, 1079 insertions, 620 deletions
diff --git a/SmartDeviceLink/SDLAddCommand.h b/SmartDeviceLink/SDLAddCommand.h
index 4060f2fe2..feb6ff597 100644
--- a/SmartDeviceLink/SDLAddCommand.h
+++ b/SmartDeviceLink/SDLAddCommand.h
@@ -34,6 +34,9 @@
*
* @see SDLDeleteCommand SDLAddSubMenu SDLDeleteSubMenu
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAddCommand : SDLRPCRequest <SDLRequestHandler>
/**
@@ -43,20 +46,20 @@
*
* @return An SDLAddCommand object
*/
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler;
-- (instancetype)initWithId:(UInt32)commandId vrCommands:(NSArray<NSString *> *)vrCommands handler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithId:(UInt32)commandId vrCommands:(nullable NSArray<NSString *> *)vrCommands handler:(nullable SDLRPCNotificationHandler)handler;
-- (instancetype)initWithId:(UInt32)commandId vrCommands:(NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName handler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithId:(UInt32)commandId vrCommands:(nullable NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName handler:(SDLRPCNotificationHandler)handler;
-- (instancetype)initWithId:(UInt32)commandId vrCommands:(NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName parentId:(UInt32)parentId position:(UInt16)position iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType handler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithId:(UInt32)commandId vrCommands:(nullable NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName parentId:(UInt32)parentId position:(UInt16)position iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType handler:(nullable SDLRPCNotificationHandler)handler;
/**
* A handler that will let you know when the button you created is subscribed.
*
* @warning This will only work if you use SDLManager.
*/
-@property (copy, nonatomic) SDLRPCNotificationHandler handler;
+@property (nullable, copy, nonatomic) SDLRPCNotificationHandler handler;
/**
* @abstract A Unique Command ID that identifies the command
@@ -77,7 +80,7 @@
*
* Optional
*/
-@property (strong) SDLMenuParams *menuParams;
+@property (nullable, strong) SDLMenuParams *menuParams;
/**
* @abstract An array of strings to be used as VR synonyms for this command.
@@ -88,7 +91,7 @@
*
* Optional, Array of Strings, Max String length 99 chars, Array size 1 - 100
*/
-@property (strong) NSMutableArray<NSString *> *vrCommands;
+@property (nullable, strong) NSMutableArray<NSString *> *vrCommands;
/**
* @abstract Image struct containing a static or dynamic icon
@@ -99,6 +102,8 @@
*
* Optional
*/
-@property (strong) SDLImage *cmdIcon;
+@property (nullable, strong) SDLImage *cmdIcon;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddCommand.m b/SmartDeviceLink/SDLAddCommand.m
index 7d360a924..f7df6acf4 100644
--- a/SmartDeviceLink/SDLAddCommand.m
+++ b/SmartDeviceLink/SDLAddCommand.m
@@ -8,6 +8,8 @@
#import "SDLMenuParams.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAddCommand
- (instancetype)init {
@@ -16,7 +18,7 @@
return self;
}
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler {
self = [self init];
if (!self) {
return nil;
@@ -27,29 +29,31 @@
return self;
}
-- (instancetype)initWithId:(UInt32)commandId vrCommands:(NSArray<NSString *> *)vrCommands handler:(SDLRPCNotificationHandler)handler {
- return [self initWithId:commandId vrCommands:vrCommands menuName:nil handler:handler];
-}
-
-- (instancetype)initWithId:(UInt32)commandId vrCommands:(NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName handler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithId:(UInt32)commandId vrCommands:(nullable NSArray<NSString *> *)vrCommands handler:(nullable SDLRPCNotificationHandler)handler {
self = [self init];
if (!self) {
return nil;
}
-
+
self.cmdID = @(commandId);
-
- if (menuName != nil) {
- self.menuParams = [[SDLMenuParams alloc] initWithMenuName:menuName];
- }
-
self.vrCommands = [vrCommands mutableCopy];
self.handler = handler;
+
+ return self;
+}
+- (instancetype)initWithId:(UInt32)commandId vrCommands:(nullable NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName handler:(SDLRPCNotificationHandler)handler {
+ self = [self initWithId:commandId vrCommands:vrCommands handler:handler];
+ if (!self) {
+ return nil;
+ }
+
+ self.menuParams = [[SDLMenuParams alloc] initWithMenuName:menuName];
+
return self;
}
-- (instancetype)initWithId:(UInt32)commandId vrCommands:(NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName parentId:(UInt32)parentId position:(UInt16)position iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType handler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithId:(UInt32)commandId vrCommands:(nullable NSArray<NSString *> *)vrCommands menuName:(NSString *)menuName parentId:(UInt32)parentId position:(UInt16)position iconValue:(NSString *)iconValue iconType:(SDLImageType)iconType handler:(nullable SDLRPCNotificationHandler)handler {
self = [self initWithId:commandId vrCommands:vrCommands menuName:menuName handler:handler];
if (!self) {
return nil;
@@ -58,9 +62,7 @@
self.menuParams.parentID = @(parentId);
self.menuParams.position = @(position);
- if (iconValue != nil && iconType != nil) {
- self.cmdIcon = [[SDLImage alloc] initWithName:iconValue ofType:iconType];
- }
+ self.cmdIcon = [[SDLImage alloc] initWithName:iconValue ofType:iconType];
return self;
}
@@ -77,7 +79,7 @@
return [parameters objectForKey:SDLNameCommandId];
}
-- (void)setMenuParams:(SDLMenuParams *)menuParams {
+- (void)setMenuParams:(nullable SDLMenuParams *)menuParams {
if (menuParams != nil) {
[parameters setObject:menuParams forKey:SDLNameMenuParams];
} else {
@@ -85,7 +87,7 @@
}
}
-- (SDLMenuParams *)menuParams {
+- (nullable SDLMenuParams *)menuParams {
NSObject *obj = [parameters objectForKey:SDLNameMenuParams];
if (obj == nil || [obj isKindOfClass:SDLMenuParams.class]) {
return (SDLMenuParams *)obj;
@@ -94,7 +96,7 @@
}
}
-- (void)setVrCommands:(NSMutableArray<NSString *> *)vrCommands {
+- (void)setVrCommands:(nullable NSMutableArray<NSString *> *)vrCommands {
if (vrCommands != nil) {
[parameters setObject:vrCommands forKey:SDLNameVRCommands];
} else {
@@ -102,11 +104,11 @@
}
}
-- (NSMutableArray<NSString *> *)vrCommands {
+- (nullable NSMutableArray<NSString *> *)vrCommands {
return [parameters objectForKey:SDLNameVRCommands];
}
-- (void)setCmdIcon:(SDLImage *)cmdIcon {
+- (void)setCmdIcon:(nullable SDLImage *)cmdIcon {
if (cmdIcon != nil) {
[parameters setObject:cmdIcon forKey:SDLNameCommandIcon];
} else {
@@ -114,7 +116,7 @@
}
}
-- (SDLImage *)cmdIcon {
+- (nullable SDLImage *)cmdIcon {
NSObject *obj = [parameters objectForKey:SDLNameCommandIcon];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -124,3 +126,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddSubMenu.h b/SmartDeviceLink/SDLAddSubMenu.h
index 6f7f25159..03119bccf 100644
--- a/SmartDeviceLink/SDLAddSubMenu.h
+++ b/SmartDeviceLink/SDLAddSubMenu.h
@@ -16,6 +16,9 @@
* Since <b>SmartDeviceLink 1.0</b><br>
* see SDLDeleteSubMenu SDLAddCommand SDLDeleteCommand
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAddSubMenu : SDLRPCRequest
- (instancetype)initWithId:(UInt8)menuId menuName:(NSString *)menuName;
@@ -47,7 +50,7 @@
* the end of the list</li>
* </ul>
*/
-@property (strong) NSNumber<SDLInt> *position;
+@property (nullable, strong) NSNumber<SDLInt> *position;
/**
* @abstract a menuName which is displayed representing this submenu item
* @discussion NSString which will be displayed representing this submenu item
@@ -55,3 +58,5 @@
@property (strong) NSString *menuName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddSubMenu.m b/SmartDeviceLink/SDLAddSubMenu.m
index 41ced17a2..017abece2 100644
--- a/SmartDeviceLink/SDLAddSubMenu.m
+++ b/SmartDeviceLink/SDLAddSubMenu.m
@@ -4,6 +4,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAddSubMenu
- (instancetype)init {
@@ -48,7 +50,7 @@
return [parameters objectForKey:SDLNameMenuId];
}
-- (void)setPosition:(NSNumber<SDLInt> *)position {
+- (void)setPosition:(nullable NSNumber<SDLInt> *)position {
if (position != nil) {
[parameters setObject:position forKey:SDLNamePosition];
} else {
@@ -56,7 +58,7 @@
}
}
-- (NSNumber<SDLInt> *)position {
+- (nullable NSNumber<SDLInt> *)position {
return [parameters objectForKey:SDLNamePosition];
}
@@ -73,3 +75,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlert.h b/SmartDeviceLink/SDLAlert.h
index f6b0b324a..18837c122 100644
--- a/SmartDeviceLink/SDLAlert.h
+++ b/SmartDeviceLink/SDLAlert.h
@@ -35,28 +35,31 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAlert : SDLRPCRequest
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 duration:(UInt16)duration;
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(UInt16)duration;
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3;
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3;
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 duration:(UInt16)duration;
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration;
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 duration:(UInt16)duration softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
-- (instancetype)initWithTTS:(NSString *)ttsText playTone:(BOOL)playTone;
+- (instancetype)initWithTTS:(nullable NSString *)ttsText playTone:(BOOL)playTone;
-- (instancetype)initWithTTS:(NSString *)ttsText alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration;
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration;
-- (instancetype)initWithTTS:(NSString *)ttsText alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration;
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration;
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone;
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone;
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(BOOL)playTone softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
/**
@@ -70,7 +73,7 @@
*
* Optional, Max length 500 chars
*/
-@property (strong) NSString *alertText1;
+@property (nullable, strong) NSString *alertText1;
/**
* @abstract The String to be displayed in the second field of the display during the Alert
@@ -85,7 +88,7 @@
*
* Optional, Max length 500 chars
*/
-@property (strong) NSString *alertText2;
+@property (nullable, strong) NSString *alertText2;
/**
* @abstract the String to be displayed in the third field of the display during the Alert
@@ -99,7 +102,7 @@
*
* Optional, Max length 500 chars
*/
-@property (strong) NSString *alertText3;
+@property (nullable, strong) NSString *alertText3;
/**
* @abstract An array which, taken together, specify what is to be spoken to the user
@@ -108,7 +111,7 @@
*
* @see SDLTTSChunk
*/
-@property (strong) NSMutableArray<SDLTTSChunk *> *ttsChunks;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *ttsChunks;
/**
* @abstract The duration of the displayed portion of the alert, in milliseconds.
@@ -121,7 +124,7 @@
*
* Optional, Integer, 3000 - 10000
*/
-@property (strong) NSNumber<SDLInt> *duration;
+@property (nullable, strong) NSNumber<SDLInt> *duration;
/**
* @abstract Whether the alert tone should be played before the TTS (if any) is spoken.
@@ -130,7 +133,7 @@
*
* Optional, Boolean
*/
-@property (strong) NSNumber<SDLBool> *playTone;
+@property (nullable, strong) NSNumber<SDLBool> *playTone;
/**
* @abstract If supported on the given platform, the alert GUI will include some sort of animation indicating that loading of a feature is progressing. e.g. a spinning wheel or hourglass, etc.
@@ -139,7 +142,7 @@
*
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSNumber<SDLBool> *progressIndicator;
+@property (nullable, strong) NSNumber<SDLBool> *progressIndicator;
/**
* @abstract App defined SoftButtons.
@@ -150,6 +153,8 @@
*
* @see SDLSoftButton
*/
-@property (strong) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlert.m b/SmartDeviceLink/SDLAlert.m
index 28669e2a3..cb47831fb 100644
--- a/SmartDeviceLink/SDLAlert.m
+++ b/SmartDeviceLink/SDLAlert.m
@@ -9,6 +9,8 @@
static UInt16 const SDLDefaultDuration = 5000;
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAlert
- (instancetype)init {
@@ -17,44 +19,44 @@ static UInt16 const SDLDefaultDuration = 5000;
return self;
}
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 {
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 {
return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 duration:SDLDefaultDuration];
}
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 duration:(UInt16)duration {
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(UInt16)duration {
return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:nil duration:duration];
}
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 duration:(UInt16)duration {
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration {
return [self initWithAlertText1:alertText1 alertText2:alertText2 alertText3:alertText3 duration:duration softButtons:nil];
}
-- (instancetype)initWithAlertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 duration:(UInt16)duration softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
return [self initWithTTSChunks:nil alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:NO duration:duration softButtons:softButtons];
}
-- (instancetype)initWithTTS:(NSString *)ttsText playTone:(BOOL)playTone {
+- (instancetype)initWithTTS:(nullable NSString *)ttsText playTone:(BOOL)playTone {
return [self initWithTTS:ttsText alertText1:nil alertText2:nil playTone:playTone duration:SDLDefaultDuration];
}
-- (instancetype)initWithTTS:(NSString *)ttsText alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration {
+- (instancetype)initWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(BOOL)playTone duration:(UInt16)duration {
return [self initWithTTS:ttsText alertText1:alertText1 alertText2:alertText2 alertText3:nil playTone:playTone duration:duration];
}
-- (instancetype)initWithTTS:(NSString *)ttsText alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration {
+- (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];
return [self initWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:duration softButtons:nil];
}
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone {
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(BOOL)playTone {
return [self initWithTTSChunks:ttsChunks alertText1:nil alertText2:nil alertText3:nil playTone:playTone duration:SDLDefaultDuration softButtons:nil];
}
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(BOOL)playTone softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
return [self initWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:SDLDefaultDuration softButtons:softButtons];
}
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(NSString *)alertText1 alertText2:(NSString *)alertText2 alertText3:(NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(BOOL)playTone duration:(UInt16)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
self = [self init];
if (!self) {
return nil;
@@ -71,7 +73,7 @@ static UInt16 const SDLDefaultDuration = 5000;
return self;
}
-- (void)setAlertText1:(NSString *)alertText1 {
+- (void)setAlertText1:(nullable NSString *)alertText1 {
if (alertText1 != nil) {
[parameters setObject:alertText1 forKey:SDLNameAlertText1];
} else {
@@ -79,11 +81,11 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSString *)alertText1 {
+- (nullable NSString *)alertText1 {
return [parameters objectForKey:SDLNameAlertText1];
}
-- (void)setAlertText2:(NSString *)alertText2 {
+- (void)setAlertText2:(nullable NSString *)alertText2 {
if (alertText2 != nil) {
[parameters setObject:alertText2 forKey:SDLNameAlertText2];
} else {
@@ -91,11 +93,11 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSString *)alertText2 {
+- (nullable NSString *)alertText2 {
return [parameters objectForKey:SDLNameAlertText2];
}
-- (void)setAlertText3:(NSString *)alertText3 {
+- (void)setAlertText3:(nullable NSString *)alertText3 {
if (alertText3 != nil) {
[parameters setObject:alertText3 forKey:SDLNameAlertText3];
} else {
@@ -103,11 +105,11 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSString *)alertText3 {
+- (nullable NSString *)alertText3 {
return [parameters objectForKey:SDLNameAlertText3];
}
-- (void)setTtsChunks:(NSMutableArray<SDLTTSChunk *> *)ttsChunks {
+- (void)setTtsChunks:(nullable NSMutableArray<SDLTTSChunk *> *)ttsChunks {
if (ttsChunks != nil) {
[parameters setObject:ttsChunks forKey:SDLNameTTSChunks];
} else {
@@ -115,7 +117,7 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSMutableArray<SDLTTSChunk *> *)ttsChunks {
+- (nullable NSMutableArray<SDLTTSChunk *> *)ttsChunks {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameTTSChunks];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -128,7 +130,7 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (void)setDuration:(NSNumber<SDLInt> *)duration {
+- (void)setDuration:(nullable NSNumber<SDLInt> *)duration {
if (duration != nil) {
[parameters setObject:duration forKey:SDLNameDuration];
} else {
@@ -136,11 +138,11 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSNumber<SDLInt> *)duration {
+- (nullable NSNumber<SDLInt> *)duration {
return [parameters objectForKey:SDLNameDuration];
}
-- (void)setPlayTone:(NSNumber<SDLBool> *)playTone {
+- (void)setPlayTone:(nullable NSNumber<SDLBool> *)playTone {
if (playTone != nil) {
[parameters setObject:playTone forKey:SDLNamePlayTone];
} else {
@@ -148,11 +150,11 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSNumber<SDLBool> *)playTone {
+- (nullable NSNumber<SDLBool> *)playTone {
return [parameters objectForKey:SDLNamePlayTone];
}
-- (void)setProgressIndicator:(NSNumber<SDLBool> *)progressIndicator {
+- (void)setProgressIndicator:(nullable NSNumber<SDLBool> *)progressIndicator {
if (progressIndicator != nil) {
[parameters setObject:progressIndicator forKey:SDLNameProgressIndicator];
} else {
@@ -160,11 +162,11 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSNumber<SDLBool> *)progressIndicator {
+- (nullable NSNumber<SDLBool> *)progressIndicator {
return [parameters objectForKey:SDLNameProgressIndicator];
}
-- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
+- (void)setSoftButtons:(nullable NSMutableArray<SDLSoftButton *> *)softButtons {
if (softButtons != nil) {
[parameters setObject:softButtons forKey:SDLNameSoftButtons];
} else {
@@ -172,7 +174,7 @@ static UInt16 const SDLDefaultDuration = 5000;
}
}
-- (NSMutableArray<SDLSoftButton *> *)softButtons {
+- (nullable NSMutableArray<SDLSoftButton *> *)softButtons {
NSMutableArray<SDLSoftButton *> *array = [parameters objectForKey:SDLNameSoftButtons];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButton.class]) {
return array;
@@ -186,3 +188,5 @@ static UInt16 const SDLDefaultDuration = 5000;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlertManeuver.h b/SmartDeviceLink/SDLAlertManeuver.h
index 35e3630ba..238a93cc1 100644
--- a/SmartDeviceLink/SDLAlertManeuver.h
+++ b/SmartDeviceLink/SDLAlertManeuver.h
@@ -11,12 +11,17 @@
/**
* @since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAlertManeuver : SDLRPCRequest
-- (instancetype)initWithTTS:(NSString *)ttsText softButtons:(NSArray<SDLSoftButton *> *)softButtons;
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithTTS:(nullable NSString *)ttsText softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
-@property (strong) NSMutableArray<SDLTTSChunk *> *ttsChunks;
-@property (strong) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *ttsChunks;
+@property (nullable, strong) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlertManeuver.m b/SmartDeviceLink/SDLAlertManeuver.m
index a1ced4dd5..4aea64b46 100644
--- a/SmartDeviceLink/SDLAlertManeuver.m
+++ b/SmartDeviceLink/SDLAlertManeuver.m
@@ -8,6 +8,8 @@
#import "SDLSoftButton.h"
#import "SDLTTSChunk.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAlertManeuver
- (instancetype)init {
@@ -17,12 +19,12 @@
}
-- (instancetype)initWithTTS:(NSString *)ttsText softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithTTS:(nullable NSString *)ttsText softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
NSMutableArray *ttsChunks = [SDLTTSChunk textChunksFromString:ttsText];
return [self initWithTTSChunks:ttsChunks softButtons:softButtons];
}
-- (instancetype)initWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
self = [self init];
if (!self) {
return nil;
@@ -34,7 +36,7 @@
return self;
}
-- (void)setTtsChunks:(NSMutableArray<SDLTTSChunk *> *)ttsChunks {
+- (void)setTtsChunks:(nullable NSMutableArray<SDLTTSChunk *> *)ttsChunks {
if (ttsChunks != nil) {
[parameters setObject:ttsChunks forKey:SDLNameTTSChunks];
} else {
@@ -42,7 +44,7 @@
}
}
-- (NSMutableArray<SDLTTSChunk *> *)ttsChunks {
+- (nullable NSMutableArray<SDLTTSChunk *> *)ttsChunks {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameTTSChunks];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -55,7 +57,7 @@
}
}
-- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
+- (void)setSoftButtons:(nullable NSMutableArray<SDLSoftButton *> *)softButtons {
if (softButtons != nil) {
[parameters setObject:softButtons forKey:SDLNameSoftButtons];
} else {
@@ -63,7 +65,7 @@
}
}
-- (NSMutableArray<SDLSoftButton *> *)softButtons {
+- (nullable NSMutableArray<SDLSoftButton *> *)softButtons {
NSMutableArray<SDLSoftButton *> *array = [parameters objectForKey:SDLNameSoftButtons];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButton.class]) {
return array;
@@ -77,3 +79,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChangeRegistration.h b/SmartDeviceLink/SDLChangeRegistration.h
index ed631892f..7f4b06c3c 100644
--- a/SmartDeviceLink/SDLChangeRegistration.h
+++ b/SmartDeviceLink/SDLChangeRegistration.h
@@ -15,11 +15,14 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLChangeRegistration : SDLRPCRequest
- (instancetype)initWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage;
-- (instancetype)initWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage appName:(NSString *)appName ttsName:(NSArray<SDLTTSChunk *> *)ttsName ngnMediaScreenAppName:(NSString *)ngnMediaScreenAppName vrSynonyms:(NSArray<NSString *> *)vrSynonyms;
+- (instancetype)initWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage appName:(nullable NSString *)appName ttsName:(nullable NSArray<SDLTTSChunk *> *)ttsName ngnMediaScreenAppName:(nullable NSString *)ngnMediaScreenAppName vrSynonyms:(nullable NSArray<NSString *> *)vrSynonyms;
/**
* @abstract The language the app wants to change to
@@ -36,27 +39,29 @@
*
* Optional, Max string length 100 chars
*/
-@property (copy, nonatomic) NSString *appName;
+@property (nullable, copy, nonatomic) NSString *appName;
/**
* Request a new TTSName registration.
*
* Optional, Array of SDLTTSChunk, 1 - 100 elements
*/
-@property (copy, nonatomic) NSArray<SDLTTSChunk *> *ttsName;
+@property (nullable, copy, nonatomic) NSArray<SDLTTSChunk *> *ttsName;
/**
* Request a new app short name registration
*
* Optional, Max string length 100 chars
*/
-@property (copy, nonatomic) NSString *ngnMediaScreenAppName;
+@property (nullable, copy, nonatomic) NSString *ngnMediaScreenAppName;
/**
* Request a new VR synonyms registration
*
* Optional, Array of NSString, 1 - 100 elements, max string length 40 chars
*/
-@property (copy, nonatomic) NSArray<NSString *> *vrSynonyms;
+@property (nullable, copy, nonatomic) NSArray<NSString *> *vrSynonyms;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChangeRegistration.m b/SmartDeviceLink/SDLChangeRegistration.m
index f646cc218..f62991014 100644
--- a/SmartDeviceLink/SDLChangeRegistration.m
+++ b/SmartDeviceLink/SDLChangeRegistration.m
@@ -23,7 +23,7 @@
return self;
}
-- (instancetype)initWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage appName:(NSString *)appName ttsName:(NSArray<SDLTTSChunk *> *)ttsName ngnMediaScreenAppName:(NSString *)ngnMediaScreenAppName vrSynonyms:(NSArray<NSString *> *)vrSynonyms {
+- (instancetype)initWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage appName:(nullable NSString *)appName ttsName:(nullable NSArray<SDLTTSChunk *> *)ttsName ngnMediaScreenAppName:(nullable NSString *)ngnMediaScreenAppName vrSynonyms:(nullable NSArray<NSString *> *)vrSynonyms {
self = [self init];
if (!self) {
return nil;
@@ -65,7 +65,7 @@
return (SDLLanguage )obj;
}
-- (void)setAppName:(NSString *)appName {
+- (void)setAppName:(nullable NSString *)appName {
if (appName != nil) {
parameters[SDLNameAppName] = [appName copy];
} else {
@@ -73,11 +73,11 @@
}
}
-- (NSString *)appName {
+- (nullable NSString *)appName {
return [parameters[SDLNameAppName] copy];
}
-- (void)setTtsName:(NSArray<SDLTTSChunk *> *)ttsName {
+- (void)setTtsName:(nullable NSArray<SDLTTSChunk *> *)ttsName {
if (ttsName != nil) {
[parameters setObject:[ttsName copy] forKey:SDLNameTTSName];
} else {
@@ -85,11 +85,11 @@
}
}
-- (NSArray<SDLTTSChunk *> *)ttsName {
+- (nullable NSArray<SDLTTSChunk *> *)ttsName {
return [parameters[SDLNameTTSName] copy];
}
-- (void)setNgnMediaScreenAppName:(NSString *)ngnMediaScreenAppName {
+- (void)setNgnMediaScreenAppName:(nullable NSString *)ngnMediaScreenAppName {
if (ngnMediaScreenAppName != nil) {
parameters[SDLNameNGNMediaScreenAppName] = [ngnMediaScreenAppName copy];
} else {
@@ -97,11 +97,11 @@
}
}
-- (NSString *)ngnMediaScreenAppName {
+- (nullable NSString *)ngnMediaScreenAppName {
return [parameters[SDLNameNGNMediaScreenAppName] copy];
}
-- (void)setVrSynonyms:(NSArray<NSString *> *)vrSynonyms {
+- (void)setVrSynonyms:(nullable NSArray<NSString *> *)vrSynonyms {
if (vrSynonyms != nil) {
[parameters setObject:[vrSynonyms copy] forKey:SDLNameVRSynonyms];
} else {
@@ -109,7 +109,7 @@
}
}
-- (NSArray<NSString *> *)vrSynonyms {
+- (nullable NSArray<NSString *> *)vrSynonyms {
return [parameters[SDLNameVRSynonyms] copy];
}
diff --git a/SmartDeviceLink/SDLChoice.h b/SmartDeviceLink/SDLChoice.h
index b35deb299..465734617 100644
--- a/SmartDeviceLink/SDLChoice.h
+++ b/SmartDeviceLink/SDLChoice.h
@@ -50,11 +50,13 @@
*
* Since <b>SmartDeviceLink 1.0</b><br>
*/
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLChoice : SDLRPCStruct
- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(NSArray<NSString *> *)vrCommands;
-- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(NSArray<NSString *> *)vrCommands image:(SDLImage *)image secondaryText:(NSString *)secondaryText secondaryImage:(SDLImage *)secondaryImage tertiaryText:(NSString *)tertiaryText;
+- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(NSArray<NSString *> *)vrCommands image:(nullable SDLImage *)image secondaryText:(nullable NSString *)secondaryText secondaryImage:(nullable SDLImage *)secondaryImage tertiaryText:(nullable NSString *)tertiaryText;
/**
* @abstract the application-scoped identifier that uniquely identifies this choice
@@ -82,27 +84,29 @@
*
* Optional
*/
-@property (strong) SDLImage *image;
+@property (nullable, strong) SDLImage *image;
/**
* @abstract Optional secondary text to display; e.g. address of POI in a search result entry
*
* Optional, Max String length 500 chars
*/
-@property (strong) NSString *secondaryText;
+@property (nullable, strong) NSString *secondaryText;
/**
* @abstract Optional tertiary text to display; e.g. distance to POI for a search result entry
*
* Optional, Max String length 500 chars
*/
-@property (strong) NSString *tertiaryText;
+@property (nullable, strong) NSString *tertiaryText;
/**
* @abstract Optional secondary image for choice
*
* Optional
*/
-@property (strong) SDLImage *secondaryImage;
+@property (nullable, strong) SDLImage *secondaryImage;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChoice.m b/SmartDeviceLink/SDLChoice.m
index f1c425c54..fac045446 100644
--- a/SmartDeviceLink/SDLChoice.m
+++ b/SmartDeviceLink/SDLChoice.m
@@ -6,9 +6,11 @@
#import "SDLImage.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLChoice
-- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(NSArray<NSString *> *)vrCommands image:(SDLImage *)image secondaryText:(NSString *)secondaryText secondaryImage:(SDLImage *)secondaryImage tertiaryText:(NSString *)tertiaryText {
+- (instancetype)initWithId:(UInt16)choiceId menuName:(NSString *)menuName vrCommands:(NSArray<NSString *> *)vrCommands image:(nullable SDLImage *)image secondaryText:(nullable NSString *)secondaryText secondaryImage:(nullable SDLImage *)secondaryImage tertiaryText:(nullable NSString *)tertiaryText {
self = [self initWithId:choiceId menuName:menuName vrCommands:vrCommands];
if (!self) {
return nil;
@@ -71,7 +73,7 @@
return [store objectForKey:SDLNameVRCommands];
}
-- (void)setImage:(SDLImage *)image {
+- (void)setImage:(nullable SDLImage *)image {
if (image != nil) {
[store setObject:image forKey:SDLNameImage];
} else {
@@ -79,7 +81,7 @@
}
}
-- (SDLImage *)image {
+- (nullable SDLImage *)image {
NSObject *obj = [store objectForKey:SDLNameImage];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -88,7 +90,7 @@
}
}
-- (void)setSecondaryText:(NSString *)secondaryText {
+- (void)setSecondaryText:(nullable NSString *)secondaryText {
if (secondaryText != nil) {
[store setObject:secondaryText forKey:SDLNameSecondaryText];
} else {
@@ -96,11 +98,11 @@
}
}
-- (NSString *)secondaryText {
+- (nullable NSString *)secondaryText {
return [store objectForKey:SDLNameSecondaryText];
}
-- (void)setTertiaryText:(NSString *)tertiaryText {
+- (void)setTertiaryText:(nullable NSString *)tertiaryText {
if (tertiaryText != nil) {
[store setObject:tertiaryText forKey:SDLNameTertiaryText];
} else {
@@ -108,11 +110,11 @@
}
}
-- (NSString *)tertiaryText {
+- (nullable NSString *)tertiaryText {
return [store objectForKey:SDLNameTertiaryText];
}
-- (void)setSecondaryImage:(SDLImage *)secondaryImage {
+- (void)setSecondaryImage:(nullable SDLImage *)secondaryImage {
if (secondaryImage != nil) {
[store setObject:secondaryImage forKey:SDLNameSecondaryImage];
} else {
@@ -120,7 +122,7 @@
}
}
-- (SDLImage *)secondaryImage {
+- (nullable SDLImage *)secondaryImage {
NSObject *obj = [store objectForKey:SDLNameSecondaryImage];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -130,3 +132,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCreateInteractionChoiceSet.h b/SmartDeviceLink/SDLCreateInteractionChoiceSet.h
index 2739c3c11..5bfcfb7b3 100644
--- a/SmartDeviceLink/SDLCreateInteractionChoiceSet.h
+++ b/SmartDeviceLink/SDLCreateInteractionChoiceSet.h
@@ -19,6 +19,8 @@
*
* @see SDLDeleteInteractionChoiceSet SDLPerformInteraction
*/
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLCreateInteractionChoiceSet : SDLRPCRequest
- (instancetype)initWithId:(UInt32)choiceId choiceSet:(NSArray<SDLChoice *> *)choiceSet;
@@ -38,3 +40,5 @@
@property (strong) NSMutableArray<SDLChoice *> *choiceSet;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCreateInteractionChoiceSet.m b/SmartDeviceLink/SDLCreateInteractionChoiceSet.m
index 4f40ee9ce..b84952781 100644
--- a/SmartDeviceLink/SDLCreateInteractionChoiceSet.m
+++ b/SmartDeviceLink/SDLCreateInteractionChoiceSet.m
@@ -7,6 +7,8 @@
#import "SDLChoice.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLCreateInteractionChoiceSet
- (instancetype)init {
@@ -60,3 +62,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteCommand.h b/SmartDeviceLink/SDLDeleteCommand.h
index ed2586d6d..7d5c1cbe3 100644
--- a/SmartDeviceLink/SDLDeleteCommand.h
+++ b/SmartDeviceLink/SDLDeleteCommand.h
@@ -16,6 +16,9 @@
* Since <b>SmartDeviceLink 1.0</b><br>
* see SDLAddCommand SDLAddSubMenu SDLDeleteSubMenu
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteCommand : SDLRPCRequest
- (instancetype)initWithId:(UInt32)commandId;
@@ -29,3 +32,5 @@
@property (strong) NSNumber<SDLInt> *cmdID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteCommand.m b/SmartDeviceLink/SDLDeleteCommand.m
index 9553f2337..8f8528ee4 100644
--- a/SmartDeviceLink/SDLDeleteCommand.m
+++ b/SmartDeviceLink/SDLDeleteCommand.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteCommand
- (instancetype)init {
@@ -38,3 +40,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteFile.h b/SmartDeviceLink/SDLDeleteFile.h
index 8c2188eeb..961e8b01a 100644
--- a/SmartDeviceLink/SDLDeleteFile.h
+++ b/SmartDeviceLink/SDLDeleteFile.h
@@ -12,6 +12,9 @@
* Since <b>SmartDeviceLink 2.0</b><br>
* see SDLPutFile SDLListFiles
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteFile : SDLRPCRequest
- (instancetype)initWithFileName:(NSString *)fileName;
@@ -23,3 +26,5 @@
@property (strong) NSString *syncFileName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteFile.m b/SmartDeviceLink/SDLDeleteFile.m
index d3c2d77c5..3458b3313 100644
--- a/SmartDeviceLink/SDLDeleteFile.m
+++ b/SmartDeviceLink/SDLDeleteFile.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteFile
- (instancetype)init {
@@ -38,3 +40,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h b/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h
index 2504e633c..9beb61ffb 100644
--- a/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h
+++ b/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h
@@ -18,6 +18,9 @@
* Since <b>SmartDeviceLink 1.0</b><br>
* see SDLCreateInteractionChoiceSet SDLPerformInteraction
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteInteractionChoiceSet : SDLRPCRequest
- (instancetype)initWithId:(UInt32)choiceId;
@@ -31,3 +34,5 @@
@property (strong) NSNumber<SDLInt> *interactionChoiceSetID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m b/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m
index cef6bdf82..145d6b721 100644
--- a/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m
+++ b/SmartDeviceLink/SDLDeleteInteractionChoiceSet.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteInteractionChoiceSet
- (instancetype)init {
@@ -38,3 +40,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteSubMenu.h b/SmartDeviceLink/SDLDeleteSubMenu.h
index e1233f5c5..daf04970d 100644
--- a/SmartDeviceLink/SDLDeleteSubMenu.h
+++ b/SmartDeviceLink/SDLDeleteSubMenu.h
@@ -16,6 +16,9 @@
* Since <b>SmartDeviceLink 1.0</b><br>
* see SDLAddCommand SDLAddSubMenu SDLDeleteCommand
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteSubMenu : SDLRPCRequest
- (instancetype)initWithId:(UInt32)menuId;
@@ -27,3 +30,5 @@
@property (strong) NSNumber<SDLInt> *menuID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteSubMenu.m b/SmartDeviceLink/SDLDeleteSubMenu.m
index b167d16f9..0e8a4427e 100644
--- a/SmartDeviceLink/SDLDeleteSubMenu.m
+++ b/SmartDeviceLink/SDLDeleteSubMenu.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteSubMenu
- (instancetype)init {
@@ -38,3 +40,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDiagnosticMessage.h b/SmartDeviceLink/SDLDiagnosticMessage.h
index 157578406..8c792050f 100644
--- a/SmartDeviceLink/SDLDiagnosticMessage.h
+++ b/SmartDeviceLink/SDLDiagnosticMessage.h
@@ -9,6 +9,9 @@
*
* @since SDL 3.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDiagnosticMessage : SDLRPCRequest
- (instancetype)initWithTargetId:(UInt16)targetId length:(UInt16)length data:(NSArray<NSNumber<SDLInt> *> *)data;
@@ -35,3 +38,5 @@
@property (strong) NSMutableArray<NSNumber<SDLInt> *> *messageData;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDiagnosticMessage.m b/SmartDeviceLink/SDLDiagnosticMessage.m
index e1189a090..0cf8d0831 100644
--- a/SmartDeviceLink/SDLDiagnosticMessage.m
+++ b/SmartDeviceLink/SDLDiagnosticMessage.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDiagnosticMessage
- (instancetype)init {
@@ -64,3 +66,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDialNumber.h b/SmartDeviceLink/SDLDialNumber.h
index a2b3bc474..292ab7adc 100644
--- a/SmartDeviceLink/SDLDialNumber.h
+++ b/SmartDeviceLink/SDLDialNumber.h
@@ -9,6 +9,9 @@
@since SDL 4.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDialNumber : SDLRPCRequest
- (instancetype)initWithNumber:(NSString *)number;
@@ -19,3 +22,5 @@
@property (strong, nonatomic) NSString *number;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEncodedSyncPData.h b/SmartDeviceLink/SDLEncodedSyncPData.h
index 65f5038f8..99e543f7c 100644
--- a/SmartDeviceLink/SDLEncodedSyncPData.h
+++ b/SmartDeviceLink/SDLEncodedSyncPData.h
@@ -4,8 +4,12 @@
#import "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLEncodedSyncPData : SDLRPCRequest
@property (strong) NSMutableArray<NSString *> *data;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEncodedSyncPData.m b/SmartDeviceLink/SDLEncodedSyncPData.m
index 7cc9d75c5..801a69372 100644
--- a/SmartDeviceLink/SDLEncodedSyncPData.m
+++ b/SmartDeviceLink/SDLEncodedSyncPData.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLEncodedSyncPData
- (instancetype)init {
@@ -27,3 +29,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEndAudioPassThru.h b/SmartDeviceLink/SDLEndAudioPassThru.h
index 6c5d82914..f3c87e0f1 100644
--- a/SmartDeviceLink/SDLEndAudioPassThru.h
+++ b/SmartDeviceLink/SDLEndAudioPassThru.h
@@ -14,6 +14,11 @@
* Since <b>SmartDeviceLink 2.0</b><br>
* see SDLPerformAudioPassThru
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLEndAudioPassThru : SDLRPCRequest
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEndAudioPassThru.m b/SmartDeviceLink/SDLEndAudioPassThru.m
index 8045a6a98..56886e8ff 100644
--- a/SmartDeviceLink/SDLEndAudioPassThru.m
+++ b/SmartDeviceLink/SDLEndAudioPassThru.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLEndAudioPassThru
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetDTCs.h b/SmartDeviceLink/SDLGetDTCs.h
index 6d60747ed..290ab3a2b 100644
--- a/SmartDeviceLink/SDLGetDTCs.h
+++ b/SmartDeviceLink/SDLGetDTCs.h
@@ -13,6 +13,9 @@
* <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
* <p>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGetDTCs : SDLRPCRequest
- (instancetype)initWithECUName:(UInt16)name;
@@ -30,5 +33,7 @@
/**
* @abstract DTC Mask Byte to be sent in diagnostic request to module. NSNumber* dtcMask Minvalue:0; Maxvalue:255
*/
-@property (strong) NSNumber<SDLInt> *dtcMask;
+@property (nullable, strong) NSNumber<SDLInt> *dtcMask;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetDTCs.m b/SmartDeviceLink/SDLGetDTCs.m
index 03d0b1844..36a518252 100644
--- a/SmartDeviceLink/SDLGetDTCs.m
+++ b/SmartDeviceLink/SDLGetDTCs.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGetDTCs
- (instancetype)init {
@@ -48,7 +50,7 @@
return [parameters objectForKey:SDLNameECUName];
}
-- (void)setDtcMask:(NSNumber<SDLInt> *)dtcMask {
+- (void)setDtcMask:(nullable NSNumber<SDLInt> *)dtcMask {
if (dtcMask != nil) {
[parameters setObject:dtcMask forKey:SDLNameDTCMask];
} else {
@@ -56,8 +58,10 @@
}
}
-- (NSNumber<SDLInt> *)dtcMask {
+- (nullable NSNumber<SDLInt> *)dtcMask {
return [parameters objectForKey:SDLNameDTCMask];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink/SDLGetVehicleData.h
index 65308786d..a64383c56 100644
--- a/SmartDeviceLink/SDLGetVehicleData.h
+++ b/SmartDeviceLink/SDLGetVehicleData.h
@@ -15,114 +15,119 @@
* Since SmartDeviceLink 2.0<br/>
* See SDLSubscribeVehicleData SDLUnsubscribeVehicleData
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGetVehicleData : SDLRPCRequest
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus;
/**
* @abstract A boolean value. If true, requests Gps data
*/
-@property (strong) NSNumber<SDLBool> *gps;
+@property (nullable, strong) NSNumber<SDLBool> *gps;
/**
* @abstract A boolean value. If true, requests speed data
*/
-@property (strong) NSNumber<SDLBool> *speed;
+@property (nullable, strong) NSNumber<SDLBool> *speed;
/**
* @abstract A boolean value. If true, requests rpm data
*/
-@property (strong) NSNumber<SDLBool> *rpm;
+@property (nullable, strong) NSNumber<SDLBool> *rpm;
/**
* @abstract A boolean value. If true, requests FuelLevel data
*/
-@property (strong) NSNumber<SDLBool> *fuelLevel;
+@property (nullable, strong) NSNumber<SDLBool> *fuelLevel;
/**
* @abstract A boolean value. If true, requests fuelLevel_State data
*/
-@property (strong) NSNumber<SDLBool> *fuelLevel_State;
+@property (nullable, strong) NSNumber<SDLBool> *fuelLevel_State;
/**
* @abstract A boolean value. If true, requests instantFuelConsumption data
*/
-@property (strong) NSNumber<SDLBool> *instantFuelConsumption;
+@property (nullable, strong) NSNumber<SDLBool> *instantFuelConsumption;
/**
* @abstract A boolean value. If true, requests externalTemperature data
*/
-@property (strong) NSNumber<SDLBool> *externalTemperature;
+@property (nullable, strong) NSNumber<SDLBool> *externalTemperature;
/**
* @abstract A boolean value. If true, requests Vehicle Identification Number
*/
-@property (strong) NSNumber<SDLBool> *vin;
+@property (nullable, strong) NSNumber<SDLBool> *vin;
/**
* @abstract A boolean value. If true, requests Currently selected gear data
*/
-@property (strong) NSNumber<SDLBool> *prndl;
+@property (nullable, strong) NSNumber<SDLBool> *prndl;
/**
* @abstract A boolean value. If true, requests tire pressure status data
*/
-@property (strong) NSNumber<SDLBool> *tirePressure;
+@property (nullable, strong) NSNumber<SDLBool> *tirePressure;
/**
* @abstract A boolean value. If true, requests odometer data
*/
-@property (strong) NSNumber<SDLBool> *odometer;
+@property (nullable, strong) NSNumber<SDLBool> *odometer;
/**
* @abstract A boolean value. If true, requests belt Status data
*/
-@property (strong) NSNumber<SDLBool> *beltStatus;
+@property (nullable, strong) NSNumber<SDLBool> *beltStatus;
/**
* @abstract A boolean value. If true, requests body Information data
*/
-@property (strong) NSNumber<SDLBool> *bodyInformation;
+@property (nullable, strong) NSNumber<SDLBool> *bodyInformation;
/**
* @abstract A boolean value. If true, requests device Status data
*/
-@property (strong) NSNumber<SDLBool> *deviceStatus;
+@property (nullable, strong) NSNumber<SDLBool> *deviceStatus;
/**
* @abstract A boolean value. If true, requests driver Braking data
*/
-@property (strong) NSNumber<SDLBool> *driverBraking;
+@property (nullable, strong) NSNumber<SDLBool> *driverBraking;
/**
* @abstract A boolean value. If true, requests wiper Status data
*/
-@property (strong) NSNumber<SDLBool> *wiperStatus;
+@property (nullable, strong) NSNumber<SDLBool> *wiperStatus;
/**
* @abstract A boolean value. If true, requests Head Lamp Status data
*/
-@property (strong) NSNumber<SDLBool> *headLampStatus;
+@property (nullable, strong) NSNumber<SDLBool> *headLampStatus;
/**
* @abstract A boolean value. If true, requests Engine Torque data
*/
-@property (strong) NSNumber<SDLBool> *engineTorque;
+@property (nullable, strong) NSNumber<SDLBool> *engineTorque;
/**
* @abstract A boolean value. If true, means the accPedalPosition data has been
* subscribed.
*/
-@property (strong) NSNumber<SDLBool> *accPedalPosition;
+@property (nullable, strong) NSNumber<SDLBool> *accPedalPosition;
/**
* @abstract A boolean value. If true, means the steeringWheelAngle data has been
* subscribed.
*/
-@property (strong) NSNumber<SDLBool> *steeringWheelAngle;
-@property (strong) NSNumber<SDLBool> *eCallInfo;
-@property (strong) NSNumber<SDLBool> *airbagStatus;
-@property (strong) NSNumber<SDLBool> *emergencyEvent;
-@property (strong) NSNumber<SDLBool> *clusterModeStatus;
-@property (strong) NSNumber<SDLBool> *myKey;
+@property (nullable, strong) NSNumber<SDLBool> *steeringWheelAngle;
+@property (nullable, strong) NSNumber<SDLBool> *eCallInfo;
+@property (nullable, strong) NSNumber<SDLBool> *airbagStatus;
+@property (nullable, strong) NSNumber<SDLBool> *emergencyEvent;
+@property (nullable, strong) NSNumber<SDLBool> *clusterModeStatus;
+@property (nullable, strong) NSNumber<SDLBool> *myKey;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetVehicleData.m b/SmartDeviceLink/SDLGetVehicleData.m
index f6074f0d3..da405b64c 100644
--- a/SmartDeviceLink/SDLGetVehicleData.m
+++ b/SmartDeviceLink/SDLGetVehicleData.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGetVehicleData
- (instancetype)init {
@@ -49,7 +51,7 @@
return self;
}
-- (void)setGps:(NSNumber<SDLBool> *)gps {
+- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -57,11 +59,11 @@
}
}
-- (NSNumber<SDLBool> *)gps {
+- (nullable NSNumber<SDLBool> *)gps {
return [parameters objectForKey:SDLNameGPS];
}
-- (void)setSpeed:(NSNumber<SDLBool> *)speed {
+- (void)setSpeed:(nullable NSNumber<SDLBool> *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -69,11 +71,11 @@
}
}
-- (NSNumber<SDLBool> *)speed {
+- (nullable NSNumber<SDLBool> *)speed {
return [parameters objectForKey:SDLNameSpeed];
}
-- (void)setRpm:(NSNumber<SDLBool> *)rpm {
+- (void)setRpm:(nullable NSNumber<SDLBool> *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -81,11 +83,11 @@
}
}
-- (NSNumber<SDLBool> *)rpm {
+- (nullable NSNumber<SDLBool> *)rpm {
return [parameters objectForKey:SDLNameRPM];
}
-- (void)setFuelLevel:(NSNumber<SDLBool> *)fuelLevel {
+- (void)setFuelLevel:(nullable NSNumber<SDLBool> *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -93,11 +95,11 @@
}
}
-- (NSNumber<SDLBool> *)fuelLevel {
+- (nullable NSNumber<SDLBool> *)fuelLevel {
return [parameters objectForKey:SDLNameFuelLevel];
}
-- (void)setFuelLevel_State:(NSNumber<SDLBool> *)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable NSNumber<SDLBool> *)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -105,11 +107,11 @@
}
}
-- (NSNumber<SDLBool> *)fuelLevel_State {
+- (nullable NSNumber<SDLBool> *)fuelLevel_State {
return [parameters objectForKey:SDLNameFuelLevelState];
}
-- (void)setInstantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -117,11 +119,11 @@
}
}
-- (NSNumber<SDLBool> *)instantFuelConsumption {
+- (nullable NSNumber<SDLBool> *)instantFuelConsumption {
return [parameters objectForKey:SDLNameInstantFuelConsumption];
}
-- (void)setExternalTemperature:(NSNumber<SDLBool> *)externalTemperature {
+- (void)setExternalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -129,11 +131,11 @@
}
}
-- (NSNumber<SDLBool> *)externalTemperature {
+- (nullable NSNumber<SDLBool> *)externalTemperature {
return [parameters objectForKey:SDLNameExternalTemperature];
}
-- (void)setVin:(NSNumber<SDLBool> *)vin {
+- (void)setVin:(nullable NSNumber<SDLBool> *)vin {
if (vin != nil) {
[parameters setObject:vin forKey:SDLNameVIN];
} else {
@@ -141,11 +143,11 @@
}
}
-- (NSNumber<SDLBool> *)vin {
+- (nullable NSNumber<SDLBool> *)vin {
return [parameters objectForKey:SDLNameVIN];
}
-- (void)setPrndl:(NSNumber<SDLBool> *)prndl {
+- (void)setPrndl:(nullable NSNumber<SDLBool> *)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -153,11 +155,11 @@
}
}
-- (NSNumber<SDLBool> *)prndl {
+- (nullable NSNumber<SDLBool> *)prndl {
return [parameters objectForKey:SDLNamePRNDL];
}
-- (void)setTirePressure:(NSNumber<SDLBool> *)tirePressure {
+- (void)setTirePressure:(nullable NSNumber<SDLBool> *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -165,11 +167,11 @@
}
}
-- (NSNumber<SDLBool> *)tirePressure {
+- (nullable NSNumber<SDLBool> *)tirePressure {
return [parameters objectForKey:SDLNameTirePressure];
}
-- (void)setOdometer:(NSNumber<SDLBool> *)odometer {
+- (void)setOdometer:(nullable NSNumber<SDLBool> *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -177,11 +179,11 @@
}
}
-- (NSNumber<SDLBool> *)odometer {
+- (nullable NSNumber<SDLBool> *)odometer {
return [parameters objectForKey:SDLNameOdometer];
}
-- (void)setBeltStatus:(NSNumber<SDLBool> *)beltStatus {
+- (void)setBeltStatus:(nullable NSNumber<SDLBool> *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -189,11 +191,11 @@
}
}
-- (NSNumber<SDLBool> *)beltStatus {
+- (nullable NSNumber<SDLBool> *)beltStatus {
return [parameters objectForKey:SDLNameBeltStatus];
}
-- (void)setBodyInformation:(NSNumber<SDLBool> *)bodyInformation {
+- (void)setBodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -201,11 +203,11 @@
}
}
-- (NSNumber<SDLBool> *)bodyInformation {
+- (nullable NSNumber<SDLBool> *)bodyInformation {
return [parameters objectForKey:SDLNameBodyInformation];
}
-- (void)setDeviceStatus:(NSNumber<SDLBool> *)deviceStatus {
+- (void)setDeviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -213,11 +215,11 @@
}
}
-- (NSNumber<SDLBool> *)deviceStatus {
+- (nullable NSNumber<SDLBool> *)deviceStatus {
return [parameters objectForKey:SDLNameDeviceStatus];
}
-- (void)setDriverBraking:(NSNumber<SDLBool> *)driverBraking {
+- (void)setDriverBraking:(nullable NSNumber<SDLBool> *)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -225,11 +227,11 @@
}
}
-- (NSNumber<SDLBool> *)driverBraking {
+- (nullable NSNumber<SDLBool> *)driverBraking {
return [parameters objectForKey:SDLNameDriverBraking];
}
-- (void)setWiperStatus:(NSNumber<SDLBool> *)wiperStatus {
+- (void)setWiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -237,11 +239,11 @@
}
}
-- (NSNumber<SDLBool> *)wiperStatus {
+- (nullable NSNumber<SDLBool> *)wiperStatus {
return [parameters objectForKey:SDLNameWiperStatus];
}
-- (void)setHeadLampStatus:(NSNumber<SDLBool> *)headLampStatus {
+- (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -249,11 +251,11 @@
}
}
-- (NSNumber<SDLBool> *)headLampStatus {
+- (nullable NSNumber<SDLBool> *)headLampStatus {
return [parameters objectForKey:SDLNameHeadLampStatus];
}
-- (void)setEngineTorque:(NSNumber<SDLBool> *)engineTorque {
+- (void)setEngineTorque:(nullable NSNumber<SDLBool> *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -261,11 +263,11 @@
}
}
-- (NSNumber<SDLBool> *)engineTorque {
+- (nullable NSNumber<SDLBool> *)engineTorque {
return [parameters objectForKey:SDLNameEngineTorque];
}
-- (void)setAccPedalPosition:(NSNumber<SDLBool> *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -273,11 +275,11 @@
}
}
-- (NSNumber<SDLBool> *)accPedalPosition {
+- (nullable NSNumber<SDLBool> *)accPedalPosition {
return [parameters objectForKey:SDLNameAccelerationPedalPosition];
}
-- (void)setSteeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -285,11 +287,11 @@
}
}
-- (NSNumber<SDLBool> *)steeringWheelAngle {
+- (nullable NSNumber<SDLBool> *)steeringWheelAngle {
return [parameters objectForKey:SDLNameSteeringWheelAngle];
}
-- (void)setECallInfo:(NSNumber<SDLBool> *)eCallInfo {
+- (void)setECallInfo:(nullable NSNumber<SDLBool> *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -297,11 +299,11 @@
}
}
-- (NSNumber<SDLBool> *)eCallInfo {
+- (nullable NSNumber<SDLBool> *)eCallInfo {
return [parameters objectForKey:SDLNameECallInfo];
}
-- (void)setAirbagStatus:(NSNumber<SDLBool> *)airbagStatus {
+- (void)setAirbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -309,11 +311,11 @@
}
}
-- (NSNumber<SDLBool> *)airbagStatus {
+- (nullable NSNumber<SDLBool> *)airbagStatus {
return [parameters objectForKey:SDLNameAirbagStatus];
}
-- (void)setEmergencyEvent:(NSNumber<SDLBool> *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -321,11 +323,11 @@
}
}
-- (NSNumber<SDLBool> *)emergencyEvent {
+- (nullable NSNumber<SDLBool> *)emergencyEvent {
return [parameters objectForKey:SDLNameEmergencyEvent];
}
-- (void)setClusterModeStatus:(NSNumber<SDLBool> *)clusterModeStatus {
+- (void)setClusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus {
if (clusterModeStatus != nil) {
[parameters setObject:clusterModeStatus forKey:SDLNameClusterModeStatus];
} else {
@@ -333,11 +335,11 @@
}
}
-- (NSNumber<SDLBool> *)clusterModeStatus {
+- (nullable NSNumber<SDLBool> *)clusterModeStatus {
return [parameters objectForKey:SDLNameClusterModeStatus];
}
-- (void)setMyKey:(NSNumber<SDLBool> *)myKey {
+- (void)setMyKey:(nullable NSNumber<SDLBool> *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -345,8 +347,10 @@
}
}
-- (NSNumber<SDLBool> *)myKey {
+- (nullable NSNumber<SDLBool> *)myKey {
return [parameters objectForKey:SDLNameMyKey];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetWaypoints.h b/SmartDeviceLink/SDLGetWaypoints.h
index 42c166f7c..2664e4a46 100644
--- a/SmartDeviceLink/SDLGetWaypoints.h
+++ b/SmartDeviceLink/SDLGetWaypoints.h
@@ -5,6 +5,8 @@
#import "SDLWaypointType.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGetWaypoints : SDLRPCRequest
- (instancetype)initWithType:(SDLWaypointType)type;
@@ -18,3 +20,5 @@
@property (strong, nonatomic) SDLWaypointType waypointType;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetWaypoints.m b/SmartDeviceLink/SDLGetWaypoints.m
index e607643c7..bce54f4f8 100644
--- a/SmartDeviceLink/SDLGetWaypoints.m
+++ b/SmartDeviceLink/SDLGetWaypoints.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGetWaypoints
- (instancetype)init {
@@ -38,3 +40,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImage.h b/SmartDeviceLink/SDLImage.h
index c29dd66ce..7f669afab 100644
--- a/SmartDeviceLink/SDLImage.h
+++ b/SmartDeviceLink/SDLImage.h
@@ -10,6 +10,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLImage : SDLRPCStruct
- (instancetype)initWithName:(NSString *)name ofType:(SDLImageType)imageType;
@@ -29,3 +32,5 @@
@property (strong) SDLImageType imageType;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImage.m b/SmartDeviceLink/SDLImage.m
index ccf39cd23..f80f9cd94 100644
--- a/SmartDeviceLink/SDLImage.m
+++ b/SmartDeviceLink/SDLImage.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLImage
- (instancetype)initWithName:(NSString *)name ofType:(SDLImageType)imageType {
@@ -45,3 +47,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLListFiles.h b/SmartDeviceLink/SDLListFiles.h
index 61ae4c03b..28bf706b8 100644
--- a/SmartDeviceLink/SDLListFiles.h
+++ b/SmartDeviceLink/SDLListFiles.h
@@ -11,6 +11,11 @@
*
* Since <b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLListFiles : SDLRPCRequest
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLListFiles.m b/SmartDeviceLink/SDLListFiles.m
index e2beb0a08..3b8c1d57c 100644
--- a/SmartDeviceLink/SDLListFiles.m
+++ b/SmartDeviceLink/SDLListFiles.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLListFiles
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.h b/SmartDeviceLink/SDLPerformAudioPassThru.h
index d94f6797a..de67ae34e 100644
--- a/SmartDeviceLink/SDLPerformAudioPassThru.h
+++ b/SmartDeviceLink/SDLPerformAudioPassThru.h
@@ -21,11 +21,14 @@
* <p>Since SmartDeviceLink 2.0</p>
* <p>See SDLEndAudioPassThru</p>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPerformAudioPassThru : SDLRPCRequest
- (instancetype)initWithSamplingRate:(SDLSamplingRate)samplingRate bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType maxDuration:(UInt32)maxDuration;
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType maxDuration:(UInt32)maxDuration muteAudio:(BOOL)muteAudio;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt audioPassThruDisplayText1:(nullable NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(nullable NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType maxDuration:(UInt32)maxDuration muteAudio:(BOOL)muteAudio;
/**
* @abstract initial prompt which will be spoken before opening the audio pass
@@ -44,7 +47,7 @@
* <li>Array Maxsize: 100</li>
* </ul>
*/
-@property (strong) NSMutableArray<SDLTTSChunk *> *initialPrompt;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *initialPrompt;
/**
* @abstract a line of text displayed during audio capture
* @discussion audioPassThruDisplayText1
@@ -53,7 +56,7 @@
* <p>
* <b>Notes: </b>Maxlength=500
*/
-@property (strong) NSString *audioPassThruDisplayText1;
+@property (nullable, strong) NSString *audioPassThruDisplayText1;
/**
* @abstract A line of text displayed during audio capture
* @discussion audioPassThruDisplayText2
@@ -62,7 +65,7 @@
* <p>
* <b>Notes: </b>Maxlength=500
*/
-@property (strong) NSString *audioPassThruDisplayText2;
+@property (nullable, strong) NSString *audioPassThruDisplayText2;
/**
* @abstract A samplingRate
*
@@ -93,6 +96,8 @@
* @abstract a Boolean value representing if the current audio source should be
* muted during the APT session<br/>
*/
-@property (strong) NSNumber<SDLBool> *muteAudio;
+@property (nullable, strong) NSNumber<SDLBool> *muteAudio;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.m b/SmartDeviceLink/SDLPerformAudioPassThru.m
index 20282f5c5..82d43a1ce 100644
--- a/SmartDeviceLink/SDLPerformAudioPassThru.m
+++ b/SmartDeviceLink/SDLPerformAudioPassThru.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLTTSChunk.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPerformAudioPassThru
- (instancetype)init {
@@ -15,7 +17,7 @@
return self;
}
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType maxDuration:(UInt32)maxDuration muteAudio:(BOOL)muteAudio {
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt audioPassThruDisplayText1:(nullable NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(nullable NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType maxDuration:(UInt32)maxDuration muteAudio:(BOOL)muteAudio {
self = [self initWithSamplingRate:samplingRate bitsPerSample:bitsPerSample audioType:audioType maxDuration:maxDuration];
if (!self) {
return nil;
@@ -43,7 +45,7 @@
return self;
}
-- (void)setInitialPrompt:(NSMutableArray<SDLTTSChunk *> *)initialPrompt {
+- (void)setInitialPrompt:(nullable NSMutableArray<SDLTTSChunk *> *)initialPrompt {
if (initialPrompt != nil) {
[parameters setObject:initialPrompt forKey:SDLNameInitialPrompt];
} else {
@@ -51,7 +53,7 @@
}
}
-- (NSMutableArray<SDLTTSChunk *> *)initialPrompt {
+- (nullable NSMutableArray<SDLTTSChunk *> *)initialPrompt {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameInitialPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -64,7 +66,7 @@
}
}
-- (void)setAudioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 {
+- (void)setAudioPassThruDisplayText1:(nullable NSString *)audioPassThruDisplayText1 {
if (audioPassThruDisplayText1 != nil) {
[parameters setObject:audioPassThruDisplayText1 forKey:SDLNameAudioPassThruDisplayText1];
} else {
@@ -72,11 +74,11 @@
}
}
-- (NSString *)audioPassThruDisplayText1 {
+- (nullable NSString *)audioPassThruDisplayText1 {
return [parameters objectForKey:SDLNameAudioPassThruDisplayText1];
}
-- (void)setAudioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 {
+- (void)setAudioPassThruDisplayText2:(nullable NSString *)audioPassThruDisplayText2 {
if (audioPassThruDisplayText2 != nil) {
[parameters setObject:audioPassThruDisplayText2 forKey:SDLNameAudioPassThruDisplayText2];
} else {
@@ -84,7 +86,7 @@
}
}
-- (NSString *)audioPassThruDisplayText2 {
+- (nullable NSString *)audioPassThruDisplayText2 {
return [parameters objectForKey:SDLNameAudioPassThruDisplayText2];
}
@@ -139,7 +141,7 @@
return (SDLAudioType)obj;
}
-- (void)setMuteAudio:(NSNumber<SDLBool> *)muteAudio {
+- (void)setMuteAudio:(nullable NSNumber<SDLBool> *)muteAudio {
if (muteAudio != nil) {
[parameters setObject:muteAudio forKey:SDLNameMuteAudio];
} else {
@@ -147,8 +149,10 @@
}
}
-- (NSNumber<SDLBool> *)muteAudio {
+- (nullable NSNumber<SDLBool> *)muteAudio {
return [parameters objectForKey:SDLNameMuteAudio];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink/SDLPerformInteraction.h
index b0071e0ae..8e3cb8c0e 100644
--- a/SmartDeviceLink/SDLPerformInteraction.h
+++ b/SmartDeviceLink/SDLPerformInteraction.h
@@ -25,21 +25,24 @@
* Since SmartDeviceLink 1.0<br/>
* See SDLCreateInteractionChoiceSet SDLDeleteInteractionChoiceSet
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPerformInteraction : SDLRPCRequest
- (instancetype)initWithInteractionChoiceSetId:(UInt16)interactionChoiceSetId;
- (instancetype)initWithInteractionChoiceSetIdList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIdList;
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID;
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout;
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
-- (instancetype)initWithInitialChunks:(NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpChunks:(NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp;
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
/**
* @abstract The Text that Displayed when the interaction begins. This text may
@@ -52,7 +55,7 @@
* @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 (strong) NSMutableArray<SDLTTSChunk *> *initialPrompt;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *initialPrompt;
/**
* @abstract The Indicates mode that indicate how user selects interaction
* choice. User can choose either by voice (VR_ONLY), by visual selection
@@ -68,23 +71,25 @@
* @abstract A Vector<TTSChunk> which taken together, specify the help phrase to
* be spoken when the user says "help" during the VR session
*/
-@property (strong) NSMutableArray<SDLTTSChunk *> *helpPrompt;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *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 (strong) NSMutableArray<SDLTTSChunk *> *timeoutPrompt;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *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)
*/
-@property (strong) NSNumber<SDLInt> *timeout;
+@property (nullable, strong) NSNumber<SDLInt> *timeout;
/**
* @abstract A Voice recognition Help, which is a suggested VR Help Items to
* display on-screen during Perform Interaction
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSMutableArray<SDLVRHelpItem *> *vrHelp;
-@property (strong) SDLLayoutMode interactionLayout;
+@property (nullable, strong) NSMutableArray<SDLVRHelpItem *> *vrHelp;
+@property (nullable, strong) SDLLayoutMode interactionLayout;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m
index 1c98c64b5..9574d9690 100644
--- a/SmartDeviceLink/SDLPerformInteraction.m
+++ b/SmartDeviceLink/SDLPerformInteraction.m
@@ -9,7 +9,7 @@
#import "SDLTTSChunkFactory.h"
#import "SDLVRHelpItem.h"
-static UInt16 const SDLDefaultTimeout = 10000;
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLPerformInteraction
@@ -23,26 +23,41 @@ static UInt16 const SDLDefaultTimeout = 10000;
return [self initWithInteractionChoiceSetIdList:@[@(interactionChoiceSetId)]];
}
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID {
- return [self initWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetID:interactionChoiceSetID vrHelp:nil];
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID {
+ self = [self initWithInteractionChoiceSetId:interactionChoiceSetID];
+ if (!self) {
+ return nil;
+ }
+
+ self.initialPrompt = [SDLTTSChunk textChunksFromString:initialPrompt];
+ self.initialText = initialText;
+
+ return self;
}
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp {
- return [self initWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetIDList:@[@(interactionChoiceSetID)] helpPrompt:nil timeoutPrompt:nil interactionMode:nil timeout:SDLDefaultTimeout vrHelp:vrHelp];
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(UInt16)interactionChoiceSetID vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp {
+ self = [self initWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetID:interactionChoiceSetID];
+ if (!self) {
+ return nil;
+ }
+
+ self.vrHelp = [vrHelp mutableCopy];
+
+ return self;
}
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout {
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout {
return [self initWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpPrompt:helpPrompt timeoutPrompt:timeoutPrompt interactionMode:interactionMode timeout:timeout vrHelp:nil];
}
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp {
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp {
NSMutableArray *initialChunks = [SDLTTSChunk textChunksFromString:initialPrompt];
NSMutableArray *helpChunks = [SDLTTSChunk textChunksFromString:helpPrompt];
NSMutableArray *timeoutChunks = [SDLTTSChunk textChunksFromString:timeoutPrompt];
return [self initWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:helpChunks timeoutChunks:timeoutChunks interactionMode:interactionMode timeout:timeout vrHelp:vrHelp];
}
-- (instancetype)initWithInitialChunks:(NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpChunks:(NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp {
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt16)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp {
self = [self initWithInteractionChoiceSetIdList:interactionChoiceSetIDList];
if (!self) {
return nil;
@@ -82,7 +97,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
return [parameters objectForKey:SDLNameInitialText];
}
-- (void)setInitialPrompt:(NSMutableArray<SDLTTSChunk *> *)initialPrompt {
+- (void)setInitialPrompt:(nullable NSMutableArray<SDLTTSChunk *> *)initialPrompt {
if (initialPrompt != nil) {
[parameters setObject:initialPrompt forKey:SDLNameInitialPrompt];
} else {
@@ -90,7 +105,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (NSMutableArray<SDLTTSChunk *> *)initialPrompt {
+- (nullable NSMutableArray<SDLTTSChunk *> *)initialPrompt {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameInitialPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -128,7 +143,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
return [parameters objectForKey:SDLNameInteractionChoiceSetIdList];
}
-- (void)setHelpPrompt:(NSMutableArray<SDLTTSChunk *> *)helpPrompt {
+- (void)setHelpPrompt:(nullable NSMutableArray<SDLTTSChunk *> *)helpPrompt {
if (helpPrompt != nil) {
[parameters setObject:helpPrompt forKey:SDLNameHelpPrompt];
} else {
@@ -136,7 +151,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (NSMutableArray<SDLTTSChunk *> *)helpPrompt {
+- (nullable NSMutableArray<SDLTTSChunk *> *)helpPrompt {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameHelpPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -149,7 +164,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (void)setTimeoutPrompt:(NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
+- (void)setTimeoutPrompt:(nullable NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
if (timeoutPrompt != nil) {
[parameters setObject:timeoutPrompt forKey:SDLNameTimeoutPrompt];
} else {
@@ -157,7 +172,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
+- (nullable NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameTimeoutPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -170,7 +185,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (void)setTimeout:(NSNumber<SDLInt> *)timeout {
+- (void)setTimeout:(nullable NSNumber<SDLInt> *)timeout {
if (timeout != nil) {
[parameters setObject:timeout forKey:SDLNameTimeout];
} else {
@@ -178,11 +193,11 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (NSNumber<SDLInt> *)timeout {
+- (nullable NSNumber<SDLInt> *)timeout {
return [parameters objectForKey:SDLNameTimeout];
}
-- (void)setVrHelp:(NSMutableArray<SDLVRHelpItem *> *)vrHelp {
+- (void)setVrHelp:(nullable NSMutableArray<SDLVRHelpItem *> *)vrHelp {
if (vrHelp != nil) {
[parameters setObject:vrHelp forKey:SDLNameVRHelp];
} else {
@@ -190,7 +205,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (NSMutableArray<SDLVRHelpItem *> *)vrHelp {
+- (nullable NSMutableArray<SDLVRHelpItem *> *)vrHelp {
NSMutableArray<SDLVRHelpItem *> *array = [parameters objectForKey:SDLNameVRHelp];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRHelpItem.class]) {
return array;
@@ -203,7 +218,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (void)setInteractionLayout:(SDLLayoutMode)interactionLayout {
+- (void)setInteractionLayout:(nullable SDLLayoutMode)interactionLayout {
if (interactionLayout != nil) {
[parameters setObject:interactionLayout forKey:SDLNameInteractionLayout];
} else {
@@ -211,9 +226,11 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (SDLLayoutMode)interactionLayout {
+- (nullable SDLLayoutMode)interactionLayout {
NSObject *obj = [parameters objectForKey:SDLNameInteractionLayout];
return (SDLLayoutMode)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPutFile.h b/SmartDeviceLink/SDLPutFile.h
index 390531292..12cec17e6 100644
--- a/SmartDeviceLink/SDLPutFile.h
+++ b/SmartDeviceLink/SDLPutFile.h
@@ -13,6 +13,9 @@
* @see SDLDeleteFile
* @see SDLListFiles
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPutFile : SDLRPCRequest
- (instancetype)initWithFileName:(NSString *)fileName fileType:(SDLFileType)fileType;
@@ -46,27 +49,29 @@
*
* Boolean, Optional, default = NO
*/
-@property (strong) NSNumber<SDLBool> *persistentFile;
+@property (nullable, strong) NSNumber<SDLBool> *persistentFile;
/**
* Indicates if the file is meant to be passed through core to elsewhere on the system. If set to TRUE, then the system will instead pass the data thru as it arrives to a predetermined area outside of core.
*
* Boolean, Optional, default = NO
*/
-@property (strong) NSNumber<SDLBool> *systemFile;
+@property (nullable, strong) NSNumber<SDLBool> *systemFile;
/**
* Offset in bytes for resuming partial data chunks.
*
* Integer, Optional, 0 - 100,000,000,000
*/
-@property (strong) NSNumber<SDLUInt> *offset;
+@property (nullable, strong) NSNumber<SDLUInt> *offset;
/**
* Length in bytes for resuming partial data chunks. If offset is set to 0, then length is the total length of the file to be downloaded
*
* Integer, Optional, 0 - 100,000,000,000
*/
-@property (strong) NSNumber<SDLUInt> *length;
+@property (nullable, strong) NSNumber<SDLUInt> *length;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPutFile.m b/SmartDeviceLink/SDLPutFile.m
index b004b500b..0a92f8321 100644
--- a/SmartDeviceLink/SDLPutFile.m
+++ b/SmartDeviceLink/SDLPutFile.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPutFile
- (instancetype)init {
@@ -74,7 +76,7 @@
return (SDLFileType)obj;
}
-- (void)setPersistentFile:(NSNumber<SDLBool> *)persistentFile {
+- (void)setPersistentFile:(nullable NSNumber<SDLBool> *)persistentFile {
if (persistentFile != nil) {
[parameters setObject:persistentFile forKey:SDLNamePersistentFile];
} else {
@@ -82,11 +84,11 @@
}
}
-- (NSNumber<SDLBool> *)persistentFile {
+- (nullable NSNumber<SDLBool> *)persistentFile {
return [parameters objectForKey:SDLNamePersistentFile];
}
-- (void)setSystemFile:(NSNumber<SDLBool> *)systemFile {
+- (void)setSystemFile:(nullable NSNumber<SDLBool> *)systemFile {
if (systemFile != nil) {
[parameters setObject:systemFile forKey:SDLNameSystemFile];
} else {
@@ -94,11 +96,11 @@
}
}
-- (NSNumber<SDLBool> *)systemFile {
+- (nullable NSNumber<SDLBool> *)systemFile {
return [parameters objectForKey:SDLNameSystemFile];
}
-- (void)setOffset:(NSNumber<SDLUInt> *)offset {
+- (void)setOffset:(nullable NSNumber<SDLUInt> *)offset {
if (offset != nil) {
[parameters setObject:offset forKey:SDLNameOffset];
} else {
@@ -106,11 +108,11 @@
}
}
-- (NSNumber<SDLUInt> *)offset {
+- (nullable NSNumber<SDLUInt> *)offset {
return [parameters objectForKey:SDLNameOffset];
}
-- (void)setLength:(NSNumber<SDLUInt> *)length {
+- (void)setLength:(nullable NSNumber<SDLUInt> *)length {
if (length != nil) {
[parameters setObject:length forKey:SDLNameLength];
} else {
@@ -118,8 +120,10 @@
}
}
-- (NSNumber<SDLUInt> *)length {
+- (nullable NSNumber<SDLUInt> *)length {
return [parameters objectForKey:SDLNameLength];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCMessage.h b/SmartDeviceLink/SDLRPCMessage.h
index f098dab51..a9ea45064 100644
--- a/SmartDeviceLink/SDLRPCMessage.h
+++ b/SmartDeviceLink/SDLRPCMessage.h
@@ -5,6 +5,8 @@
#import "SDLRPCStruct.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRPCMessage : SDLRPCStruct {
NSMutableDictionary<NSString *, id> *function;
NSMutableDictionary<NSString *, id> *parameters;
@@ -13,13 +15,15 @@
- (instancetype)initWithName:(NSString *)name;
- (instancetype)initWithDictionary:(NSDictionary<NSString *, id> *)dict;
-- (NSString *)getFunctionName;
-- (void)setFunctionName:(NSString *)functionName;
-- (NSObject *)getParameters:(NSString *)functionName;
-- (void)setParameters:(NSString *)functionName value:(NSObject *)value;
+- (nullable NSString *)getFunctionName;
+- (void)setFunctionName:(nullable NSString *)functionName;
+- (nullable NSObject *)getParameters:(NSString *)functionName;
+- (void)setParameters:(NSString *)functionName value:(nullable NSObject *)value;
-@property (strong) NSData *bulkData;
+@property (nullable, strong) NSData *bulkData;
@property (strong, readonly) NSString *name;
@property (strong, readonly) NSString *messageType;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCMessage.m b/SmartDeviceLink/SDLRPCMessage.m
index 028c99303..d5762c0ce 100644
--- a/SmartDeviceLink/SDLRPCMessage.m
+++ b/SmartDeviceLink/SDLRPCMessage.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCMessage
@synthesize messageType;
@@ -39,11 +41,11 @@
return self;
}
-- (NSString *)getFunctionName {
+- (nullable NSString *)getFunctionName {
return [function objectForKey:SDLNameOperationName];
}
-- (void)setFunctionName:(NSString *)functionName {
+- (void)setFunctionName:(nullable NSString *)functionName {
if (functionName != nil) {
[function setObject:functionName forKey:SDLNameOperationName];
} else {
@@ -51,11 +53,11 @@
}
}
-- (NSObject *)getParameters:(NSString *)functionName {
+- (nullable NSObject *)getParameters:(NSString *)functionName {
return [parameters objectForKey:functionName];
}
-- (void)setParameters:(NSString *)functionName value:(NSObject *)value {
+- (void)setParameters:(NSString *)functionName value:(nullable NSObject *)value {
if (value != nil) {
[parameters setObject:value forKey:functionName];
} else {
@@ -79,3 +81,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCNotification.h b/SmartDeviceLink/SDLRPCNotification.h
index 06f5ac52f..cb5044d6c 100644
--- a/SmartDeviceLink/SDLRPCNotification.h
+++ b/SmartDeviceLink/SDLRPCNotification.h
@@ -4,6 +4,10 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRPCNotification : SDLRPCMessage
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCNotification.m b/SmartDeviceLink/SDLRPCNotification.m
index 22f53b7d3..7aa6ef9ef 100644
--- a/SmartDeviceLink/SDLRPCNotification.m
+++ b/SmartDeviceLink/SDLRPCNotification.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCNotification
- (instancetype)initWithName:(NSString *)name {
@@ -33,3 +35,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCPayload.h b/SmartDeviceLink/SDLRPCPayload.h
index 1a490d956..d71492a21 100644
--- a/SmartDeviceLink/SDLRPCPayload.h
+++ b/SmartDeviceLink/SDLRPCPayload.h
@@ -6,16 +6,19 @@
#import "SDLRPCMessageType.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLRPCPayload : NSObject
@property (assign) SDLRPCMessageType rpcType;
@property (assign) UInt32 functionID;
@property (assign) UInt32 correlationID;
-@property (strong) NSData *jsonData;
-@property (strong) NSData *binaryData;
+@property (nullable, strong) NSData *jsonData;
+@property (nullable, strong) NSData *binaryData;
- (NSData *)data;
-+ (id)rpcPayloadWithData:(NSData *)data;
++ (nullable id)rpcPayloadWithData:(NSData *)data;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCPayload.m b/SmartDeviceLink/SDLRPCPayload.m
index 90c09175b..36bce9076 100644
--- a/SmartDeviceLink/SDLRPCPayload.m
+++ b/SmartDeviceLink/SDLRPCPayload.m
@@ -8,9 +8,11 @@
const NSUInteger RPC_HEADER_SIZE = 12;
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCPayload
-- (instancetype)initWithData:(NSData *)data {
+- (nullable instancetype)initWithData:(NSData *)data {
unsigned long dataLength = data.length;
if (data == nil || dataLength == 0) {
@@ -108,7 +110,9 @@ const NSUInteger RPC_HEADER_SIZE = 12;
return description;
}
-+ (id)rpcPayloadWithData:(NSData *)data {
++ (nullable id)rpcPayloadWithData:(NSData *)data {
return [[SDLRPCPayload alloc] initWithData:data];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCRequest.h b/SmartDeviceLink/SDLRPCRequest.h
index fe7fb639d..a19884561 100644
--- a/SmartDeviceLink/SDLRPCRequest.h
+++ b/SmartDeviceLink/SDLRPCRequest.h
@@ -4,8 +4,12 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRPCRequest : SDLRPCMessage
-@property (strong) NSNumber<SDLInt> *correlationID;
+@property (nullable, strong) NSNumber<SDLInt> *correlationID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCRequest.m b/SmartDeviceLink/SDLRPCRequest.m
index 3ccdbc0c6..28c1a5bf4 100644
--- a/SmartDeviceLink/SDLRPCRequest.m
+++ b/SmartDeviceLink/SDLRPCRequest.m
@@ -6,13 +6,15 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCRequest
-- (NSNumber<SDLInt> *)correlationID {
+- (nullable NSNumber<SDLInt> *)correlationID {
return [function objectForKey:SDLNameCorrelationId];
}
-- (void)setCorrelationID:(NSNumber<SDLInt> *)corrID {
+- (void)setCorrelationID:(nullable NSNumber<SDLInt> *)corrID {
if (corrID != nil) {
[function setObject:corrID forKey:SDLNameCorrelationId];
} else {
@@ -21,3 +23,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCResponse.h b/SmartDeviceLink/SDLRPCResponse.h
index 92d573cdf..53e000c82 100644
--- a/SmartDeviceLink/SDLRPCResponse.h
+++ b/SmartDeviceLink/SDLRPCResponse.h
@@ -6,11 +6,15 @@
#import "SDLResult.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRPCResponse : SDLRPCMessage
-@property (strong) NSNumber<SDLInt> *correlationID;
-@property (strong) NSNumber<SDLBool> *success;
-@property (strong) SDLResult resultCode;
-@property (strong) NSString *info;
+@property (nullable, strong) NSNumber<SDLInt> *correlationID;
+@property (nullable, strong) NSNumber<SDLBool> *success;
+@property (nullable, strong) SDLResult resultCode;
+@property (nullable, strong) NSString *info;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCResponse.m b/SmartDeviceLink/SDLRPCResponse.m
index 10deae928..5fae1a1fa 100644
--- a/SmartDeviceLink/SDLRPCResponse.m
+++ b/SmartDeviceLink/SDLRPCResponse.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLResult.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCResponse
- (instancetype)initWithName:(NSString *)name {
@@ -33,11 +35,11 @@
return self;
}
-- (NSNumber<SDLInt> *)correlationID {
+- (nullable NSNumber<SDLInt> *)correlationID {
return [function objectForKey:SDLNameCorrelationId];
}
-- (void)setCorrelationID:(NSNumber<SDLInt> *)corrID {
+- (void)setCorrelationID:(nullable NSNumber<SDLInt> *)corrID {
if (corrID != nil) {
[function setObject:corrID forKey:SDLNameCorrelationId];
} else {
@@ -45,7 +47,7 @@
}
}
-- (void)setSuccess:(NSNumber<SDLBool> *)success {
+- (void)setSuccess:(nullable NSNumber<SDLBool> *)success {
if (success != nil) {
[parameters setObject:success forKey:SDLNameSuccess];
} else {
@@ -53,11 +55,11 @@
}
}
-- (NSNumber<SDLBool> *)success {
+- (nullable NSNumber<SDLBool> *)success {
return [parameters objectForKey:SDLNameSuccess];
}
-- (void)setResultCode:(SDLResult)resultCode {
+- (void)setResultCode:(nullable SDLResult)resultCode {
if (resultCode != nil) {
[parameters setObject:resultCode forKey:SDLNameResultCode];
} else {
@@ -65,12 +67,12 @@
}
}
-- (SDLResult)resultCode {
+- (nullable SDLResult)resultCode {
NSObject *obj = [parameters objectForKey:SDLNameResultCode];
return (SDLResult)obj;
}
-- (void)setInfo:(NSString *)info {
+- (void)setInfo:(nullable NSString *)info {
if (info != nil) {
[parameters setObject:info forKey:SDLNameInfo];
} else {
@@ -78,8 +80,10 @@
}
}
-- (NSString *)info {
+- (nullable NSString *)info {
return [parameters objectForKey:SDLNameInfo];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCStruct.h b/SmartDeviceLink/SDLRPCStruct.h
index f69b11dcb..3a6243d21 100644
--- a/SmartDeviceLink/SDLRPCStruct.h
+++ b/SmartDeviceLink/SDLRPCStruct.h
@@ -6,6 +6,8 @@
#import "NSNumber+NumberType.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRPCStruct : NSObject {
NSMutableDictionary<NSString *, id> *store;
}
@@ -16,3 +18,5 @@
- (NSDictionary<NSString *, id> *)serializeAsDictionary:(Byte)version;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCStruct.m b/SmartDeviceLink/SDLRPCStruct.m
index d0be4bffb..4c8b81c29 100644
--- a/SmartDeviceLink/SDLRPCStruct.m
+++ b/SmartDeviceLink/SDLRPCStruct.m
@@ -7,6 +7,8 @@
#import "SDLEnum.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCStruct
- (id)initWithDictionary:(NSDictionary<NSString *, id> *)dict {
@@ -74,3 +76,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLReadDID.h b/SmartDeviceLink/SDLReadDID.h
index 8cb378388..8c3482fa2 100644
--- a/SmartDeviceLink/SDLReadDID.h
+++ b/SmartDeviceLink/SDLReadDID.h
@@ -16,6 +16,9 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLReadDID : SDLRPCRequest
- (instancetype)initWithECUName:(UInt16)ecuNumber didLocation:(NSArray<NSNumber<SDLInt> *> *)didLocation;
@@ -40,3 +43,5 @@
@property (strong) NSMutableArray<NSNumber<SDLInt> *> *didLocation;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLReadDID.m b/SmartDeviceLink/SDLReadDID.m
index 27369aa84..c41ba5a8d 100644
--- a/SmartDeviceLink/SDLReadDID.m
+++ b/SmartDeviceLink/SDLReadDID.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLReadDID
- (instancetype)init {
@@ -51,3 +53,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.h b/SmartDeviceLink/SDLRegisterAppInterface.h
index a670e0746..8781cd820 100644
--- a/SmartDeviceLink/SDLRegisterAppInterface.h
+++ b/SmartDeviceLink/SDLRegisterAppInterface.h
@@ -83,15 +83,18 @@
*
* @see SDLUnregisterAppInterface SDLOnAppInterfaceUnregistered
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRegisterAppInterface : SDLRPCRequest
- (instancetype)initWithLifecycleConfiguration:(SDLLifecycleConfiguration *)lifecycleConfiguration;
- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired;
-- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(NSString *)shortAppName;
+- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(nullable NSString *)shortAppName;
-- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(NSString *)shortAppName ttsName:(NSArray<SDLTTSChunk *> *)ttsName vrSynonyms:(NSArray<NSString *> *)vrSynonyms hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired resumeHash:(NSString *)resumeHash;
+- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(nullable NSString *)shortAppName ttsName:(nullable NSArray<SDLTTSChunk *> *)ttsName vrSynonyms:(nullable NSArray<NSString *> *)vrSynonyms hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired resumeHash:(nullable NSString *)resumeHash;
/**
* @abstract The version of the SDL interface
@@ -127,7 +130,7 @@
* @since SDL 2.0
* @see SDLTTSChunk
*/
-@property (strong) NSMutableArray<SDLTTSChunk *> *ttsName;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *ttsName;
/**
* @abstract A String representing an abbreviated version of the mobile application's name (if necessary) that will be displayed on the media screen
@@ -136,7 +139,7 @@
*
* Optional, Max length 100 chars
*/
-@property (strong) NSString *ngnMediaScreenAppName;
+@property (nullable, strong) NSString *ngnMediaScreenAppName;
/**
* @abstract Defines a additional voice recognition commands
@@ -145,7 +148,7 @@
*
* Optional, Array of Strings, Array length 1 - 100, Max String length 40
*/
-@property (strong) NSMutableArray<NSString *> *vrSynonyms;
+@property (nullable, strong) NSMutableArray<NSString *> *vrSynonyms;
/**
* @abstract Indicates if the application is a media or a non-media application.
@@ -184,7 +187,7 @@
* @since SDL 2.0
* @see SDLAppHMIType
*/
-@property (strong) NSMutableArray<SDLAppHMIType> *appHMIType;
+@property (nullable, strong) NSMutableArray<SDLAppHMIType> *appHMIType;
/**
* @abstract ID used to uniquely identify current state of all app data that can persist through connection cycles (e.g. ignition cycles).
@@ -195,14 +198,14 @@
*
* Optional, max length 100 chars
*/
-@property (strong) NSString *hashID;
+@property (nullable, strong) NSString *hashID;
/**
* @abstract Information about the connecting device
*
* Optional
*/
-@property (strong) SDLDeviceInfo *deviceInfo;
+@property (nullable, strong) SDLDeviceInfo *deviceInfo;
/**
* @abstract ID used to validate app with policy table entries
@@ -218,6 +221,8 @@
*
* Optional
*/
-@property (strong) SDLAppInfo *appInfo;
+@property (nullable, strong) SDLAppInfo *appInfo;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink/SDLRegisterAppInterface.m
index 63ad8fcf2..523af340e 100644
--- a/SmartDeviceLink/SDLRegisterAppInterface.m
+++ b/SmartDeviceLink/SDLRegisterAppInterface.m
@@ -13,6 +13,7 @@
#import "SDLSyncMsgVersion.h"
#import "SDLTTSChunk.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLRegisterAppInterface
@@ -27,37 +28,51 @@
}
- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired {
- return [self initWithAppName:appName appId:appId languageDesired:languageDesired isMediaApp:NO appType:nil shortAppName:nil];
-}
-
-- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(NSString *)shortAppName {
- return [self initWithAppName:appName appId:appId languageDesired:languageDesired isMediaApp:isMediaApp appType:appType shortAppName:shortAppName ttsName:nil vrSynonyms:nil hmiDisplayLanguageDesired:languageDesired resumeHash:nil];
-}
-
-- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(NSString *)shortAppName ttsName:(NSArray<SDLTTSChunk *> *)ttsName vrSynonyms:(NSArray<NSString *> *)vrSynonyms hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired resumeHash:(NSString *)resumeHash {
self = [self init];
if (!self) {
return nil;
}
-
- self.appID = appId;
+
self.appName = appName;
- self.ngnMediaScreenAppName = shortAppName;
+ self.appID = appId;
+ self.languageDesired = languageDesired;
+
+ self.syncMsgVersion = [[SDLSyncMsgVersion alloc] initWithMajorVersion:1 minorVersion:0];
+ self.appInfo = [SDLAppInfo currentAppInfo];
+ self.deviceInfo = [SDLDeviceInfo currentDevice];
+ self.correlationID = @1;
+
+ return self;
+
+}
+
+- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(nullable NSString *)shortAppName {
+ self = [self initWithAppName:appName appId:appId languageDesired:languageDesired];
+ if (!self) {
+ return nil;
+ }
+
+ self.isMediaApplication = @(isMediaApp);
if (appType != nil) {
self.appHMIType = [NSMutableArray arrayWithObject:appType];
}
+
+ self.ngnMediaScreenAppName = shortAppName;
+
+ return self;
+}
+
+- (instancetype)initWithAppName:(NSString *)appName appId:(NSString *)appId languageDesired:(SDLLanguage)languageDesired isMediaApp:(BOOL)isMediaApp appType:(SDLAppHMIType)appType shortAppName:(nullable NSString *)shortAppName ttsName:(nullable NSArray<SDLTTSChunk *> *)ttsName vrSynonyms:(nullable NSArray<NSString *> *)vrSynonyms hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired resumeHash:(nullable NSString *)resumeHash {
+ self = [self initWithAppName:appName appId:appId languageDesired:languageDesired isMediaApp:isMediaApp appType:appType shortAppName:shortAppName];
+ if (!self) {
+ return nil;
+ }
- self.languageDesired = languageDesired;
- self.hmiDisplayLanguageDesired = hmiDisplayLanguageDesired;
- self.isMediaApplication = @(isMediaApp);
self.ttsName = [ttsName copy];
self.vrSynonyms = [vrSynonyms copy];
- self.syncMsgVersion = [[SDLSyncMsgVersion alloc] initWithMajorVersion:1 minorVersion:0];
- self.appInfo = [SDLAppInfo currentAppInfo];
- self.deviceInfo = [SDLDeviceInfo currentDevice];
+ self.hmiDisplayLanguageDesired = hmiDisplayLanguageDesired;
self.hashID = resumeHash;
- self.correlationID = @1;
return self;
}
@@ -91,7 +106,7 @@
return [parameters objectForKey:SDLNameAppName];
}
-- (void)setTtsName:(NSMutableArray<SDLTTSChunk *> *)ttsName {
+- (void)setTtsName:(nullable NSMutableArray<SDLTTSChunk *> *)ttsName {
if (ttsName != nil) {
[parameters setObject:ttsName forKey:SDLNameTTSName];
} else {
@@ -99,7 +114,7 @@
}
}
-- (NSMutableArray<SDLTTSChunk *> *)ttsName {
+- (nullable NSMutableArray<SDLTTSChunk *> *)ttsName {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameTTSName];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -112,7 +127,7 @@
}
}
-- (void)setNgnMediaScreenAppName:(NSString *)ngnMediaScreenAppName {
+- (void)setNgnMediaScreenAppName:(nullable NSString *)ngnMediaScreenAppName {
if (ngnMediaScreenAppName != nil) {
[parameters setObject:ngnMediaScreenAppName forKey:SDLNameNGNMediaScreenAppName];
} else {
@@ -120,11 +135,11 @@
}
}
-- (NSString *)ngnMediaScreenAppName {
+- (nullable NSString *)ngnMediaScreenAppName {
return [parameters objectForKey:SDLNameNGNMediaScreenAppName];
}
-- (void)setVrSynonyms:(NSMutableArray<NSString *> *)vrSynonyms {
+- (void)setVrSynonyms:(nullable NSMutableArray<NSString *> *)vrSynonyms {
if (vrSynonyms != nil) {
[parameters setObject:vrSynonyms forKey:SDLNameVRSynonyms];
} else {
@@ -132,7 +147,7 @@
}
}
-- (NSMutableArray<NSString *> *)vrSynonyms {
+- (nullable NSMutableArray<NSString *> *)vrSynonyms {
return [parameters objectForKey:SDLNameVRSynonyms];
}
@@ -174,7 +189,7 @@
return (SDLLanguage)obj;
}
-- (void)setAppHMIType:(NSMutableArray<SDLAppHMIType> *)appHMIType {
+- (void)setAppHMIType:(nullable NSMutableArray<SDLAppHMIType> *)appHMIType {
if (appHMIType != nil) {
[parameters setObject:appHMIType forKey:SDLNameAppHMIType];
} else {
@@ -182,7 +197,7 @@
}
}
-- (NSMutableArray<SDLAppHMIType> *)appHMIType {
+- (nullable NSMutableArray<SDLAppHMIType> *)appHMIType {
NSMutableArray<SDLAppHMIType> *array = [parameters objectForKey:SDLNameAppHMIType];
if ([array count] < 1) {
return array;
@@ -195,7 +210,7 @@
}
}
-- (void)setHashID:(NSString *)hashID {
+- (void)setHashID:(nullable NSString *)hashID {
if (hashID != nil) {
[parameters setObject:hashID forKey:SDLNameHashId];
} else {
@@ -203,11 +218,11 @@
}
}
-- (NSString *)hashID {
+- (nullable NSString *)hashID {
return [parameters objectForKey:SDLNameHashId];
}
-- (void)setDeviceInfo:(SDLDeviceInfo *)deviceInfo {
+- (void)setDeviceInfo:(nullable SDLDeviceInfo *)deviceInfo {
if (deviceInfo != nil) {
[parameters setObject:deviceInfo forKey:SDLNameDeviceInfo];
} else {
@@ -215,7 +230,7 @@
}
}
-- (SDLDeviceInfo *)deviceInfo {
+- (nullable SDLDeviceInfo *)deviceInfo {
NSObject *obj = [parameters objectForKey:SDLNameDeviceInfo];
if (obj == nil || [obj isKindOfClass:SDLDeviceInfo.class]) {
return (SDLDeviceInfo *)obj;
@@ -236,7 +251,7 @@
return [parameters objectForKey:SDLNameAppId];
}
-- (void)setAppInfo:(SDLAppInfo *)appInfo {
+- (void)setAppInfo:(nullable SDLAppInfo *)appInfo {
if (appInfo != nil) {
[parameters setObject:appInfo forKey:SDLNameAppInfo];
} else {
@@ -244,7 +259,7 @@
}
}
-- (SDLAppInfo *)appInfo {
+- (nullable SDLAppInfo *)appInfo {
NSObject *obj = [parameters objectForKey:SDLNameAppInfo];
if (obj == nil || [obj isKindOfClass:SDLAppInfo.class]) {
return (SDLAppInfo *)obj;
@@ -254,3 +269,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRequestHandler.h b/SmartDeviceLink/SDLRequestHandler.h
index d05cdfd38..64ee67b48 100644
--- a/SmartDeviceLink/SDLRequestHandler.h
+++ b/SmartDeviceLink/SDLRequestHandler.h
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* The handler that is added to any RPC implementing this protocol.
*/
-@property (copy, nonatomic) SDLRPCNotificationHandler handler;
+@property (nullable, copy, nonatomic) SDLRPCNotificationHandler handler;
/**
* A special init function on any RPC implementing this protocol.
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @return An instance of the class implementing this protocol.
*/
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler;
@end
diff --git a/SmartDeviceLink/SDLResetGlobalProperties.h b/SmartDeviceLink/SDLResetGlobalProperties.h
index 697ad8cb8..e45e45804 100644
--- a/SmartDeviceLink/SDLResetGlobalProperties.h
+++ b/SmartDeviceLink/SDLResetGlobalProperties.h
@@ -22,6 +22,9 @@
* Since SmartDeviceLink 1.0
* See SetGlobalProperties
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLResetGlobalProperties : SDLRPCRequest
- (instancetype)initWithProperties:(NSArray<SDLGlobalProperty> *)properties;
@@ -33,3 +36,5 @@
@property (strong) NSMutableArray<SDLGlobalProperty> *properties;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLResetGlobalProperties.m b/SmartDeviceLink/SDLResetGlobalProperties.m
index e236363e5..c31121329 100644
--- a/SmartDeviceLink/SDLResetGlobalProperties.m
+++ b/SmartDeviceLink/SDLResetGlobalProperties.m
@@ -7,6 +7,8 @@
#import "SDLGlobalProperty.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLResetGlobalProperties
- (instancetype)init {
@@ -48,3 +50,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScrollableMessage.h b/SmartDeviceLink/SDLScrollableMessage.h
index c06f1911e..30e1f85f7 100644
--- a/SmartDeviceLink/SDLScrollableMessage.h
+++ b/SmartDeviceLink/SDLScrollableMessage.h
@@ -15,11 +15,14 @@
* <b>HMILevel needs to be FULL</b>
* <p>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLScrollableMessage : SDLRPCRequest
- (instancetype)initWithMessage:(NSString *)message;
-- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
/**
* @abstract A Body of text that can include newlines and tabs
@@ -36,7 +39,7 @@
* <p>
* <b>Notes</b>:Minval=0; Maxval=65535;Default=30000
*/
-@property (strong) NSNumber<SDLInt> *timeout;
+@property (nullable, strong) NSNumber<SDLInt> *timeout;
/**
* @abstract Gets/Sets App defined SoftButtons.If omitted on supported displays, only the
* system defined "Close" SoftButton will be displayed
@@ -45,6 +48,8 @@
* <p>
* <b>Notes: </b>Minsize=0, Maxsize=8
*/
-@property (strong) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScrollableMessage.m b/SmartDeviceLink/SDLScrollableMessage.m
index ead8ec61b..0af15c581 100644
--- a/SmartDeviceLink/SDLScrollableMessage.m
+++ b/SmartDeviceLink/SDLScrollableMessage.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLSoftButton.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLScrollableMessage
- (instancetype)init {
@@ -15,7 +17,7 @@
return self;
}
-- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithMessage:(NSString *)message timeout:(UInt16)timeout softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
self = [self initWithMessage:message];
if (!self) {
return nil;
@@ -50,7 +52,7 @@
return [parameters objectForKey:SDLNameScrollableMessageBody];
}
-- (void)setTimeout:(NSNumber<SDLInt> *)timeout {
+- (void)setTimeout:(nullable NSNumber<SDLInt> *)timeout {
if (timeout != nil) {
[parameters setObject:timeout forKey:SDLNameTimeout];
} else {
@@ -58,11 +60,11 @@
}
}
-- (NSNumber<SDLInt> *)timeout {
+- (nullable NSNumber<SDLInt> *)timeout {
return [parameters objectForKey:SDLNameTimeout];
}
-- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
+- (void)setSoftButtons:(nullable NSMutableArray<SDLSoftButton *> *)softButtons {
if (softButtons != nil) {
[parameters setObject:softButtons forKey:SDLNameSoftButtons];
} else {
@@ -70,7 +72,7 @@
}
}
-- (NSMutableArray<SDLSoftButton *> *)softButtons {
+- (nullable NSMutableArray<SDLSoftButton *> *)softButtons {
NSMutableArray<SDLSoftButton *> *array = [parameters objectForKey:SDLNameSoftButtons];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButton.class]) {
return array;
@@ -84,3 +86,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSendLocation.h b/SmartDeviceLink/SDLSendLocation.h
index bff1859ce..c2d007604 100644
--- a/SmartDeviceLink/SDLSendLocation.h
+++ b/SmartDeviceLink/SDLSendLocation.h
@@ -11,80 +11,84 @@
#import "SDLImage.h"
#import "SDLOasisAddress.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSendLocation : SDLRPCRequest
-- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image;
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription address:(nullable NSArray<NSString *> *)address phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image;
-- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription displayAddressLines:(NSArray<NSString *> *)displayAddressLines phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image deliveryMode:(SDLDeliveryMode)deliveryMode timeStamp:(SDLDateTime *)timeStamp address:(SDLOasisAddress *)address;
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription displayAddressLines:(nullable NSArray<NSString *> *)displayAddressLines phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image deliveryMode:(nullable SDLDeliveryMode)deliveryMode timeStamp:(nullable SDLDateTime *)timeStamp address:(nullable SDLOasisAddress *)address;
/**
* The longitudinal coordinate of the location.
*
* Float, Required, -180.0 - 180.0
*/
-@property (copy, nonatomic) NSNumber<SDLFloat> *longitudeDegrees;
+@property (nullable, copy, nonatomic) NSNumber<SDLFloat> *longitudeDegrees;
/**
* The latitudinal coordinate of the location.
*
* Float, Required, -90.0 - 90.0
*/
-@property (copy, nonatomic) NSNumber<SDLFloat> *latitudeDegrees;
+@property (nullable, copy, nonatomic) NSNumber<SDLFloat> *latitudeDegrees;
/**
* Name / title of intended location
*
* Optional, Maxlength = 500 char
*/
-@property (copy, nonatomic) NSString *locationName;
+@property (nullable, copy, nonatomic) NSString *locationName;
/**
* Description of the intended location / establishment
*
* Optional, MaxLength = 500 char
*/
-@property (copy, nonatomic) NSString *locationDescription;
+@property (nullable, copy, nonatomic) NSString *locationDescription;
/**
* Location address for display purposes only
*
* Contains String, Optional, Max Array Length = 4, Max String Length = 500
*/
-@property (copy, nonatomic) NSArray<NSString *> *addressLines;
+@property (nullable, copy, nonatomic) NSArray<NSString *> *addressLines;
/**
* Phone number of intended location / establishment
*
* Optional, Max Length = 500
*/
-@property (copy, nonatomic) NSString *phoneNumber;
+@property (nullable, copy, nonatomic) NSString *phoneNumber;
/**
* Image / icon of intended location
*
* Optional
*/
-@property (strong, nonatomic) SDLImage *locationImage;
+@property (nullable, strong, nonatomic) SDLImage *locationImage;
/**
* Mode in which the sendLocation request is sent
*
* Optional
*/
-@property (strong, nonatomic) SDLDeliveryMode deliveryMode;
+@property (nullable, strong, nonatomic) SDLDeliveryMode deliveryMode;
/**
* Arrival time of Location. If multiple SendLocations are sent, this will be used for sorting as well.
*
* Optional
*/
-@property (strong, nonatomic) SDLDateTime *timeStamp;
+@property (nullable, strong, nonatomic) SDLDateTime *timeStamp;
/**
* Address to be used for setting destination
*
* Optional
*/
-@property (strong, nonatomic) SDLOasisAddress *address;
+@property (nullable, strong, nonatomic) SDLOasisAddress *address;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSendLocation.m b/SmartDeviceLink/SDLSendLocation.m
index f38e48f2d..f103c4ac6 100644
--- a/SmartDeviceLink/SDLSendLocation.m
+++ b/SmartDeviceLink/SDLSendLocation.m
@@ -6,6 +6,7 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLSendLocation
@@ -18,11 +19,11 @@
return self;
}
-- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image {
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription address:(nullable NSArray<NSString *> *)address phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image {
return [self initWithLongitude:longitude latitude:latitude locationName:locationName locationDescription:locationDescription displayAddressLines:address phoneNumber:phoneNumber image:image deliveryMode:nil timeStamp:nil address:nil];
}
-- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription displayAddressLines:(NSArray<NSString *> *)displayAddressLines phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image deliveryMode:(SDLDeliveryMode)deliveryMode timeStamp:(SDLDateTime *)timeStamp address:(SDLOasisAddress *)address {
+- (instancetype)initWithLongitude:(double)longitude latitude:(double)latitude locationName:(nullable NSString *)locationName locationDescription:(nullable NSString *)locationDescription displayAddressLines:(nullable NSArray<NSString *> *)displayAddressLines phoneNumber:(nullable NSString *)phoneNumber image:(nullable SDLImage *)image deliveryMode:(nullable SDLDeliveryMode)deliveryMode timeStamp:(nullable SDLDateTime *)timeStamp address:(nullable SDLOasisAddress *)address {
self = [self init];
if (!self) {
return nil;
@@ -42,7 +43,7 @@
return self;
}
-- (void)setLongitudeDegrees:(NSNumber<SDLFloat> *)longitudeDegrees {
+- (void)setLongitudeDegrees:(nullable NSNumber<SDLFloat> *)longitudeDegrees {
if (longitudeDegrees != nil) {
parameters[SDLNameLongitudeDegrees] = longitudeDegrees;
} else {
@@ -50,11 +51,11 @@
}
}
-- (NSNumber<SDLFloat> *)longitudeDegrees {
+- (nullable NSNumber<SDLFloat> *)longitudeDegrees {
return parameters[SDLNameLongitudeDegrees];
}
-- (void)setLatitudeDegrees:(NSNumber<SDLFloat> *)latitudeDegrees {
+- (void)setLatitudeDegrees:(nullable NSNumber<SDLFloat> *)latitudeDegrees {
if (latitudeDegrees != nil) {
parameters[SDLNameLatitudeDegrees] = latitudeDegrees;
} else {
@@ -62,11 +63,11 @@
}
}
-- (NSNumber<SDLFloat> *)latitudeDegrees {
+- (nullable NSNumber<SDLFloat> *)latitudeDegrees {
return parameters[SDLNameLatitudeDegrees];
}
-- (void)setLocationName:(NSString *)locationName {
+- (void)setLocationName:(nullable NSString *)locationName {
if (locationName != nil) {
parameters[SDLNameLocationName] = locationName;
} else {
@@ -74,11 +75,11 @@
}
}
-- (NSString *)locationName {
+- (nullable NSString *)locationName {
return parameters[SDLNameLocationName];
}
-- (void)setAddressLines:(NSArray<NSString *> *)addressLines {
+- (void)setAddressLines:(nullable NSArray<NSString *> *)addressLines {
if (addressLines != nil) {
parameters[SDLNameAddressLines] = addressLines;
} else {
@@ -86,11 +87,11 @@
}
}
-- (NSString *)locationDescription {
+- (nullable NSString *)locationDescription {
return parameters[SDLNameLocationDescription];
}
-- (void)setLocationDescription:(NSString *)locationDescription {
+- (void)setLocationDescription:(nullable NSString *)locationDescription {
if (locationDescription != nil) {
parameters[SDLNameLocationDescription] = locationDescription;
} else {
@@ -98,11 +99,11 @@
}
}
-- (NSArray<NSString *> *)addressLines {
+- (nullable NSArray<NSString *> *)addressLines {
return parameters[SDLNameAddressLines];
}
-- (void)setPhoneNumber:(NSString *)phoneNumber {
+- (void)setPhoneNumber:(nullable NSString *)phoneNumber {
if (phoneNumber != nil) {
parameters[SDLNamePhoneNumber] = phoneNumber;
} else {
@@ -110,11 +111,11 @@
}
}
-- (NSString *)phoneNumber {
+- (nullable NSString *)phoneNumber {
return parameters[SDLNamePhoneNumber];
}
-- (void)setLocationImage:(SDLImage *)locationImage {
+- (void)setLocationImage:(nullable SDLImage *)locationImage {
if (locationImage != nil) {
parameters[SDLNameLocationImage] = locationImage;
} else {
@@ -122,7 +123,7 @@
}
}
-- (SDLImage *)locationImage {
+- (nullable SDLImage *)locationImage {
id obj = parameters[SDLNameLocationImage];
if (obj == nil || [obj isKindOfClass:[SDLImage class]]) {
return (SDLImage *)obj;
@@ -131,7 +132,7 @@
}
}
-- (void)setDeliveryMode:(SDLDeliveryMode)deliveryMode {
+- (void)setDeliveryMode:(nullable SDLDeliveryMode)deliveryMode {
if (deliveryMode != nil) {
parameters[SDLNameDeliveryMode] = deliveryMode;
} else {
@@ -139,11 +140,11 @@
}
}
-- (SDLDeliveryMode)deliveryMode {
+- (nullable SDLDeliveryMode)deliveryMode {
return parameters[SDLNameDeliveryMode];
}
-- (void)setTimeStamp:(SDLDateTime *)timeStamp {
+- (void)setTimeStamp:(nullable SDLDateTime *)timeStamp {
if (timeStamp != nil) {
parameters[SDLNameLocationTimeStamp] = timeStamp;
} else {
@@ -151,7 +152,7 @@
}
}
-- (SDLDateTime *)timeStamp {
+- (nullable SDLDateTime *)timeStamp {
id obj = parameters[SDLNameLocationTimeStamp];
if (obj == nil || [obj isKindOfClass:[SDLDateTime class]]) {
return (SDLDateTime *)obj;
@@ -160,7 +161,7 @@
}
}
-- (void)setAddress:(SDLOasisAddress *)address {
+- (void)setAddress:(nullable SDLOasisAddress *)address {
if (address != nil) {
parameters[SDLNameAddress] = address;
} else {
@@ -168,7 +169,7 @@
}
}
-- (SDLOasisAddress *)address {
+- (nullable SDLOasisAddress *)address {
id obj = parameters[SDLNameAddress];
if (obj == nil || [obj isKindOfClass:[SDLOasisAddress class]]) {
return (SDLOasisAddress *)obj;
@@ -178,3 +179,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetAppIcon.h b/SmartDeviceLink/SDLSetAppIcon.h
index 37fd11974..655614d17 100644
--- a/SmartDeviceLink/SDLSetAppIcon.h
+++ b/SmartDeviceLink/SDLSetAppIcon.h
@@ -11,6 +11,9 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetAppIcon : SDLRPCRequest
- (instancetype)initWithFileName:(NSString *)fileName;
@@ -25,3 +28,5 @@
@property (strong) NSString *syncFileName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetDisplayLayout.h b/SmartDeviceLink/SDLSetDisplayLayout.h
index e60b6219b..4ac2170b2 100644
--- a/SmartDeviceLink/SDLSetDisplayLayout.h
+++ b/SmartDeviceLink/SDLSetDisplayLayout.h
@@ -12,6 +12,9 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetDisplayLayout : SDLRPCRequest
- (instancetype)initWithPredefinedLayout:(SDLPredefinedLayout)predefinedLayout;
@@ -28,3 +31,5 @@
@property (strong) NSString *displayLayout;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetDisplayLayout.m b/SmartDeviceLink/SDLSetDisplayLayout.m
index 7c10712be..0a07830dd 100644
--- a/SmartDeviceLink/SDLSetDisplayLayout.m
+++ b/SmartDeviceLink/SDLSetDisplayLayout.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSetDisplayLayout
- (instancetype)init {
@@ -42,3 +44,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.h b/SmartDeviceLink/SDLSetGlobalProperties.h
index f4110e031..b4413ce71 100644
--- a/SmartDeviceLink/SDLSetGlobalProperties.h
+++ b/SmartDeviceLink/SDLSetGlobalProperties.h
@@ -18,13 +18,16 @@
* Since SmartDeviceLink 1.0
* See SDLResetGlobalProperties
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetGlobalProperties : SDLRPCRequest
-- (instancetype)initWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText;
+- (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(nullable NSString *)timeoutText;
-- (instancetype)initWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText vrHelpTitle:(NSString *)vrHelpTitle vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp;
+- (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(nullable NSString *)timeoutText vrHelpTitle:(nullable NSString *)vrHelpTitle vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
-- (instancetype)initWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText vrHelpTitle:(NSString *)vrHelpTitle vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp menuTitle:(NSString *)menuTitle menuIcon:(SDLImage *)menuIcon keyboardProperties:(SDLKeyboardProperties *)keyboardProperties;
+- (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(nullable NSString *)timeoutText vrHelpTitle:(nullable NSString *)vrHelpTitle vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp menuTitle:(nullable NSString *)menuTitle menuIcon:(nullable SDLImage *)menuIcon keyboardProperties:(nullable SDLKeyboardProperties *)keyboardProperties;
/**
* @abstract Sets a Vector<TTSChunk> for Help Prompt that Array of one or more
@@ -39,14 +42,14 @@
* <li>Only optional it timeoutPrompt has been specified</li>
* </ul>
*/
-@property (strong) NSMutableArray<SDLTTSChunk *> *helpPrompt;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *helpPrompt;
/**
* @abstract A Vector<TTSChunk> for Timeout Prompt representing Array of one or
* more TTSChunk elements specifying the help prompt used in an interaction
* started by PTT
*
*/
-@property (strong) NSMutableArray<SDLTTSChunk *> *timeoutPrompt;
+@property (nullable, strong) NSMutableArray<SDLTTSChunk *> *timeoutPrompt;
/**
* @abstract Sets a voice recognition Help Title
*
@@ -62,7 +65,7 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSString *vrHelpTitle;
+@property (nullable, strong) NSString *vrHelpTitle;
/**
* @abstract Sets the items listed in the VR help screen used in an interaction
* started by PTT
@@ -83,9 +86,11 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSMutableArray<SDLVRHelpItem *> *vrHelp;
-@property (strong) NSString *menuTitle;
-@property (strong) SDLImage *menuIcon;
-@property (strong) SDLKeyboardProperties *keyboardProperties;
+@property (nullable, strong) NSMutableArray<SDLVRHelpItem *> *vrHelp;
+@property (nullable, strong) NSString *menuTitle;
+@property (nullable, strong) SDLImage *menuIcon;
+@property (nullable, strong) SDLKeyboardProperties *keyboardProperties;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink/SDLSetGlobalProperties.m
index 5e141c7aa..b270a0fa8 100644
--- a/SmartDeviceLink/SDLSetGlobalProperties.m
+++ b/SmartDeviceLink/SDLSetGlobalProperties.m
@@ -10,6 +10,7 @@
#import "SDLTTSChunk.h"
#import "SDLVRHelpItem.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLSetGlobalProperties
@@ -19,15 +20,15 @@
return self;
}
-- (instancetype)initWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText {
+- (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(nullable NSString *)timeoutText {
return [self initWithHelpText:helpText timeoutText:timeoutText vrHelpTitle:nil vrHelp:nil];
}
-- (instancetype)initWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText vrHelpTitle:(NSString *)vrHelpTitle vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp {
+- (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(nullable NSString *)timeoutText vrHelpTitle:(nullable NSString *)vrHelpTitle vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp {
return [self initWithHelpText:helpText timeoutText:timeoutText vrHelpTitle:vrHelpTitle vrHelp:vrHelp menuTitle:nil menuIcon:nil keyboardProperties:nil];
}
-- (instancetype)initWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText vrHelpTitle:(NSString *)vrHelpTitle vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp menuTitle:(NSString *)menuTitle menuIcon:(SDLImage *)menuIcon keyboardProperties:(SDLKeyboardProperties *)keyboardProperties {
+- (instancetype)initWithHelpText:(nullable NSString *)helpText timeoutText:(nullable NSString *)timeoutText vrHelpTitle:(nullable NSString *)vrHelpTitle vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp menuTitle:(nullable NSString *)menuTitle menuIcon:(nullable SDLImage *)menuIcon keyboardProperties:(nullable SDLKeyboardProperties *)keyboardProperties {
self = [self init];
if (!self) {
return nil;
@@ -45,7 +46,7 @@
}
-- (void)setHelpPrompt:(NSMutableArray<SDLTTSChunk *> *)helpPrompt {
+- (void)setHelpPrompt:(nullable NSMutableArray<SDLTTSChunk *> *)helpPrompt {
if (helpPrompt != nil) {
[parameters setObject:helpPrompt forKey:SDLNameHelpPrompt];
} else {
@@ -53,7 +54,7 @@
}
}
-- (NSMutableArray<SDLTTSChunk *> *)helpPrompt {
+- (nullable NSMutableArray<SDLTTSChunk *> *)helpPrompt {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameHelpPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -66,7 +67,7 @@
}
}
-- (void)setTimeoutPrompt:(NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
+- (void)setTimeoutPrompt:(nullable NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
if (timeoutPrompt != nil) {
[parameters setObject:timeoutPrompt forKey:SDLNameTimeoutPrompt];
} else {
@@ -74,7 +75,7 @@
}
}
-- (NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
+- (nullable NSMutableArray<SDLTTSChunk *> *)timeoutPrompt {
NSMutableArray<SDLTTSChunk *> *array = [parameters objectForKey:SDLNameTimeoutPrompt];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTTSChunk.class]) {
return array;
@@ -87,7 +88,7 @@
}
}
-- (void)setVrHelpTitle:(NSString *)vrHelpTitle {
+- (void)setVrHelpTitle:(nullable NSString *)vrHelpTitle {
if (vrHelpTitle != nil) {
[parameters setObject:vrHelpTitle forKey:SDLNameVRHelpTitle];
} else {
@@ -95,11 +96,11 @@
}
}
-- (NSString *)vrHelpTitle {
+- (nullable NSString *)vrHelpTitle {
return [parameters objectForKey:SDLNameVRHelpTitle];
}
-- (void)setVrHelp:(NSMutableArray<SDLVRHelpItem *> *)vrHelp {
+- (void)setVrHelp:(nullable NSMutableArray<SDLVRHelpItem *> *)vrHelp {
if (vrHelp != nil) {
[parameters setObject:vrHelp forKey:SDLNameVRHelp];
} else {
@@ -107,7 +108,7 @@
}
}
-- (NSMutableArray<SDLVRHelpItem *> *)vrHelp {
+- (nullable NSMutableArray<SDLVRHelpItem *> *)vrHelp {
NSMutableArray<SDLVRHelpItem *> *array = [parameters objectForKey:SDLNameVRHelp];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLVRHelpItem.class]) {
return array;
@@ -120,7 +121,7 @@
}
}
-- (void)setMenuTitle:(NSString *)menuTitle {
+- (void)setMenuTitle:(nullable NSString *)menuTitle {
if (menuTitle != nil) {
[parameters setObject:menuTitle forKey:SDLNameMenuTitle];
} else {
@@ -128,11 +129,11 @@
}
}
-- (NSString *)menuTitle {
+- (nullable NSString *)menuTitle {
return [parameters objectForKey:SDLNameMenuTitle];
}
-- (void)setMenuIcon:(SDLImage *)menuIcon {
+- (void)setMenuIcon:(nullable SDLImage *)menuIcon {
if (menuIcon != nil) {
[parameters setObject:menuIcon forKey:SDLNameMenuIcon];
} else {
@@ -140,7 +141,7 @@
}
}
-- (SDLImage *)menuIcon {
+- (nullable SDLImage *)menuIcon {
NSObject *obj = [parameters objectForKey:SDLNameMenuIcon];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -149,7 +150,7 @@
}
}
-- (void)setKeyboardProperties:(SDLKeyboardProperties *)keyboardProperties {
+- (void)setKeyboardProperties:(nullable SDLKeyboardProperties *)keyboardProperties {
if (keyboardProperties != nil) {
[parameters setObject:keyboardProperties forKey:SDLNameKeyboardProperties];
} else {
@@ -157,7 +158,7 @@
}
}
-- (SDLKeyboardProperties *)keyboardProperties {
+- (nullable SDLKeyboardProperties *)keyboardProperties {
NSObject *obj = [parameters objectForKey:SDLNameKeyboardProperties];
if (obj == nil || [obj isKindOfClass:SDLKeyboardProperties.class]) {
return (SDLKeyboardProperties *)obj;
@@ -167,3 +168,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetMediaClockTimer.h b/SmartDeviceLink/SDLSetMediaClockTimer.h
index 47cd9112a..55766c339 100644
--- a/SmartDeviceLink/SDLSetMediaClockTimer.h
+++ b/SmartDeviceLink/SDLSetMediaClockTimer.h
@@ -17,6 +17,9 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetMediaClockTimer : SDLRPCRequest
- (instancetype)initWithUpdateMode:(SDLUpdateMode)updateMode hours:(NSInteger)hours minutes:(NSInteger)minutes seconds:(NSInteger)seconds;
@@ -35,13 +38,13 @@
* <li>Will be ignored for PAUSE/RESUME and CLEAR</li>
* </ul>
*/
-@property (strong) SDLStartTime *startTime;
+@property (nullable, strong) SDLStartTime *startTime;
/**
* @abstract An END time of type SDLStartTime, specifying hour, minute, second values
*
* @discussion An SDLStartTime object with specifying hour, minute, second values
*/
-@property (strong) SDLStartTime *endTime;
+@property (nullable, strong) SDLStartTime *endTime;
/**
* @abstract The media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)
*
@@ -58,3 +61,5 @@
@property (strong) SDLUpdateMode updateMode;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetMediaClockTimer.m b/SmartDeviceLink/SDLSetMediaClockTimer.m
index 69d107213..34bed6a78 100644
--- a/SmartDeviceLink/SDLSetMediaClockTimer.m
+++ b/SmartDeviceLink/SDLSetMediaClockTimer.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLStartTime.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSetMediaClockTimer
- (instancetype)init {
@@ -38,7 +40,7 @@
return self;
}
-- (void)setStartTime:(SDLStartTime *)startTime {
+- (void)setStartTime:(nullable SDLStartTime *)startTime {
if (startTime != nil) {
[parameters setObject:startTime forKey:SDLNameStartTime];
} else {
@@ -46,7 +48,7 @@
}
}
-- (SDLStartTime *)startTime {
+- (nullable SDLStartTime *)startTime {
NSObject *obj = [parameters objectForKey:SDLNameStartTime];
if (obj == nil || [obj isKindOfClass:SDLStartTime.class]) {
return (SDLStartTime *)obj;
@@ -55,7 +57,7 @@
}
}
-- (void)setEndTime:(SDLStartTime *)endTime {
+- (void)setEndTime:(nullable SDLStartTime *)endTime {
if (endTime != nil) {
[parameters setObject:endTime forKey:SDLNameEndTime];
} else {
@@ -63,7 +65,7 @@
}
}
-- (SDLStartTime *)endTime {
+- (nullable SDLStartTime *)endTime {
NSObject *obj = [parameters objectForKey:SDLNameEndTime];
if (obj == nil || [obj isKindOfClass:SDLStartTime.class]) {
return (SDLStartTime *)obj;
@@ -86,3 +88,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShow.h b/SmartDeviceLink/SDLShow.h
index 8b4c11137..b07ebf8f9 100644
--- a/SmartDeviceLink/SDLShow.h
+++ b/SmartDeviceLink/SDLShow.h
@@ -30,16 +30,18 @@
* Since SmartDeviceLink 1.0
* See SDLAlert SDLSetMediaClockTimer
*/
-@interface SDLShow : SDLRPCRequest
-- (instancetype)initWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 alignment:(SDLTextAlignment)alignment;
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLShow : SDLRPCRequest
-- (instancetype)initWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 mainField3:(NSString *)mainField3 mainField4:(NSString *)mainField4 alignment:(SDLTextAlignment)alignment;
+- (instancetype)initWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 alignment:(nullable SDLTextAlignment)alignment;
-- (instancetype)initWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 alignment:(SDLTextAlignment)alignment statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack;
+- (instancetype)initWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 mainField3:(nullable NSString *)mainField3 mainField4:(nullable NSString *)mainField4 alignment:(nullable SDLTextAlignment)alignment;
-- (instancetype)initWithMainField1:(NSString *)mainField1 mainField2:(NSString *)mainField2 mainField3:(NSString *)mainField3 mainField4:(NSString *)mainField4 alignment:(SDLTextAlignment)alignment statusBar:(NSString *)statusBar mediaClock:(NSString *)mediaClock mediaTrack:(NSString *)mediaTrack graphic:(SDLImage *)graphic softButtons:(NSArray<SDLSoftButton *> *)softButtons customPresets:(NSArray<NSString *> *)customPresets;
+- (instancetype)initWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 alignment:(nullable SDLTextAlignment)alignment statusBar:(nullable NSString *)statusBar mediaClock:(nullable NSString *)mediaClock mediaTrack:(nullable NSString *)mediaTrack;
+- (instancetype)initWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 mainField3:(nullable NSString *)mainField3 mainField4:(nullable NSString *)mainField4 alignment:(nullable SDLTextAlignment)alignment statusBar:(nullable NSString *)statusBar mediaClock:(nullable NSString *)mediaClock mediaTrack:(nullable NSString *)mediaTrack graphic:(nullable SDLImage *)graphic softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons customPresets:(nullable NSArray<NSString *> *)customPresets;
/**
* @abstract The text displayed in a single-line display, or in the upper display
@@ -56,7 +58,7 @@
* cleared</li>
* </ul>
*/
-@property (strong) NSString *mainField1;
+@property (nullable, strong) NSString *mainField1;
/**
* @abstract The text displayed on the second display line of a two-line display
*
@@ -74,7 +76,7 @@
* <li>Maxlength = 500</li>
* </ul>
*/
-@property (strong) NSString *mainField2;
+@property (nullable, strong) NSString *mainField2;
/**
* @abstract The text displayed on the first display line of the second page
*
@@ -93,7 +95,7 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSString *mainField3;
+@property (nullable, strong) NSString *mainField3;
/**
* @abstract The text displayed on the second display line of the second page
*
@@ -112,7 +114,7 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSString *mainField4;
+@property (nullable, strong) NSString *mainField4;
/**
* @abstract The alignment that Specifies how mainField1 and mainField2 text
* should be aligned on display
@@ -128,7 +130,7 @@
* <li>Has no effect with navigation display</li>
* </ul>
*/
-@property (strong) SDLTextAlignment alignment;
+@property (nullable, strong) SDLTextAlignment alignment;
/**
* @abstract Text in the Status Bar
*
@@ -146,7 +148,7 @@
* parameter is ignored</li>
* </ul>
*/
-@property (strong) NSString *statusBar;
+@property (nullable, strong) NSString *statusBar;
/**
* @abstract This property is deprecated use SetMediaClockTimer instead.
* <p> The value for the MediaClock field using a format described in the
@@ -163,7 +165,7 @@
* will not display anything)</li>
* </ul>
*/
-@property (strong) NSString *mediaClock;
+@property (nullable, strong) NSString *mediaClock;
/**
* @abstract The text in the track field
*
@@ -176,7 +178,7 @@
* <li>This field is only valid for media applications on navigation displays</li>
* </ul>
*/
-@property (strong) NSString *mediaTrack;
+@property (nullable, strong) NSString *mediaTrack;
/**
* @abstract An image to be shown on supported displays
*
@@ -186,7 +188,7 @@
* graphic shall not change<br/>
* @since SmartDeviceLink 2.0
*/
-@property (strong) SDLImage *graphic;
+@property (nullable, strong) SDLImage *graphic;
/**
* @abstract An image to be shown on supported displays
*
@@ -196,7 +198,7 @@
* graphic shall not change<br/>
* @since SmartDeviceLink 2.0
*/
-@property (strong) SDLImage *secondaryGraphic;
+@property (nullable, strong) SDLImage *secondaryGraphic;
/**
* @abstract The the Soft buttons defined by the App
*
@@ -213,7 +215,7 @@
*
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong) NSMutableArray<SDLSoftButton *> *softButtons;
/**
* @abstract The Custom Presets defined by the App
*
@@ -227,6 +229,8 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong) NSMutableArray<NSString *> *customPresets;
+@property (nullable, strong) NSMutableArray<NSString *> *customPresets;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShowConstantTBT.h b/SmartDeviceLink/SDLShowConstantTBT.h
index a8339b9ad..be4f21521 100644
--- a/SmartDeviceLink/SDLShowConstantTBT.h
+++ b/SmartDeviceLink/SDLShowConstantTBT.h
@@ -14,20 +14,25 @@
*<p>
* @since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLShowConstantTBT : SDLRPCRequest
-- (instancetype)initWithNavigationText1:(NSString *)navigationText1 navigationText2:(NSString *)navigationText2 eta:(NSString *)eta timeToDestination:(NSString *)timeToDestination totalDistance:(NSString *)totalDistance turnIcon:(SDLImage *)turnIcon nextTurnIcon:(SDLImage *)nextTurnIcon distanceToManeuver:(CGFloat)distanceToManeuver distanceToManeuverScale:(CGFloat)distanceToManeuverScale maneuverComplete:(BOOL)maneuverComplete softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithNavigationText1:(nullable NSString *)navigationText1 navigationText2:(nullable NSString *)navigationText2 eta:(nullable NSString *)eta timeToDestination:(nullable NSString *)timeToDestination totalDistance:(nullable NSString *)totalDistance turnIcon:(nullable SDLImage *)turnIcon nextTurnIcon:(nullable SDLImage *)nextTurnIcon distanceToManeuver:(CGFloat)distanceToManeuver distanceToManeuverScale:(CGFloat)distanceToManeuverScale maneuverComplete:(BOOL)maneuverComplete softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
-@property (strong) NSString *navigationText1;
-@property (strong) NSString *navigationText2;
-@property (strong) NSString *eta;
-@property (strong) NSString *timeToDestination;
-@property (strong) NSString *totalDistance;
-@property (strong) SDLImage *turnIcon;
-@property (strong) SDLImage *nextTurnIcon;
-@property (strong) NSNumber<SDLFloat> *distanceToManeuver;
-@property (strong) NSNumber<SDLFloat> *distanceToManeuverScale;
-@property (strong) NSNumber<SDLBool> *maneuverComplete;
-@property (strong) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong) NSString *navigationText1;
+@property (nullable, strong) NSString *navigationText2;
+@property (nullable, strong) NSString *eta;
+@property (nullable, strong) NSString *timeToDestination;
+@property (nullable, strong) NSString *totalDistance;
+@property (nullable, strong) SDLImage *turnIcon;
+@property (nullable, strong) SDLImage *nextTurnIcon;
+@property (nullable, strong) NSNumber<SDLFloat> *distanceToManeuver;
+@property (nullable, strong) NSNumber<SDLFloat> *distanceToManeuverScale;
+@property (nullable, strong) NSNumber<SDLBool> *maneuverComplete;
+@property (nullable, strong) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShowConstantTBT.m b/SmartDeviceLink/SDLShowConstantTBT.m
index 10ccc560d..40ddb0fcf 100644
--- a/SmartDeviceLink/SDLShowConstantTBT.m
+++ b/SmartDeviceLink/SDLShowConstantTBT.m
@@ -8,6 +8,8 @@
#import "SDLNames.h"
#import "SDLSoftButton.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLShowConstantTBT
- (instancetype)init {
@@ -16,7 +18,7 @@
return self;
}
-- (instancetype)initWithNavigationText1:(NSString *)navigationText1 navigationText2:(NSString *)navigationText2 eta:(NSString *)eta timeToDestination:(NSString *)timeToDestination totalDistance:(NSString *)totalDistance turnIcon:(SDLImage *)turnIcon nextTurnIcon:(SDLImage *)nextTurnIcon distanceToManeuver:(CGFloat)distanceToManeuver distanceToManeuverScale:(CGFloat)distanceToManeuverScale maneuverComplete:(BOOL)maneuverComplete softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithNavigationText1:(nullable NSString *)navigationText1 navigationText2:(nullable NSString *)navigationText2 eta:(nullable NSString *)eta timeToDestination:(nullable NSString *)timeToDestination totalDistance:(nullable NSString *)totalDistance turnIcon:(nullable SDLImage *)turnIcon nextTurnIcon:(nullable SDLImage *)nextTurnIcon distanceToManeuver:(CGFloat)distanceToManeuver distanceToManeuverScale:(CGFloat)distanceToManeuverScale maneuverComplete:(BOOL)maneuverComplete softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
self = [self init];
if (!self) {
return nil;
@@ -37,7 +39,7 @@
return self;
}
-- (void)setNavigationText1:(NSString *)navigationText1 {
+- (void)setNavigationText1:(nullable NSString *)navigationText1 {
if (navigationText1 != nil) {
[parameters setObject:navigationText1 forKey:SDLNameNavigationText1];
} else {
@@ -45,11 +47,11 @@
}
}
-- (NSString *)navigationText1 {
+- (nullable NSString *)navigationText1 {
return [parameters objectForKey:SDLNameNavigationText1];
}
-- (void)setNavigationText2:(NSString *)navigationText2 {
+- (void)setNavigationText2:(nullable NSString *)navigationText2 {
if (navigationText2 != nil) {
[parameters setObject:navigationText2 forKey:SDLNameNavigationText2];
} else {
@@ -57,11 +59,11 @@
}
}
-- (NSString *)navigationText2 {
+- (nullable NSString *)navigationText2 {
return [parameters objectForKey:SDLNameNavigationText2];
}
-- (void)setEta:(NSString *)eta {
+- (void)setEta:(nullable NSString *)eta {
if (eta != nil) {
[parameters setObject:eta forKey:SDLNameETA];
} else {
@@ -69,11 +71,11 @@
}
}
-- (NSString *)eta {
+- (nullable NSString *)eta {
return [parameters objectForKey:SDLNameETA];
}
-- (void)setTimeToDestination:(NSString *)timeToDestination {
+- (void)setTimeToDestination:(nullable NSString *)timeToDestination {
if (timeToDestination != nil) {
[parameters setObject:timeToDestination forKey:SDLNameTimeToDestination];
} else {
@@ -81,11 +83,11 @@
}
}
-- (NSString *)timeToDestination {
+- (nullable NSString *)timeToDestination {
return [parameters objectForKey:SDLNameTimeToDestination];
}
-- (void)setTotalDistance:(NSString *)totalDistance {
+- (void)setTotalDistance:(nullable NSString *)totalDistance {
if (totalDistance != nil) {
[parameters setObject:totalDistance forKey:SDLNameTotalDistance];
} else {
@@ -93,11 +95,11 @@
}
}
-- (NSString *)totalDistance {
+- (nullable NSString *)totalDistance {
return [parameters objectForKey:SDLNameTotalDistance];
}
-- (void)setTurnIcon:(SDLImage *)turnIcon {
+- (void)setTurnIcon:(nullable SDLImage *)turnIcon {
if (turnIcon != nil) {
[parameters setObject:turnIcon forKey:SDLNameTurnIcon];
} else {
@@ -105,7 +107,7 @@
}
}
-- (SDLImage *)turnIcon {
+- (nullable SDLImage *)turnIcon {
NSObject *obj = [parameters objectForKey:SDLNameTurnIcon];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -114,7 +116,7 @@
}
}
-- (void)setNextTurnIcon:(SDLImage *)nextTurnIcon {
+- (void)setNextTurnIcon:(nullable SDLImage *)nextTurnIcon {
if (nextTurnIcon != nil) {
[parameters setObject:nextTurnIcon forKey:SDLNameNextTurnIcon];
} else {
@@ -122,7 +124,7 @@
}
}
-- (SDLImage *)nextTurnIcon {
+- (nullable SDLImage *)nextTurnIcon {
NSObject *obj = [parameters objectForKey:SDLNameNextTurnIcon];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -131,7 +133,7 @@
}
}
-- (void)setDistanceToManeuver:(NSNumber<SDLFloat> *)distanceToManeuver {
+- (void)setDistanceToManeuver:(nullable NSNumber<SDLFloat> *)distanceToManeuver {
if (distanceToManeuver != nil) {
[parameters setObject:distanceToManeuver forKey:SDLNameDistanceToManeuver];
} else {
@@ -139,11 +141,11 @@
}
}
-- (NSNumber<SDLFloat> *)distanceToManeuver {
+- (nullable NSNumber<SDLFloat> *)distanceToManeuver {
return [parameters objectForKey:SDLNameDistanceToManeuver];
}
-- (void)setDistanceToManeuverScale:(NSNumber<SDLFloat> *)distanceToManeuverScale {
+- (void)setDistanceToManeuverScale:(nullable NSNumber<SDLFloat> *)distanceToManeuverScale {
if (distanceToManeuverScale != nil) {
[parameters setObject:distanceToManeuverScale forKey:SDLNameDistanceToManeuverScale];
} else {
@@ -151,11 +153,11 @@
}
}
-- (NSNumber<SDLFloat> *)distanceToManeuverScale {
+- (nullable NSNumber<SDLFloat> *)distanceToManeuverScale {
return [parameters objectForKey:SDLNameDistanceToManeuverScale];
}
-- (void)setManeuverComplete:(NSNumber<SDLBool> *)maneuverComplete {
+- (void)setManeuverComplete:(nullable NSNumber<SDLBool> *)maneuverComplete {
if (maneuverComplete != nil) {
[parameters setObject:maneuverComplete forKey:SDLNameManeuverComplete];
} else {
@@ -163,11 +165,11 @@
}
}
-- (NSNumber<SDLBool> *)maneuverComplete {
+- (nullable NSNumber<SDLBool> *)maneuverComplete {
return [parameters objectForKey:SDLNameManeuverComplete];
}
-- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
+- (void)setSoftButtons:(nullable NSMutableArray<SDLSoftButton *> *)softButtons {
if (softButtons != nil) {
[parameters setObject:softButtons forKey:SDLNameSoftButtons];
} else {
@@ -175,7 +177,7 @@
}
}
-- (NSMutableArray<SDLSoftButton *> *)softButtons {
+- (nullable NSMutableArray<SDLSoftButton *> *)softButtons {
NSMutableArray<SDLSoftButton *> *array = [parameters objectForKey:SDLNameSoftButtons];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButton.class]) {
return array;
@@ -189,3 +191,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSlider.h b/SmartDeviceLink/SDLSlider.h
index fdf143d2b..517a17cb0 100644
--- a/SmartDeviceLink/SDLSlider.h
+++ b/SmartDeviceLink/SDLSlider.h
@@ -11,13 +11,16 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSlider : SDLRPCRequest
- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position;
-- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSString *)sliderFooter timeout:(UInt16)timeout;
+- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooter:(nullable NSString *)sliderFooter timeout:(UInt16)timeout;
-- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout;
+- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(nullable NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout;
/**
* @abstract Represents a number of selectable items on a horizontal axis
@@ -53,7 +56,7 @@
*
* Optional, Array of Strings, Array length 1 - 26, Max string length 500 chars
*/
-@property (strong) NSMutableArray<NSString *> *sliderFooter;
+@property (nullable, strong) NSMutableArray<NSString *> *sliderFooter;
/**
* @abstract An App defined timeout
@@ -64,6 +67,8 @@
*
* Optional, Integer, 1000 - 65535
*/
-@property (strong) NSNumber<SDLInt> *timeout;
+@property (nullable, strong) NSNumber<SDLInt> *timeout;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSlider.m b/SmartDeviceLink/SDLSlider.m
index ad30d537b..7f03dd32c 100644
--- a/SmartDeviceLink/SDLSlider.m
+++ b/SmartDeviceLink/SDLSlider.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSlider
- (instancetype)init {
@@ -14,7 +16,7 @@
return self;
}
-- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSString *)sliderFooter timeout:(UInt16)timeout {
+- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooter:(nullable NSString *)sliderFooter timeout:(UInt16)timeout {
NSMutableArray *sliderFooters = [NSMutableArray arrayWithCapacity:numTicks];
// Populates array with the same footer value for each position
@@ -25,7 +27,7 @@
return [self initWithNumTicks:numTicks position:position sliderHeader:sliderHeader sliderFooter:[sliderFooters copy] timeout:timeout];
}
-- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout {
+- (instancetype)initWithNumTicks:(UInt8)numTicks position:(UInt8)position sliderHeader:(NSString *)sliderHeader sliderFooters:(nullable NSArray<NSString *> *)sliderFooters timeout:(UInt16)timeout {
self = [self initWithNumTicks:numTicks position:position];
if (!self) {
return nil;
@@ -86,7 +88,7 @@
return [parameters objectForKey:SDLNameSliderHeader];
}
-- (void)setSliderFooter:(NSMutableArray<NSString *> *)sliderFooter {
+- (void)setSliderFooter:(nullable NSMutableArray<NSString *> *)sliderFooter {
if (sliderFooter != nil) {
[parameters setObject:sliderFooter forKey:SDLNameSliderFooter];
} else {
@@ -94,11 +96,11 @@
}
}
-- (NSMutableArray<NSString *> *)sliderFooter {
+- (nullable NSMutableArray<NSString *> *)sliderFooter {
return [parameters objectForKey:SDLNameSliderFooter];
}
-- (void)setTimeout:(NSNumber<SDLInt> *)timeout {
+- (void)setTimeout:(nullable NSNumber<SDLInt> *)timeout {
if (timeout != nil) {
[parameters setObject:timeout forKey:SDLNameTimeout];
} else {
@@ -106,8 +108,10 @@
}
}
-- (NSNumber<SDLInt> *)timeout {
+- (nullable NSNumber<SDLInt> *)timeout {
return [parameters objectForKey:SDLNameTimeout];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSpeak.h b/SmartDeviceLink/SDLSpeak.h
index e5d66d49e..65f3b406e 100644
--- a/SmartDeviceLink/SDLSpeak.h
+++ b/SmartDeviceLink/SDLSpeak.h
@@ -38,6 +38,9 @@
* @since SmartDeviceLink 1.0
* @see SDLAlert
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSpeak : SDLRPCRequest
- (instancetype)initWithTTS:(NSString *)ttsText;
@@ -56,3 +59,5 @@
@property (strong) NSMutableArray<SDLTTSChunk *> *ttsChunks;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSpeak.m b/SmartDeviceLink/SDLSpeak.m
index cfea5fec6..e38b51745 100644
--- a/SmartDeviceLink/SDLSpeak.m
+++ b/SmartDeviceLink/SDLSpeak.m
@@ -8,6 +8,8 @@
#import "SDLTTSChunk.h"
#import "SDLTTSChunkFactory.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSpeak
- (instancetype)init {
@@ -54,3 +56,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeButton.h b/SmartDeviceLink/SDLSubscribeButton.h
index d964ea244..5576141b9 100644
--- a/SmartDeviceLink/SDLSubscribeButton.h
+++ b/SmartDeviceLink/SDLSubscribeButton.h
@@ -58,6 +58,9 @@
* Since SmartDeviceLink 1.0<br/>
* See SDLUnsubscribeButton
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeButton : SDLRPCRequest <SDLRequestHandler>
/**
@@ -67,9 +70,9 @@
*
* @return An SDLSubscribeButton object
*/
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler;
-- (instancetype)initWithButtonName:(SDLButtonName)buttonName handler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName handler:(nullable SDLRPCNotificationHandler)handler;
/**
* A handler that will let you know when the button you subscribed to is selected.
@@ -85,3 +88,5 @@
@property (strong) SDLButtonName buttonName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeButton.m b/SmartDeviceLink/SDLSubscribeButton.m
index 71af4ca02..ef5a7deb5 100644
--- a/SmartDeviceLink/SDLSubscribeButton.m
+++ b/SmartDeviceLink/SDLSubscribeButton.m
@@ -6,6 +6,7 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLSubscribeButton
@@ -15,7 +16,7 @@
return self;
}
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler {
self = [self init];
if (!self) {
return nil;
@@ -26,7 +27,7 @@
return self;
}
-- (instancetype)initWithButtonName:(SDLButtonName)buttonName handler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName handler:(nullable SDLRPCNotificationHandler)handler {
self = [self init];
if (!self) {
return nil;
@@ -52,3 +53,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.h b/SmartDeviceLink/SDLSubscribeVehicleData.h
index 38d3aacff..56fe1895d 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.h
@@ -19,6 +19,9 @@
* Since SmartDeviceLink 2.0<br/>
* See SDLUnsubscribeVehicleData SDLGetVehicleData
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeVehicleData : SDLRPCRequest
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus;
@@ -26,103 +29,105 @@
/**
* @abstract A boolean value. If true, subscribes Gps data
*/
-@property (strong) NSNumber<SDLBool> *gps;
+@property (nullable, strong) NSNumber<SDLBool> *gps;
/**
* @abstract A boolean value. If true, subscribes speed data
*/
-@property (strong) NSNumber<SDLBool> *speed;
+@property (nullable, strong) NSNumber<SDLBool> *speed;
/**
* @abstract A boolean value. If true, subscribes rpm data
*/
-@property (strong) NSNumber<SDLBool> *rpm;
+@property (nullable, strong) NSNumber<SDLBool> *rpm;
/**
* @abstract A boolean value. If true, subscribes FuelLevel data
*/
-@property (strong) NSNumber<SDLBool> *fuelLevel;
+@property (nullable, strong) NSNumber<SDLBool> *fuelLevel;
/**
* @abstract A boolean value. If true, subscribes fuelLevel_State data
*/
-@property (strong) NSNumber<SDLBool> *fuelLevel_State;
+@property (nullable, strong) NSNumber<SDLBool> *fuelLevel_State;
/**
* @abstract A boolean value. If true, subscribes instantFuelConsumption data
*/
-@property (strong) NSNumber<SDLBool> *instantFuelConsumption;
+@property (nullable, strong) NSNumber<SDLBool> *instantFuelConsumption;
/**
* @abstract A boolean value. If true, subscribes externalTemperature data
*/
-@property (strong) NSNumber<SDLBool> *externalTemperature;
+@property (nullable, strong) NSNumber<SDLBool> *externalTemperature;
/**
* @abstract A boolean value. If true, subscribes Currently selected gear data
*/
-@property (strong) NSNumber<SDLBool> *prndl;
+@property (nullable, strong) NSNumber<SDLBool> *prndl;
/**
* @abstract A boolean value. If true, subscribes tire pressure status data
*/
-@property (strong) NSNumber<SDLBool> *tirePressure;
+@property (nullable, strong) NSNumber<SDLBool> *tirePressure;
/**
* @abstract A boolean value. If true, subscribes odometer data
*/
-@property (strong) NSNumber<SDLBool> *odometer;
+@property (nullable, strong) NSNumber<SDLBool> *odometer;
/**
* @abstract A boolean value. If true, subscribes belt Status data
*/
-@property (strong) NSNumber<SDLBool> *beltStatus;
+@property (nullable, strong) NSNumber<SDLBool> *beltStatus;
/**
* @abstract A boolean value. If true, subscribes body Information data
*/
-@property (strong) NSNumber<SDLBool> *bodyInformation;
+@property (nullable, strong) NSNumber<SDLBool> *bodyInformation;
/**
* @abstract A boolean value. If true, subscribes device Status data
*/
-@property (strong) NSNumber<SDLBool> *deviceStatus;
+@property (nullable, strong) NSNumber<SDLBool> *deviceStatus;
/**
* @abstract A boolean value. If true, subscribes driver Braking data
*/
-@property (strong) NSNumber<SDLBool> *driverBraking;
+@property (nullable, strong) NSNumber<SDLBool> *driverBraking;
/**
* @abstract A boolean value. If true, subscribes wiper Status data
*/
-@property (strong) NSNumber<SDLBool> *wiperStatus;
+@property (nullable, strong) NSNumber<SDLBool> *wiperStatus;
/**
* @abstract A boolean value. If true, subscribes Head Lamp Status data
*/
-@property (strong) NSNumber<SDLBool> *headLampStatus;
+@property (nullable, strong) NSNumber<SDLBool> *headLampStatus;
/**
* @abstract A boolean value. If true, subscribes Engine Torque data
*/
-@property (strong) NSNumber<SDLBool> *engineTorque;
+@property (nullable, strong) NSNumber<SDLBool> *engineTorque;
/**
* @abstract A boolean value. If true, means the accPedalPosition data has been
* subscribed.
*/
-@property (strong) NSNumber<SDLBool> *accPedalPosition;
+@property (nullable, strong) NSNumber<SDLBool> *accPedalPosition;
/**
* @abstract A boolean value. If true, means the steeringWheelAngle data has been
* subscribed.
*/
-@property (strong) NSNumber<SDLBool> *steeringWheelAngle;
-@property (strong) NSNumber<SDLBool> *eCallInfo;
-@property (strong) NSNumber<SDLBool> *airbagStatus;
-@property (strong) NSNumber<SDLBool> *emergencyEvent;
-@property (strong) NSNumber<SDLBool> *clusterModeStatus;
-@property (strong) NSNumber<SDLBool> *myKey;
+@property (nullable, strong) NSNumber<SDLBool> *steeringWheelAngle;
+@property (nullable, strong) NSNumber<SDLBool> *eCallInfo;
+@property (nullable, strong) NSNumber<SDLBool> *airbagStatus;
+@property (nullable, strong) NSNumber<SDLBool> *emergencyEvent;
+@property (nullable, strong) NSNumber<SDLBool> *clusterModeStatus;
+@property (nullable, strong) NSNumber<SDLBool> *myKey;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.m b/SmartDeviceLink/SDLSubscribeVehicleData.m
index 961dcda64..1d8a1ee4e 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSubscribeVehicleData
- (instancetype)init {
@@ -48,7 +50,7 @@
return self;
}
-- (void)setGps:(NSNumber<SDLBool> *)gps {
+- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -56,11 +58,11 @@
}
}
-- (NSNumber<SDLBool> *)gps {
+- (nullable NSNumber<SDLBool> *)gps {
return [parameters objectForKey:SDLNameGPS];
}
-- (void)setSpeed:(NSNumber<SDLBool> *)speed {
+- (void)setSpeed:(nullable NSNumber<SDLBool> *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -68,11 +70,11 @@
}
}
-- (NSNumber<SDLBool> *)speed {
+- (nullable NSNumber<SDLBool> *)speed {
return [parameters objectForKey:SDLNameSpeed];
}
-- (void)setRpm:(NSNumber<SDLBool> *)rpm {
+- (void)setRpm:(nullable NSNumber<SDLBool> *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -80,11 +82,11 @@
}
}
-- (NSNumber<SDLBool> *)rpm {
+- (nullable NSNumber<SDLBool> *)rpm {
return [parameters objectForKey:SDLNameRPM];
}
-- (void)setFuelLevel:(NSNumber<SDLBool> *)fuelLevel {
+- (void)setFuelLevel:(nullable NSNumber<SDLBool> *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -92,11 +94,11 @@
}
}
-- (NSNumber<SDLBool> *)fuelLevel {
+- (nullable NSNumber<SDLBool> *)fuelLevel {
return [parameters objectForKey:SDLNameFuelLevel];
}
-- (void)setFuelLevel_State:(NSNumber<SDLBool> *)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable NSNumber<SDLBool> *)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -104,11 +106,11 @@
}
}
-- (NSNumber<SDLBool> *)fuelLevel_State {
+- (nullable NSNumber<SDLBool> *)fuelLevel_State {
return [parameters objectForKey:SDLNameFuelLevelState];
}
-- (void)setInstantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -116,11 +118,11 @@
}
}
-- (NSNumber<SDLBool> *)instantFuelConsumption {
+- (nullable NSNumber<SDLBool> *)instantFuelConsumption {
return [parameters objectForKey:SDLNameInstantFuelConsumption];
}
-- (void)setExternalTemperature:(NSNumber<SDLBool> *)externalTemperature {
+- (void)setExternalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -128,11 +130,11 @@
}
}
-- (NSNumber<SDLBool> *)externalTemperature {
+- (nullable NSNumber<SDLBool> *)externalTemperature {
return [parameters objectForKey:SDLNameExternalTemperature];
}
-- (void)setPrndl:(NSNumber<SDLBool> *)prndl {
+- (void)setPrndl:(nullable NSNumber<SDLBool> *)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -140,11 +142,11 @@
}
}
-- (NSNumber<SDLBool> *)prndl {
+- (nullable NSNumber<SDLBool> *)prndl {
return [parameters objectForKey:SDLNamePRNDL];
}
-- (void)setTirePressure:(NSNumber<SDLBool> *)tirePressure {
+- (void)setTirePressure:(nullable NSNumber<SDLBool> *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -152,11 +154,11 @@
}
}
-- (NSNumber<SDLBool> *)tirePressure {
+- (nullable NSNumber<SDLBool> *)tirePressure {
return [parameters objectForKey:SDLNameTirePressure];
}
-- (void)setOdometer:(NSNumber<SDLBool> *)odometer {
+- (void)setOdometer:(nullable NSNumber<SDLBool> *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -164,11 +166,11 @@
}
}
-- (NSNumber<SDLBool> *)odometer {
+- (nullable NSNumber<SDLBool> *)odometer {
return [parameters objectForKey:SDLNameOdometer];
}
-- (void)setBeltStatus:(NSNumber<SDLBool> *)beltStatus {
+- (void)setBeltStatus:(nullable NSNumber<SDLBool> *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -176,11 +178,11 @@
}
}
-- (NSNumber<SDLBool> *)beltStatus {
+- (nullable NSNumber<SDLBool> *)beltStatus {
return [parameters objectForKey:SDLNameBeltStatus];
}
-- (void)setBodyInformation:(NSNumber<SDLBool> *)bodyInformation {
+- (void)setBodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -188,11 +190,11 @@
}
}
-- (NSNumber<SDLBool> *)bodyInformation {
+- (nullable NSNumber<SDLBool> *)bodyInformation {
return [parameters objectForKey:SDLNameBodyInformation];
}
-- (void)setDeviceStatus:(NSNumber<SDLBool> *)deviceStatus {
+- (void)setDeviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -200,11 +202,11 @@
}
}
-- (NSNumber<SDLBool> *)deviceStatus {
+- (nullable NSNumber<SDLBool> *)deviceStatus {
return [parameters objectForKey:SDLNameDeviceStatus];
}
-- (void)setDriverBraking:(NSNumber<SDLBool> *)driverBraking {
+- (void)setDriverBraking:(nullable NSNumber<SDLBool> *)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -212,11 +214,11 @@
}
}
-- (NSNumber<SDLBool> *)driverBraking {
+- (nullable NSNumber<SDLBool> *)driverBraking {
return [parameters objectForKey:SDLNameDriverBraking];
}
-- (void)setWiperStatus:(NSNumber<SDLBool> *)wiperStatus {
+- (void)setWiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -224,11 +226,11 @@
}
}
-- (NSNumber<SDLBool> *)wiperStatus {
+- (nullable NSNumber<SDLBool> *)wiperStatus {
return [parameters objectForKey:SDLNameWiperStatus];
}
-- (void)setHeadLampStatus:(NSNumber<SDLBool> *)headLampStatus {
+- (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -236,11 +238,11 @@
}
}
-- (NSNumber<SDLBool> *)headLampStatus {
+- (nullable NSNumber<SDLBool> *)headLampStatus {
return [parameters objectForKey:SDLNameHeadLampStatus];
}
-- (void)setEngineTorque:(NSNumber<SDLBool> *)engineTorque {
+- (void)setEngineTorque:(nullable NSNumber<SDLBool> *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -248,11 +250,11 @@
}
}
-- (NSNumber<SDLBool> *)engineTorque {
+- (nullable NSNumber<SDLBool> *)engineTorque {
return [parameters objectForKey:SDLNameEngineTorque];
}
-- (void)setAccPedalPosition:(NSNumber<SDLBool> *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -260,11 +262,11 @@
}
}
-- (NSNumber<SDLBool> *)accPedalPosition {
+- (nullable NSNumber<SDLBool> *)accPedalPosition {
return [parameters objectForKey:SDLNameAccelerationPedalPosition];
}
-- (void)setSteeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -272,11 +274,11 @@
}
}
-- (NSNumber<SDLBool> *)steeringWheelAngle {
+- (nullable NSNumber<SDLBool> *)steeringWheelAngle {
return [parameters objectForKey:SDLNameSteeringWheelAngle];
}
-- (void)setECallInfo:(NSNumber<SDLBool> *)eCallInfo {
+- (void)setECallInfo:(nullable NSNumber<SDLBool> *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -284,11 +286,11 @@
}
}
-- (NSNumber<SDLBool> *)eCallInfo {
+- (nullable NSNumber<SDLBool> *)eCallInfo {
return [parameters objectForKey:SDLNameECallInfo];
}
-- (void)setAirbagStatus:(NSNumber<SDLBool> *)airbagStatus {
+- (void)setAirbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -296,11 +298,11 @@
}
}
-- (NSNumber<SDLBool> *)airbagStatus {
+- (nullable NSNumber<SDLBool> *)airbagStatus {
return [parameters objectForKey:SDLNameAirbagStatus];
}
-- (void)setEmergencyEvent:(NSNumber<SDLBool> *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -308,11 +310,11 @@
}
}
-- (NSNumber<SDLBool> *)emergencyEvent {
+- (nullable NSNumber<SDLBool> *)emergencyEvent {
return [parameters objectForKey:SDLNameEmergencyEvent];
}
-- (void)setClusterModeStatus:(NSNumber<SDLBool> *)clusterModeStatus {
+- (void)setClusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus {
if (clusterModeStatus != nil) {
[parameters setObject:clusterModeStatus forKey:SDLNameClusterModeStatus];
} else {
@@ -320,11 +322,11 @@
}
}
-- (NSNumber<SDLBool> *)clusterModeStatus {
+- (nullable NSNumber<SDLBool> *)clusterModeStatus {
return [parameters objectForKey:SDLNameClusterModeStatus];
}
-- (void)setMyKey:(NSNumber<SDLBool> *)myKey {
+- (void)setMyKey:(nullable NSNumber<SDLBool> *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -332,8 +334,10 @@
}
}
-- (NSNumber<SDLBool> *)myKey {
+- (nullable NSNumber<SDLBool> *)myKey {
return [parameters objectForKey:SDLNameMyKey];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeWaypoints.h b/SmartDeviceLink/SDLSubscribeWaypoints.h
index b5127d00e..33b4bc908 100644
--- a/SmartDeviceLink/SDLSubscribeWaypoints.h
+++ b/SmartDeviceLink/SDLSubscribeWaypoints.h
@@ -11,6 +11,10 @@
*
*/
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeWaypoints : SDLRPCRequest
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeWaypoints.m b/SmartDeviceLink/SDLSubscribeWaypoints.m
index d99778bfb..1d1d1601c 100644
--- a/SmartDeviceLink/SDLSubscribeWaypoints.m
+++ b/SmartDeviceLink/SDLSubscribeWaypoints.m
@@ -4,6 +4,8 @@
#import "SDLSubscribeWaypoints.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSubscribeWaypoints
- (instancetype)init {
@@ -13,3 +15,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSyncPData.h b/SmartDeviceLink/SDLSyncPData.h
index 33b1b9ab9..8db515479 100644
--- a/SmartDeviceLink/SDLSyncPData.h
+++ b/SmartDeviceLink/SDLSyncPData.h
@@ -4,6 +4,10 @@
#import "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSyncPData : SDLRPCRequest
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSyncPData.m b/SmartDeviceLink/SDLSyncPData.m
index a618ab424..dd6809520 100644
--- a/SmartDeviceLink/SDLSyncPData.m
+++ b/SmartDeviceLink/SDLSyncPData.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSyncPData
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemRequest.h b/SmartDeviceLink/SDLSystemRequest.h
index a2ec6b4c0..d5e702ba2 100644
--- a/SmartDeviceLink/SDLSystemRequest.h
+++ b/SmartDeviceLink/SDLSystemRequest.h
@@ -10,11 +10,16 @@
* @since SmartDeviceLink 3.0
*
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSystemRequest : SDLRPCRequest
-- (instancetype)initWithType:(SDLRequestType)requestType fileName:(NSString *)fileName;
+- (instancetype)initWithType:(SDLRequestType)requestType fileName:(nullable NSString *)fileName;
@property (strong) SDLRequestType requestType;
-@property (strong) NSString *fileName;
+@property (nullable, strong) NSString *fileName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemRequest.m b/SmartDeviceLink/SDLSystemRequest.m
index da76b1fcc..f4859ae51 100644
--- a/SmartDeviceLink/SDLSystemRequest.m
+++ b/SmartDeviceLink/SDLSystemRequest.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSystemRequest
- (instancetype)init {
@@ -14,7 +16,7 @@
return self;
}
-- (instancetype)initWithType:(SDLRequestType)requestType fileName:(NSString *)fileName {
+- (instancetype)initWithType:(SDLRequestType)requestType fileName:(nullable NSString *)fileName {
self = [self init];
if (!self) {
return nil;
@@ -39,7 +41,7 @@
return (SDLRequestType)obj;
}
-- (void)setFileName:(NSString *)fileName {
+- (void)setFileName:(nullable NSString *)fileName {
if (fileName != nil) {
[parameters setObject:fileName forKey:SDLNameFilename];
} else {
@@ -47,8 +49,10 @@
}
}
-- (NSString *)fileName {
+- (nullable NSString *)fileName {
return [parameters objectForKey:SDLNameFilename];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnregisterAppInterface.h b/SmartDeviceLink/SDLUnregisterAppInterface.h
index 21c006127..35ca04639 100644
--- a/SmartDeviceLink/SDLUnregisterAppInterface.h
+++ b/SmartDeviceLink/SDLUnregisterAppInterface.h
@@ -19,6 +19,11 @@
*
* See SDLRegisterAppInterface SDLOnAppInterfaceUnregistered
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnregisterAppInterface : SDLRPCRequest
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnregisterAppInterface.m b/SmartDeviceLink/SDLUnregisterAppInterface.m
index 5a19dc885..148c2c0cd 100644
--- a/SmartDeviceLink/SDLUnregisterAppInterface.m
+++ b/SmartDeviceLink/SDLUnregisterAppInterface.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnregisterAppInterface
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeButton.h b/SmartDeviceLink/SDLUnsubscribeButton.h
index 59efd38bc..e000dc70e 100644
--- a/SmartDeviceLink/SDLUnsubscribeButton.h
+++ b/SmartDeviceLink/SDLUnsubscribeButton.h
@@ -19,6 +19,9 @@
* @since SmartDeviceLink 1.0<br/>
* See SDLSubscribeButton
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeButton : SDLRPCRequest
- (instancetype)initWithButtonName:(SDLButtonName)buttonName;
@@ -31,3 +34,5 @@
@property (strong) SDLButtonName buttonName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeButton.m b/SmartDeviceLink/SDLUnsubscribeButton.m
index 59db31756..93cf6f4e6 100644
--- a/SmartDeviceLink/SDLUnsubscribeButton.m
+++ b/SmartDeviceLink/SDLUnsubscribeButton.m
@@ -7,6 +7,8 @@
#import "SDLButtonName.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnsubscribeButton
- (instancetype)init {
@@ -40,3 +42,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
index b16ae1f42..0ce128722 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
@@ -16,6 +16,9 @@
* @since SmartDeviceLink 2.0<br/>
* See SDLSubscribeVehicleData SDLGetVehicleData
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeVehicleData : SDLRPCRequest
- (instancetype)initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition airbagStatus:(BOOL)airbagStatus beltStatus:(BOOL)beltStatus bodyInformation:(BOOL)bodyInformation clusterModeStatus:(BOOL)clusterModeStatus deviceStatus:(BOOL)deviceStatus driverBraking:(BOOL)driverBraking eCallInfo:(BOOL)eCallInfo emergencyEvent:(BOOL)emergencyEvent engineTorque:(BOOL)engineTorque externalTemperature:(BOOL)externalTemperature fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer prndl:(BOOL)prndl rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure wiperStatus:(BOOL)wiperStatus;
@@ -23,97 +26,99 @@
/**
* @abstract A boolean value. If true, unsubscribes Gps data
*/
-@property (strong) NSNumber<SDLBool> *gps;
+@property (nullable, strong) NSNumber<SDLBool> *gps;
/**
* @abstract A boolean value. If true, unsubscribes speed data
*/
-@property (strong) NSNumber<SDLBool> *speed;
+@property (nullable, strong) NSNumber<SDLBool> *speed;
/**
* @abstract A boolean value. If true, unsubscribe data
*/
-@property (strong) NSNumber<SDLBool> *rpm;
+@property (nullable, strong) NSNumber<SDLBool> *rpm;
/**
* @abstract A boolean value. If true, unsubscribes FuelLevel data
*/
-@property (strong) NSNumber<SDLBool> *fuelLevel;
+@property (nullable, strong) NSNumber<SDLBool> *fuelLevel;
/**
* @abstract A boolean value. If true, unsubscribes fuelLevel_State data
*/
-@property (strong) NSNumber<SDLBool> *fuelLevel_State;
+@property (nullable, strong) NSNumber<SDLBool> *fuelLevel_State;
/**
* @abstract A boolean value. If true, unsubscribes instantFuelConsumption data
*/
-@property (strong) NSNumber<SDLBool> *instantFuelConsumption;
+@property (nullable, strong) NSNumber<SDLBool> *instantFuelConsumption;
/**
* @abstract A boolean value. If true, unsubscribes externalTemperature data
*/
-@property (strong) NSNumber<SDLBool> *externalTemperature;
+@property (nullable, strong) NSNumber<SDLBool> *externalTemperature;
/**
* @abstract A boolean value. If true, unsubscribes Currently selected gear data
*/
-@property (strong) NSNumber<SDLBool> *prndl;
+@property (nullable, strong) NSNumber<SDLBool> *prndl;
/**
* @abstract A boolean value. If true, unsubscribes tire pressure status data
*/
-@property (strong) NSNumber<SDLBool> *tirePressure;
+@property (nullable, strong) NSNumber<SDLBool> *tirePressure;
/**
* @abstract A boolean value. If true, unsubscribes odometer data
*/
-@property (strong) NSNumber<SDLBool> *odometer;
+@property (nullable, strong) NSNumber<SDLBool> *odometer;
/**
* @abstract A boolean value. If true, unsubscribes belt Status data
*/
-@property (strong) NSNumber<SDLBool> *beltStatus;
+@property (nullable, strong) NSNumber<SDLBool> *beltStatus;
/**
* @abstract A boolean value. If true, unsubscribes body Information data
*/
-@property (strong) NSNumber<SDLBool> *bodyInformation;
+@property (nullable, strong) NSNumber<SDLBool> *bodyInformation;
/**
* @abstract A boolean value. If true, unsubscribes device Status data
*/
-@property (strong) NSNumber<SDLBool> *deviceStatus;
+@property (nullable, strong) NSNumber<SDLBool> *deviceStatus;
/**
* @abstract A boolean value. If true, unsubscribes driver Braking data
*/
-@property (strong) NSNumber<SDLBool> *driverBraking;
+@property (nullable, strong) NSNumber<SDLBool> *driverBraking;
/**
* @abstract A boolean value. If true, unsubscribes wiper Status data
*/
-@property (strong) NSNumber<SDLBool> *wiperStatus;
+@property (nullable, strong) NSNumber<SDLBool> *wiperStatus;
/**
* @abstract A boolean value. If true, unsubscribes Head Lamp Status data
*/
-@property (strong) NSNumber<SDLBool> *headLampStatus;
+@property (nullable, strong) NSNumber<SDLBool> *headLampStatus;
/**
* @abstract A boolean value. If true, unsubscribes Engine Torque data
*/
-@property (strong) NSNumber<SDLBool> *engineTorque;
+@property (nullable, strong) NSNumber<SDLBool> *engineTorque;
/**
* @abstract A boolean value. If true, unsubscribes accPedalPosition data
*/
-@property (strong) NSNumber<SDLBool> *accPedalPosition;
-@property (strong) NSNumber<SDLBool> *steeringWheelAngle;
-@property (strong) NSNumber<SDLBool> *eCallInfo;
-@property (strong) NSNumber<SDLBool> *airbagStatus;
-@property (strong) NSNumber<SDLBool> *emergencyEvent;
-@property (strong) NSNumber<SDLBool> *clusterModeStatus;
-@property (strong) NSNumber<SDLBool> *myKey;
+@property (nullable, strong) NSNumber<SDLBool> *accPedalPosition;
+@property (nullable, strong) NSNumber<SDLBool> *steeringWheelAngle;
+@property (nullable, strong) NSNumber<SDLBool> *eCallInfo;
+@property (nullable, strong) NSNumber<SDLBool> *airbagStatus;
+@property (nullable, strong) NSNumber<SDLBool> *emergencyEvent;
+@property (nullable, strong) NSNumber<SDLBool> *clusterModeStatus;
+@property (nullable, strong) NSNumber<SDLBool> *myKey;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.m b/SmartDeviceLink/SDLUnsubscribeVehicleData.m
index 9b37ef570..8d58dc73a 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.m
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnsubscribeVehicleData
- (instancetype)init {
@@ -48,7 +50,7 @@
return self;
}
-- (void)setGps:(NSNumber<SDLBool> *)gps {
+- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -56,11 +58,11 @@
}
}
-- (NSNumber<SDLBool> *)gps {
+- (nullable NSNumber<SDLBool> *)gps {
return [parameters objectForKey:SDLNameGPS];
}
-- (void)setSpeed:(NSNumber<SDLBool> *)speed {
+- (void)setSpeed:(nullable NSNumber<SDLBool> *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -68,11 +70,11 @@
}
}
-- (NSNumber<SDLBool> *)speed {
+- (nullable NSNumber<SDLBool> *)speed {
return [parameters objectForKey:SDLNameSpeed];
}
-- (void)setRpm:(NSNumber<SDLBool> *)rpm {
+- (void)setRpm:(nullable NSNumber<SDLBool> *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -80,11 +82,11 @@
}
}
-- (NSNumber<SDLBool> *)rpm {
+- (nullable NSNumber<SDLBool> *)rpm {
return [parameters objectForKey:SDLNameRPM];
}
-- (void)setFuelLevel:(NSNumber<SDLBool> *)fuelLevel {
+- (void)setFuelLevel:(nullable NSNumber<SDLBool> *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -92,11 +94,11 @@
}
}
-- (NSNumber<SDLBool> *)fuelLevel {
+- (nullable NSNumber<SDLBool> *)fuelLevel {
return [parameters objectForKey:SDLNameFuelLevel];
}
-- (void)setFuelLevel_State:(NSNumber<SDLBool> *)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable NSNumber<SDLBool> *)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -104,11 +106,11 @@
}
}
-- (NSNumber<SDLBool> *)fuelLevel_State {
+- (nullable NSNumber<SDLBool> *)fuelLevel_State {
return [parameters objectForKey:SDLNameFuelLevelState];
}
-- (void)setInstantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -116,11 +118,11 @@
}
}
-- (NSNumber<SDLBool> *)instantFuelConsumption {
+- (nullable NSNumber<SDLBool> *)instantFuelConsumption {
return [parameters objectForKey:SDLNameInstantFuelConsumption];
}
-- (void)setExternalTemperature:(NSNumber<SDLBool> *)externalTemperature {
+- (void)setExternalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -128,11 +130,11 @@
}
}
-- (NSNumber<SDLBool> *)externalTemperature {
+- (nullable NSNumber<SDLBool> *)externalTemperature {
return [parameters objectForKey:SDLNameExternalTemperature];
}
-- (void)setPrndl:(NSNumber<SDLBool> *)prndl {
+- (void)setPrndl:(nullable NSNumber<SDLBool> *)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -140,11 +142,11 @@
}
}
-- (NSNumber<SDLBool> *)prndl {
+- (nullable NSNumber<SDLBool> *)prndl {
return [parameters objectForKey:SDLNamePRNDL];
}
-- (void)setTirePressure:(NSNumber<SDLBool> *)tirePressure {
+- (void)setTirePressure:(nullable NSNumber<SDLBool> *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -152,11 +154,11 @@
}
}
-- (NSNumber<SDLBool> *)tirePressure {
+- (nullable NSNumber<SDLBool> *)tirePressure {
return [parameters objectForKey:SDLNameTirePressure];
}
-- (void)setOdometer:(NSNumber<SDLBool> *)odometer {
+- (void)setOdometer:(nullable NSNumber<SDLBool> *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -164,11 +166,11 @@
}
}
-- (NSNumber<SDLBool> *)odometer {
+- (nullable NSNumber<SDLBool> *)odometer {
return [parameters objectForKey:SDLNameOdometer];
}
-- (void)setBeltStatus:(NSNumber<SDLBool> *)beltStatus {
+- (void)setBeltStatus:(nullable NSNumber<SDLBool> *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -176,11 +178,11 @@
}
}
-- (NSNumber<SDLBool> *)beltStatus {
+- (nullable NSNumber<SDLBool> *)beltStatus {
return [parameters objectForKey:SDLNameBeltStatus];
}
-- (void)setBodyInformation:(NSNumber<SDLBool> *)bodyInformation {
+- (void)setBodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -188,11 +190,11 @@
}
}
-- (NSNumber<SDLBool> *)bodyInformation {
+- (nullable NSNumber<SDLBool> *)bodyInformation {
return [parameters objectForKey:SDLNameBodyInformation];
}
-- (void)setDeviceStatus:(NSNumber<SDLBool> *)deviceStatus {
+- (void)setDeviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -200,11 +202,11 @@
}
}
-- (NSNumber<SDLBool> *)deviceStatus {
+- (nullable NSNumber<SDLBool> *)deviceStatus {
return [parameters objectForKey:SDLNameDeviceStatus];
}
-- (void)setDriverBraking:(NSNumber<SDLBool> *)driverBraking {
+- (void)setDriverBraking:(nullable NSNumber<SDLBool> *)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -212,11 +214,11 @@
}
}
-- (NSNumber<SDLBool> *)driverBraking {
+- (nullable NSNumber<SDLBool> *)driverBraking {
return [parameters objectForKey:SDLNameDriverBraking];
}
-- (void)setWiperStatus:(NSNumber<SDLBool> *)wiperStatus {
+- (void)setWiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -224,11 +226,11 @@
}
}
-- (NSNumber<SDLBool> *)wiperStatus {
+- (nullable NSNumber<SDLBool> *)wiperStatus {
return [parameters objectForKey:SDLNameWiperStatus];
}
-- (void)setHeadLampStatus:(NSNumber<SDLBool> *)headLampStatus {
+- (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -236,11 +238,11 @@
}
}
-- (NSNumber<SDLBool> *)headLampStatus {
+- (nullable NSNumber<SDLBool> *)headLampStatus {
return [parameters objectForKey:SDLNameHeadLampStatus];
}
-- (void)setEngineTorque:(NSNumber<SDLBool> *)engineTorque {
+- (void)setEngineTorque:(nullable NSNumber<SDLBool> *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -248,11 +250,11 @@
}
}
-- (NSNumber<SDLBool> *)engineTorque {
+- (nullable NSNumber<SDLBool> *)engineTorque {
return [parameters objectForKey:SDLNameEngineTorque];
}
-- (void)setAccPedalPosition:(NSNumber<SDLBool> *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -260,11 +262,11 @@
}
}
-- (NSNumber<SDLBool> *)accPedalPosition {
+- (nullable NSNumber<SDLBool> *)accPedalPosition {
return [parameters objectForKey:SDLNameAccelerationPedalPosition];
}
-- (void)setSteeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -272,11 +274,11 @@
}
}
-- (NSNumber<SDLBool> *)steeringWheelAngle {
+- (nullable NSNumber<SDLBool> *)steeringWheelAngle {
return [parameters objectForKey:SDLNameSteeringWheelAngle];
}
-- (void)setECallInfo:(NSNumber<SDLBool> *)eCallInfo {
+- (void)setECallInfo:(nullable NSNumber<SDLBool> *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -284,11 +286,11 @@
}
}
-- (NSNumber<SDLBool> *)eCallInfo {
+- (nullable NSNumber<SDLBool> *)eCallInfo {
return [parameters objectForKey:SDLNameECallInfo];
}
-- (void)setAirbagStatus:(NSNumber<SDLBool> *)airbagStatus {
+- (void)setAirbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -296,11 +298,11 @@
}
}
-- (NSNumber<SDLBool> *)airbagStatus {
+- (nullable NSNumber<SDLBool> *)airbagStatus {
return [parameters objectForKey:SDLNameAirbagStatus];
}
-- (void)setEmergencyEvent:(NSNumber<SDLBool> *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -308,11 +310,11 @@
}
}
-- (NSNumber<SDLBool> *)emergencyEvent {
+- (nullable NSNumber<SDLBool> *)emergencyEvent {
return [parameters objectForKey:SDLNameEmergencyEvent];
}
-- (void)setClusterModeStatus:(NSNumber<SDLBool> *)clusterModeStatus {
+- (void)setClusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus {
if (clusterModeStatus != nil) {
[parameters setObject:clusterModeStatus forKey:SDLNameClusterModeStatus];
} else {
@@ -320,11 +322,11 @@
}
}
-- (NSNumber<SDLBool> *)clusterModeStatus {
+- (nullable NSNumber<SDLBool> *)clusterModeStatus {
return [parameters objectForKey:SDLNameClusterModeStatus];
}
-- (void)setMyKey:(NSNumber<SDLBool> *)myKey {
+- (void)setMyKey:(nullable NSNumber<SDLBool> *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -332,8 +334,10 @@
}
}
-- (NSNumber<SDLBool> *)myKey {
+- (nullable NSNumber<SDLBool> *)myKey {
return [parameters objectForKey:SDLNameMyKey];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeWaypoints.h b/SmartDeviceLink/SDLUnsubscribeWaypoints.h
index ff7b15296..a93c707cd 100644
--- a/SmartDeviceLink/SDLUnsubscribeWaypoints.h
+++ b/SmartDeviceLink/SDLUnsubscribeWaypoints.h
@@ -3,6 +3,10 @@
#import "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeWaypoints : SDLRPCRequest
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeWaypoints.m b/SmartDeviceLink/SDLUnsubscribeWaypoints.m
index 40adfc43a..4c912c4ef 100644
--- a/SmartDeviceLink/SDLUnsubscribeWaypoints.m
+++ b/SmartDeviceLink/SDLUnsubscribeWaypoints.m
@@ -4,6 +4,8 @@
#import "SDLUnsubscribeWaypoints.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnsubscribeWaypoints
- (instancetype)init {
@@ -13,3 +15,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUpdateTurnList.h b/SmartDeviceLink/SDLUpdateTurnList.h
index 873459967..9071f7bc9 100644
--- a/SmartDeviceLink/SDLUpdateTurnList.h
+++ b/SmartDeviceLink/SDLUpdateTurnList.h
@@ -12,18 +12,23 @@
*<p>
* @since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUpdateTurnList : SDLRPCRequest
-- (instancetype)initWithTurnList:(NSArray<SDLTurn *> *)turnList softButtons:(NSArray<SDLSoftButton *> *)softButtons;
+- (instancetype)initWithTurnList:(nullable NSArray<SDLTurn *> *)turnList softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
/**
* Optional, SDLTurn, 1 - 100 entries
*/
-@property (strong) NSMutableArray<SDLTurn *> *turnList;
+@property (nullable, strong) NSMutableArray<SDLTurn *> *turnList;
/**
* Required, SDLSoftButton, 0 - 1 Entries
*/
-@property (strong) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUpdateTurnList.m b/SmartDeviceLink/SDLUpdateTurnList.m
index 532508add..62d62e4a0 100644
--- a/SmartDeviceLink/SDLUpdateTurnList.m
+++ b/SmartDeviceLink/SDLUpdateTurnList.m
@@ -8,6 +8,8 @@
#import "SDLSoftButton.h"
#import "SDLTurn.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUpdateTurnList
- (instancetype)init {
@@ -16,7 +18,7 @@
return self;
}
-- (instancetype)initWithTurnList:(NSArray<SDLTurn *> *)turnList softButtons:(NSArray<SDLSoftButton *> *)softButtons {
+- (instancetype)initWithTurnList:(nullable NSArray<SDLTurn *> *)turnList softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons {
self = [self init];
if (!self) {
return nil;
@@ -28,7 +30,7 @@
return self;
}
-- (void)setTurnList:(NSMutableArray<SDLTurn *> *)turnList {
+- (void)setTurnList:(nullable NSMutableArray<SDLTurn *> *)turnList {
if (turnList != nil) {
[parameters setObject:turnList forKey:SDLNameTurnList];
} else {
@@ -36,7 +38,7 @@
}
}
-- (NSMutableArray<SDLTurn *> *)turnList {
+- (nullable NSMutableArray<SDLTurn *> *)turnList {
NSMutableArray<SDLTurn *> *array = [parameters objectForKey:SDLNameTurnList];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLTurn.class]) {
return array;
@@ -49,7 +51,7 @@
}
}
-- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
+- (void)setSoftButtons:(nullable NSMutableArray<SDLSoftButton *> *)softButtons {
if (softButtons != nil) {
[parameters setObject:softButtons forKey:SDLNameSoftButtons];
} else {
@@ -57,7 +59,7 @@
}
}
-- (NSMutableArray<SDLSoftButton *> *)softButtons {
+- (nullable NSMutableArray<SDLSoftButton *> *)softButtons {
NSMutableArray<SDLSoftButton *> *array = [parameters objectForKey:SDLNameSoftButtons];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButton.class]) {
return array;
@@ -71,3 +73,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END