summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SmartDeviceLink/EAAccessory+SDLProtocols.h4
-rw-r--r--SmartDeviceLink/EAAccessory+SDLProtocols.m4
-rw-r--r--SmartDeviceLink/EAAccessoryManager+SDLProtocols.h6
-rw-r--r--SmartDeviceLink/EAAccessoryManager+SDLProtocols.m6
-rw-r--r--SmartDeviceLink/NSThread+ThreadIndex.h4
-rw-r--r--SmartDeviceLink/NSThread+ThreadIndex.m4
-rw-r--r--SmartDeviceLink/SDLAbstractProtocol.h10
-rw-r--r--SmartDeviceLink/SDLAbstractProtocol.m7
-rw-r--r--SmartDeviceLink/SDLAbstractTransport.h7
-rw-r--r--SmartDeviceLink/SDLAbstractTransport.m4
-rw-r--r--SmartDeviceLink/SDLAddCommand.h21
-rw-r--r--SmartDeviceLink/SDLAddCommand.m60
-rw-r--r--SmartDeviceLink/SDLAddCommandResponse.h5
-rw-r--r--SmartDeviceLink/SDLAddCommandResponse.m4
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.h7
-rw-r--r--SmartDeviceLink/SDLAddSubMenu.m8
-rw-r--r--SmartDeviceLink/SDLAddSubMenuResponse.h5
-rw-r--r--SmartDeviceLink/SDLAddSubMenuResponse.m4
-rw-r--r--SmartDeviceLink/SDLAirbagStatus.h4
-rw-r--r--SmartDeviceLink/SDLAirbagStatus.m4
-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/SDLAlertManeuverResponse.h5
-rw-r--r--SmartDeviceLink/SDLAlertManeuverResponse.m4
-rw-r--r--SmartDeviceLink/SDLAlertResponse.h7
-rw-r--r--SmartDeviceLink/SDLAlertResponse.m4
-rw-r--r--SmartDeviceLink/SDLAppInfo.h4
-rw-r--r--SmartDeviceLink/SDLAppInfo.m4
-rw-r--r--SmartDeviceLink/SDLAudioPassThruCapabilities.h5
-rw-r--r--SmartDeviceLink/SDLAudioPassThruCapabilities.m3
-rw-r--r--SmartDeviceLink/SDLBeltStatus.h4
-rw-r--r--SmartDeviceLink/SDLBeltStatus.m4
-rw-r--r--SmartDeviceLink/SDLBodyInformation.h13
-rw-r--r--SmartDeviceLink/SDLBodyInformation.m16
-rw-r--r--SmartDeviceLink/SDLButtonCapabilities.h5
-rw-r--r--SmartDeviceLink/SDLButtonCapabilities.m4
-rw-r--r--SmartDeviceLink/SDLChangeRegistration.h15
-rw-r--r--SmartDeviceLink/SDLChangeRegistration.m18
-rw-r--r--SmartDeviceLink/SDLChangeRegistrationResponse.h5
-rw-r--r--SmartDeviceLink/SDLChangeRegistrationResponse.m4
-rw-r--r--SmartDeviceLink/SDLChoice.h14
-rw-r--r--SmartDeviceLink/SDLChoice.m35
-rw-r--r--SmartDeviceLink/SDLClusterModeStatus.h3
-rw-r--r--SmartDeviceLink/SDLClusterModeStatus.m4
-rw-r--r--SmartDeviceLink/SDLConsoleController.h3
-rw-r--r--SmartDeviceLink/SDLCreateInteractionChoiceSet.h4
-rw-r--r--SmartDeviceLink/SDLCreateInteractionChoiceSet.m4
-rw-r--r--SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h5
-rw-r--r--SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m4
-rw-r--r--SmartDeviceLink/SDLDIDResult.h5
-rw-r--r--SmartDeviceLink/SDLDIDResult.m8
-rw-r--r--SmartDeviceLink/SDLDateTime.h4
-rw-r--r--SmartDeviceLink/SDLDebugTool.h4
-rw-r--r--SmartDeviceLink/SDLDebugToolConsole.h4
-rw-r--r--SmartDeviceLink/SDLDeleteCommand.h5
-rw-r--r--SmartDeviceLink/SDLDeleteCommand.m4
-rw-r--r--SmartDeviceLink/SDLDeleteCommandResponse.h5
-rw-r--r--SmartDeviceLink/SDLDeleteCommandResponse.m4
-rw-r--r--SmartDeviceLink/SDLDeleteFile.h5
-rw-r--r--SmartDeviceLink/SDLDeleteFile.m4
-rw-r--r--SmartDeviceLink/SDLDeleteFileResponse.h5
-rw-r--r--SmartDeviceLink/SDLDeleteFileResponse.m4
-rw-r--r--SmartDeviceLink/SDLDeleteInteractionChoiceSet.h5
-rw-r--r--SmartDeviceLink/SDLDeleteInteractionChoiceSet.m4
-rw-r--r--SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h5
-rw-r--r--SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m4
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.h5
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenu.m4
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenuResponse.h5
-rw-r--r--SmartDeviceLink/SDLDeleteSubMenuResponse.m4
-rw-r--r--SmartDeviceLink/SDLDeviceInfo.h15
-rw-r--r--SmartDeviceLink/SDLDeviceInfo.m28
-rw-r--r--SmartDeviceLink/SDLDeviceStatus.h5
-rw-r--r--SmartDeviceLink/SDLDeviceStatus.m4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessage.h5
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessage.m4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.h5
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.m4
-rw-r--r--SmartDeviceLink/SDLDialNumber.h5
-rw-r--r--SmartDeviceLink/SDLDialNumberResponse.h5
-rw-r--r--SmartDeviceLink/SDLDialNumberResponse.m3
-rw-r--r--SmartDeviceLink/SDLDisplayCapabilities.h13
-rw-r--r--SmartDeviceLink/SDLDisplayCapabilities.m26
-rw-r--r--SmartDeviceLink/SDLECallInfo.h3
-rw-r--r--SmartDeviceLink/SDLECallInfo.m3
-rw-r--r--SmartDeviceLink/SDLEmergencyEvent.h3
-rw-r--r--SmartDeviceLink/SDLEmergencyEvent.m4
-rw-r--r--SmartDeviceLink/SDLEncodedSyncPData.h4
-rw-r--r--SmartDeviceLink/SDLEncodedSyncPData.m4
-rw-r--r--SmartDeviceLink/SDLEncodedSyncPDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLEncodedSyncPDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLEndAudioPassThru.h5
-rw-r--r--SmartDeviceLink/SDLEndAudioPassThru.m4
-rw-r--r--SmartDeviceLink/SDLEndAudioPassThruResponse.h5
-rw-r--r--SmartDeviceLink/SDLEndAudioPassThruResponse.m4
-rw-r--r--SmartDeviceLink/SDLFunctionID.h8
-rw-r--r--SmartDeviceLink/SDLFunctionID.m8
-rw-r--r--SmartDeviceLink/SDLGPSData.h5
-rw-r--r--SmartDeviceLink/SDLGPSData.m4
-rw-r--r--SmartDeviceLink/SDLGenericResponse.h5
-rw-r--r--SmartDeviceLink/SDLGenericResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetDTCs.h7
-rw-r--r--SmartDeviceLink/SDLGetDTCs.m8
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.h5
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.h55
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.m104
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.h55
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.m166
-rw-r--r--SmartDeviceLink/SDLGetWaypoints.h11
-rw-r--r--SmartDeviceLink/SDLGetWaypoints.m8
-rw-r--r--SmartDeviceLink/SDLGetWaypointsResponse.h8
-rw-r--r--SmartDeviceLink/SDLGetWaypointsResponse.m8
-rw-r--r--SmartDeviceLink/SDLGlobals.h6
-rw-r--r--SmartDeviceLink/SDLGlobals.m7
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.h8
-rw-r--r--SmartDeviceLink/SDLHMICapabilities.m12
-rw-r--r--SmartDeviceLink/SDLHMIPermissions.h5
-rw-r--r--SmartDeviceLink/SDLHMIPermissions.m4
-rw-r--r--SmartDeviceLink/SDLHeadLampStatus.h7
-rw-r--r--SmartDeviceLink/SDLHeadLampStatus.m8
-rw-r--r--SmartDeviceLink/SDLHexUtility.h4
-rw-r--r--SmartDeviceLink/SDLHexUtility.m4
-rw-r--r--SmartDeviceLink/SDLIAPSession.h14
-rw-r--r--SmartDeviceLink/SDLIAPSession.m18
-rw-r--r--SmartDeviceLink/SDLIAPSessionDelegate.h4
-rw-r--r--SmartDeviceLink/SDLIAPTransport.h7
-rw-r--r--SmartDeviceLink/SDLIAPTransport.m42
-rw-r--r--SmartDeviceLink/SDLImage.h5
-rw-r--r--SmartDeviceLink/SDLImage.m4
-rw-r--r--SmartDeviceLink/SDLImageField.h6
-rw-r--r--SmartDeviceLink/SDLImageField.m14
-rw-r--r--SmartDeviceLink/SDLImageResolution.h4
-rw-r--r--SmartDeviceLink/SDLImageResolution.m4
-rw-r--r--SmartDeviceLink/SDLKeyboardProperties.h16
-rw-r--r--SmartDeviceLink/SDLKeyboardProperties.m26
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m10
-rw-r--r--SmartDeviceLink/SDLListFiles.h5
-rw-r--r--SmartDeviceLink/SDLListFiles.m4
-rw-r--r--SmartDeviceLink/SDLListFilesResponse.h7
-rw-r--r--SmartDeviceLink/SDLListFilesResponse.m8
-rw-r--r--SmartDeviceLink/SDLLocationCoordinate.h4
-rw-r--r--SmartDeviceLink/SDLLocationCoordinate.m4
-rw-r--r--SmartDeviceLink/SDLLocationDetails.h18
-rw-r--r--SmartDeviceLink/SDLLocationDetails.m32
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.h5
-rw-r--r--SmartDeviceLink/SDLLockScreenStatusManager.m5
-rw-r--r--SmartDeviceLink/SDLMenuParams.h9
-rw-r--r--SmartDeviceLink/SDLMenuParams.m12
-rw-r--r--SmartDeviceLink/SDLMyKey.h3
-rw-r--r--SmartDeviceLink/SDLMyKey.m4
-rw-r--r--SmartDeviceLink/SDLNames.h4
-rw-r--r--SmartDeviceLink/SDLNames.m4
-rw-r--r--SmartDeviceLink/SDLOasisAddress.h26
-rw-r--r--SmartDeviceLink/SDLOasisAddress.m44
-rw-r--r--SmartDeviceLink/SDLObjectWithPriority.h9
-rw-r--r--SmartDeviceLink/SDLObjectWithPriority.m7
-rw-r--r--SmartDeviceLink/SDLOnAppInterfaceUnregistered.h5
-rw-r--r--SmartDeviceLink/SDLOnAppInterfaceUnregistered.m4
-rw-r--r--SmartDeviceLink/SDLOnAudioPassThru.h5
-rw-r--r--SmartDeviceLink/SDLOnAudioPassThru.m4
-rw-r--r--SmartDeviceLink/SDLOnButtonEvent.h7
-rw-r--r--SmartDeviceLink/SDLOnButtonEvent.m8
-rw-r--r--SmartDeviceLink/SDLOnButtonPress.h7
-rw-r--r--SmartDeviceLink/SDLOnButtonPress.m8
-rw-r--r--SmartDeviceLink/SDLOnCommand.h5
-rw-r--r--SmartDeviceLink/SDLOnCommand.m4
-rw-r--r--SmartDeviceLink/SDLOnDriverDistraction.h5
-rw-r--r--SmartDeviceLink/SDLOnDriverDistraction.m4
-rw-r--r--SmartDeviceLink/SDLOnEncodedSyncPData.h7
-rw-r--r--SmartDeviceLink/SDLOnEncodedSyncPData.m12
-rw-r--r--SmartDeviceLink/SDLOnHMIStatus.h5
-rw-r--r--SmartDeviceLink/SDLOnHMIStatus.m4
-rw-r--r--SmartDeviceLink/SDLOnHashChange.h4
-rw-r--r--SmartDeviceLink/SDLOnHashChange.m4
-rw-r--r--SmartDeviceLink/SDLOnKeyboardInput.h5
-rw-r--r--SmartDeviceLink/SDLOnKeyboardInput.m8
-rw-r--r--SmartDeviceLink/SDLOnLanguageChange.h5
-rw-r--r--SmartDeviceLink/SDLOnLanguageChange.m4
-rw-r--r--SmartDeviceLink/SDLOnLockScreenStatus.h5
-rw-r--r--SmartDeviceLink/SDLOnLockScreenStatus.m3
-rw-r--r--SmartDeviceLink/SDLOnPermissionsChange.h5
-rw-r--r--SmartDeviceLink/SDLOnPermissionsChange.m4
-rw-r--r--SmartDeviceLink/SDLOnSyncPData.h8
-rw-r--r--SmartDeviceLink/SDLOnSyncPData.m12
-rw-r--r--SmartDeviceLink/SDLOnSystemRequest.h13
-rw-r--r--SmartDeviceLink/SDLOnSystemRequest.m24
-rw-r--r--SmartDeviceLink/SDLOnTBTClientState.h4
-rw-r--r--SmartDeviceLink/SDLOnTBTClientState.m4
-rw-r--r--SmartDeviceLink/SDLOnTouchEvent.h4
-rw-r--r--SmartDeviceLink/SDLOnTouchEvent.m4
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.h55
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.m169
-rw-r--r--SmartDeviceLink/SDLOnWaypointChange.h6
-rw-r--r--SmartDeviceLink/SDLOnWaypointChange.m4
-rw-r--r--SmartDeviceLink/SDLParameterPermissions.h5
-rw-r--r--SmartDeviceLink/SDLParameterPermissions.m4
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThru.h15
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThru.m22
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThruResponse.h5
-rw-r--r--SmartDeviceLink/SDLPerformAudioPassThruResponse.m4
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.h29
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.m59
-rw-r--r--SmartDeviceLink/SDLPerformInteractionResponse.h11
-rw-r--r--SmartDeviceLink/SDLPerformInteractionResponse.m12
-rw-r--r--SmartDeviceLink/SDLPermissionItem.h3
-rw-r--r--SmartDeviceLink/SDLPermissionItem.m16
-rw-r--r--SmartDeviceLink/SDLPolicyDataParser.h6
-rw-r--r--SmartDeviceLink/SDLPolicyDataParser.m21
-rw-r--r--SmartDeviceLink/SDLPresetBankCapabilities.h5
-rw-r--r--SmartDeviceLink/SDLPresetBankCapabilities.m4
-rw-r--r--SmartDeviceLink/SDLPrioritizedObjectCollection.h8
-rw-r--r--SmartDeviceLink/SDLPrioritizedObjectCollection.m7
-rw-r--r--SmartDeviceLink/SDLProtocol.h5
-rw-r--r--SmartDeviceLink/SDLProtocol.m66
-rw-r--r--SmartDeviceLink/SDLProtocolHeader.h5
-rw-r--r--SmartDeviceLink/SDLProtocolHeader.m8
-rw-r--r--SmartDeviceLink/SDLProtocolListener.h3
-rw-r--r--SmartDeviceLink/SDLProtocolMessage.h11
-rw-r--r--SmartDeviceLink/SDLProtocolMessage.m12
-rw-r--r--SmartDeviceLink/SDLProtocolMessageAssembler.h6
-rw-r--r--SmartDeviceLink/SDLProtocolMessageAssembler.m10
-rw-r--r--SmartDeviceLink/SDLProtocolMessageDisassembler.h3
-rw-r--r--SmartDeviceLink/SDLProtocolMessageDisassembler.m3
-rw-r--r--SmartDeviceLink/SDLProtocolReceivedMessageRouter.h5
-rw-r--r--SmartDeviceLink/SDLProtocolReceivedMessageRouter.m23
-rw-r--r--SmartDeviceLink/SDLProxy.h16
-rw-r--r--SmartDeviceLink/SDLProxy.m62
-rw-r--r--SmartDeviceLink/SDLProxyFactory.h6
-rw-r--r--SmartDeviceLink/SDLProxyFactory.m5
-rw-r--r--SmartDeviceLink/SDLProxyListener.h3
-rw-r--r--SmartDeviceLink/SDLPutFile.h13
-rw-r--r--SmartDeviceLink/SDLPutFile.m20
-rw-r--r--SmartDeviceLink/SDLPutFileResponse.h5
-rw-r--r--SmartDeviceLink/SDLPutFileResponse.m4
-rw-r--r--SmartDeviceLink/SDLRPCMessage.h14
-rw-r--r--SmartDeviceLink/SDLRPCMessage.m19
-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.h4
-rw-r--r--SmartDeviceLink/SDLRPCRequest.m4
-rw-r--r--SmartDeviceLink/SDLRPCRequestFactory.h233
-rw-r--r--SmartDeviceLink/SDLRPCRequestFactory.m756
-rw-r--r--SmartDeviceLink/SDLRPCResponse.h6
-rw-r--r--SmartDeviceLink/SDLRPCResponse.m8
-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/SDLReadDIDResponse.h7
-rw-r--r--SmartDeviceLink/SDLReadDIDResponse.m4
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.h23
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterface.m101
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.h39
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.m98
-rw-r--r--SmartDeviceLink/SDLRequestHandler.h4
-rw-r--r--SmartDeviceLink/SDLResetGlobalProperties.h5
-rw-r--r--SmartDeviceLink/SDLResetGlobalProperties.m4
-rw-r--r--SmartDeviceLink/SDLResetGlobalPropertiesResponse.h5
-rw-r--r--SmartDeviceLink/SDLResetGlobalPropertiesResponse.m4
-rw-r--r--SmartDeviceLink/SDLScreenParams.h5
-rw-r--r--SmartDeviceLink/SDLScreenParams.m20
-rw-r--r--SmartDeviceLink/SDLScrollableMessage.h11
-rw-r--r--SmartDeviceLink/SDLScrollableMessage.m14
-rw-r--r--SmartDeviceLink/SDLScrollableMessageResponse.h5
-rw-r--r--SmartDeviceLink/SDLSendLocation.h28
-rw-r--r--SmartDeviceLink/SDLSendLocation.m71
-rw-r--r--SmartDeviceLink/SDLSendLocationResponse.h4
-rw-r--r--SmartDeviceLink/SDLSendLocationResponse.m4
-rw-r--r--SmartDeviceLink/SDLSetAppIcon.h5
-rw-r--r--SmartDeviceLink/SDLSetAppIconResponse.h5
-rw-r--r--SmartDeviceLink/SDLSetAppIconResponse.m4
-rw-r--r--SmartDeviceLink/SDLSetDisplayLayout.h5
-rw-r--r--SmartDeviceLink/SDLSetDisplayLayout.m4
-rw-r--r--SmartDeviceLink/SDLSetDisplayLayoutResponse.h13
-rw-r--r--SmartDeviceLink/SDLSetDisplayLayoutResponse.m28
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.h25
-rw-r--r--SmartDeviceLink/SDLSetGlobalProperties.m49
-rw-r--r--SmartDeviceLink/SDLSetGlobalPropertiesResponse.h5
-rw-r--r--SmartDeviceLink/SDLSetGlobalPropertiesResponse.m4
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimer.h9
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimer.m24
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimerResponse.h5
-rw-r--r--SmartDeviceLink/SDLSetMediaClockTimerResponse.m4
-rw-r--r--SmartDeviceLink/SDLShow.h38
-rw-r--r--SmartDeviceLink/SDLShow.m12
-rw-r--r--SmartDeviceLink/SDLShowConstantTBT.h29
-rw-r--r--SmartDeviceLink/SDLShowConstantTBT.m62
-rw-r--r--SmartDeviceLink/SDLShowConstantTBTResponse.h5
-rw-r--r--SmartDeviceLink/SDLShowConstantTBTResponse.m4
-rw-r--r--SmartDeviceLink/SDLShowResponse.h5
-rw-r--r--SmartDeviceLink/SDLShowResponse.m4
-rw-r--r--SmartDeviceLink/SDLSingleTireStatus.h5
-rw-r--r--SmartDeviceLink/SDLSlider.h13
-rw-r--r--SmartDeviceLink/SDLSlider.m16
-rw-r--r--SmartDeviceLink/SDLSliderResponse.h7
-rw-r--r--SmartDeviceLink/SDLSliderResponse.m4
-rw-r--r--SmartDeviceLink/SDLSoftButton.h15
-rw-r--r--SmartDeviceLink/SDLSoftButton.m29
-rw-r--r--SmartDeviceLink/SDLSoftButtonCapabilities.h5
-rw-r--r--SmartDeviceLink/SDLSoftButtonCapabilities.m4
-rw-r--r--SmartDeviceLink/SDLSpeak.h5
-rw-r--r--SmartDeviceLink/SDLSpeak.m4
-rw-r--r--SmartDeviceLink/SDLSpeakResponse.h5
-rw-r--r--SmartDeviceLink/SDLSpeakResponse.m4
-rw-r--r--SmartDeviceLink/SDLStartTime.h5
-rw-r--r--SmartDeviceLink/SDLStartTime.m4
-rw-r--r--SmartDeviceLink/SDLStreamDelegate.h14
-rw-r--r--SmartDeviceLink/SDLStreamDelegate.m4
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.h9
-rw-r--r--SmartDeviceLink/SDLSubscribeButton.m7
-rw-r--r--SmartDeviceLink/SDLSubscribeButtonResponse.h5
-rw-r--r--SmartDeviceLink/SDLSubscribeButtonResponse.m4
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.h53
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.m100
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.h51
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.m244
-rw-r--r--SmartDeviceLink/SDLSubscribeWaypoints.h13
-rw-r--r--SmartDeviceLink/SDLSubscribeWaypoints.m8
-rw-r--r--SmartDeviceLink/SDLSubscribeWaypointsResponse.h8
-rw-r--r--SmartDeviceLink/SDLSyncMsgVersion.h5
-rw-r--r--SmartDeviceLink/SDLSyncMsgVersion.m4
-rw-r--r--SmartDeviceLink/SDLSyncPData.h4
-rw-r--r--SmartDeviceLink/SDLSyncPData.m4
-rw-r--r--SmartDeviceLink/SDLSyncPDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLSyncPDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLSystemRequest.h9
-rw-r--r--SmartDeviceLink/SDLSystemRequest.m10
-rw-r--r--SmartDeviceLink/SDLSystemRequestResponse.h5
-rw-r--r--SmartDeviceLink/SDLSystemRequestResponse.m4
-rw-r--r--SmartDeviceLink/SDLTCPTransport.h6
-rw-r--r--SmartDeviceLink/SDLTCPTransport.m34
-rw-r--r--SmartDeviceLink/SDLTTSChunk.h5
-rw-r--r--SmartDeviceLink/SDLTTSChunk.m6
-rw-r--r--SmartDeviceLink/SDLTTSChunkFactory.h19
-rw-r--r--SmartDeviceLink/SDLTTSChunkFactory.m24
-rw-r--r--SmartDeviceLink/SDLTextField.h5
-rw-r--r--SmartDeviceLink/SDLTextField.m3
-rw-r--r--SmartDeviceLink/SDLTimer.h8
-rw-r--r--SmartDeviceLink/SDLTimer.m13
-rw-r--r--SmartDeviceLink/SDLTireStatus.h7
-rw-r--r--SmartDeviceLink/SDLTireStatus.m42
-rw-r--r--SmartDeviceLink/SDLTouchCoord.h4
-rw-r--r--SmartDeviceLink/SDLTouchCoord.m4
-rw-r--r--SmartDeviceLink/SDLTouchEvent.h4
-rw-r--r--SmartDeviceLink/SDLTouchEvent.m4
-rw-r--r--SmartDeviceLink/SDLTouchEventCapabilities.h4
-rw-r--r--SmartDeviceLink/SDLTouchEventCapabilities.m4
-rw-r--r--SmartDeviceLink/SDLTransportDelegate.h6
-rw-r--r--SmartDeviceLink/SDLTurn.h9
-rw-r--r--SmartDeviceLink/SDLTurn.m19
-rw-r--r--SmartDeviceLink/SDLUnregisterAppInterface.h5
-rw-r--r--SmartDeviceLink/SDLUnregisterAppInterface.m4
-rw-r--r--SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h5
-rw-r--r--SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButton.h5
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButton.m4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButtonResponse.h5
-rw-r--r--SmartDeviceLink/SDLUnsubscribeButtonResponse.m4
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.h53
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.m100
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h53
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m240
-rw-r--r--SmartDeviceLink/SDLUnsubscribeWaypoints.h12
-rw-r--r--SmartDeviceLink/SDLUnsubscribeWaypoints.m8
-rw-r--r--SmartDeviceLink/SDLUnsubscribeWaypointsResponse.h8
-rw-r--r--SmartDeviceLink/SDLUnsubscribeWaypointsResponse.m4
-rw-r--r--SmartDeviceLink/SDLUpdateTurnList.h11
-rw-r--r--SmartDeviceLink/SDLUpdateTurnList.m14
-rw-r--r--SmartDeviceLink/SDLUpdateTurnListResponse.h5
-rw-r--r--SmartDeviceLink/SDLUpdateTurnListResponse.m4
-rw-r--r--SmartDeviceLink/SDLUploadFileOperation.m2
-rw-r--r--SmartDeviceLink/SDLV1ProtocolHeader.h4
-rw-r--r--SmartDeviceLink/SDLV1ProtocolHeader.m6
-rw-r--r--SmartDeviceLink/SDLV1ProtocolMessage.h7
-rw-r--r--SmartDeviceLink/SDLV1ProtocolMessage.m8
-rw-r--r--SmartDeviceLink/SDLV2ProtocolHeader.h4
-rw-r--r--SmartDeviceLink/SDLV2ProtocolMessage.h7
-rw-r--r--SmartDeviceLink/SDLV2ProtocolMessage.m7
-rw-r--r--SmartDeviceLink/SDLVehicleDataResult.h4
-rw-r--r--SmartDeviceLink/SDLVehicleDataResult.m4
-rw-r--r--SmartDeviceLink/SDLVehicleType.h13
-rw-r--r--SmartDeviceLink/SDLVehicleType.m20
-rw-r--r--SmartDeviceLink/SDLVrHelpItem.h9
-rw-r--r--SmartDeviceLink/SDLVrHelpItem.m18
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLResponseDispatcherSpec.m15
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLUploadFileOperationSpec.m6
391 files changed, 4331 insertions, 1843 deletions
diff --git a/SmartDeviceLink/EAAccessory+SDLProtocols.h b/SmartDeviceLink/EAAccessory+SDLProtocols.h
index 417b5b07b..0c729b796 100644
--- a/SmartDeviceLink/EAAccessory+SDLProtocols.h
+++ b/SmartDeviceLink/EAAccessory+SDLProtocols.h
@@ -4,8 +4,12 @@
#import <ExternalAccessory/ExternalAccessory.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface EAAccessory (SDLProtocols)
- (BOOL)supportsProtocol:(NSString *)protocol;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/EAAccessory+SDLProtocols.m b/SmartDeviceLink/EAAccessory+SDLProtocols.m
index bffeeb829..881fea352 100644
--- a/SmartDeviceLink/EAAccessory+SDLProtocols.m
+++ b/SmartDeviceLink/EAAccessory+SDLProtocols.m
@@ -4,6 +4,8 @@
#import "EAAccessory+SDLProtocols.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation EAAccessory (SDLProtocols)
- (BOOL)supportsProtocol:(NSString *)protocol {
@@ -17,3 +19,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/EAAccessoryManager+SDLProtocols.h b/SmartDeviceLink/EAAccessoryManager+SDLProtocols.h
index b4b39d943..c2d45cb2e 100644
--- a/SmartDeviceLink/EAAccessoryManager+SDLProtocols.h
+++ b/SmartDeviceLink/EAAccessoryManager+SDLProtocols.h
@@ -4,8 +4,12 @@
#import <ExternalAccessory/ExternalAccessory.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface EAAccessoryManager (SDLProtocols)
-+ (EAAccessory *)findAccessoryForProtocol:(NSString *)protocol;
++ (nullable EAAccessory *)findAccessoryForProtocol:(NSString *)protocol;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/EAAccessoryManager+SDLProtocols.m b/SmartDeviceLink/EAAccessoryManager+SDLProtocols.m
index 38b0b2477..69d5f408a 100644
--- a/SmartDeviceLink/EAAccessoryManager+SDLProtocols.m
+++ b/SmartDeviceLink/EAAccessoryManager+SDLProtocols.m
@@ -5,9 +5,11 @@
#import "EAAccessory+SDLProtocols.h"
#import "EAAccessoryManager+SDLProtocols.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation EAAccessoryManager (SDLProtocols)
-+ (EAAccessory *)findAccessoryForProtocol:(NSString *)protocol {
++ (nullable EAAccessory *)findAccessoryForProtocol:(NSString *)protocol {
for (EAAccessory *accessory in [[EAAccessoryManager sharedAccessoryManager] connectedAccessories]) {
if ([accessory supportsProtocol:protocol]) {
return accessory;
@@ -18,3 +20,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/NSThread+ThreadIndex.h b/SmartDeviceLink/NSThread+ThreadIndex.h
index 60459e3e2..19bf1204d 100644
--- a/SmartDeviceLink/NSThread+ThreadIndex.h
+++ b/SmartDeviceLink/NSThread+ThreadIndex.h
@@ -4,6 +4,10 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface NSThread (ThreadIndex)
- (NSInteger)threadIndex;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/NSThread+ThreadIndex.m b/SmartDeviceLink/NSThread+ThreadIndex.m
index 88d58c9f3..6238359fe 100644
--- a/SmartDeviceLink/NSThread+ThreadIndex.m
+++ b/SmartDeviceLink/NSThread+ThreadIndex.m
@@ -4,6 +4,8 @@
#import "NSThread+ThreadIndex.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation NSThread (ThreadIndex)
- (NSInteger)threadIndex {
@@ -21,3 +23,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAbstractProtocol.h b/SmartDeviceLink/SDLAbstractProtocol.h
index 672f1b994..45e00b434 100644
--- a/SmartDeviceLink/SDLAbstractProtocol.h
+++ b/SmartDeviceLink/SDLAbstractProtocol.h
@@ -9,13 +9,14 @@
#import "SDLSecurityType.h"
#import "SDLTransportDelegate.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLAbstractProtocol : NSObject <SDLTransportDelegate>
@property (strong, nonatomic) NSString *debugConsoleGroupName;
-@property (weak, nonatomic) SDLAbstractTransport *transport;
-@property (strong, nonatomic) NSHashTable<id<SDLProtocolListener>> *protocolDelegateTable;
-@property (nonatomic, strong) id<SDLSecurityType> securityManager;
+@property (nullable, weak, nonatomic) SDLAbstractTransport *transport;
+@property (nullable, strong, nonatomic) NSHashTable<id<SDLProtocolListener>> *protocolDelegateTable;
+@property (nullable, nonatomic, strong) id<SDLSecurityType> securityManager;
@property (nonatomic, copy) NSString *appId;
// Sending
@@ -35,6 +36,7 @@
// Recieving
- (void)handleBytesFromTransport:(NSData *)receivedData;
-- (void)dispose;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAbstractProtocol.m b/SmartDeviceLink/SDLAbstractProtocol.m
index 37d18bfef..09b882b66 100644
--- a/SmartDeviceLink/SDLAbstractProtocol.m
+++ b/SmartDeviceLink/SDLAbstractProtocol.m
@@ -4,6 +4,7 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLAbstractProtocol
@@ -69,10 +70,6 @@
[self doesNotRecognizeSelector:_cmd];
}
-- (void)dispose {
- [self doesNotRecognizeSelector:_cmd];
-}
-
#pragma - SDLTransportListener Implementation
- (void)onTransportConnected {
@@ -96,3 +93,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAbstractTransport.h b/SmartDeviceLink/SDLAbstractTransport.h
index d5224a95d..0273b8425 100644
--- a/SmartDeviceLink/SDLAbstractTransport.h
+++ b/SmartDeviceLink/SDLAbstractTransport.h
@@ -4,15 +4,18 @@
#import "SDLTransportDelegate.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAbstractTransport : NSObject
-@property (weak, nonatomic) id<SDLTransportDelegate> delegate;
+@property (nullable, weak, nonatomic) id<SDLTransportDelegate> delegate;
@property (strong, nonatomic) NSString *debugConsoleGroupName;
- (void)connect;
- (void)disconnect;
- (void)sendData:(NSData *)dataToSend;
-- (void)dispose;
- (double)retryDelay;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAbstractTransport.m b/SmartDeviceLink/SDLAbstractTransport.m
index 6d7437748..94649553b 100644
--- a/SmartDeviceLink/SDLAbstractTransport.m
+++ b/SmartDeviceLink/SDLAbstractTransport.m
@@ -22,10 +22,6 @@
[self doesNotRecognizeSelector:_cmd];
}
-- (void)dispose {
- [self doesNotRecognizeSelector:_cmd];
-}
-
- (double)retryDelay {
[self doesNotRecognizeSelector:_cmd];
return 0.0;
diff --git a/SmartDeviceLink/SDLAddCommand.h b/SmartDeviceLink/SDLAddCommand.h
index 107f685bd..59ef5cb02 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, nonatomic) SDLMenuParams *menuParams;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<NSString *> *vrCommands;
+@property (nullable, strong, nonatomic) NSMutableArray<NSString *> *vrCommands;
/**
* @abstract Image struct containing a static or dynamic icon
@@ -99,6 +102,8 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLImage *cmdIcon;
+@property (nullable, strong, nonatomic) SDLImage *cmdIcon;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddCommand.m b/SmartDeviceLink/SDLAddCommand.m
index 7d360a924..37d70d19c 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,16 +87,16 @@
}
}
-- (SDLMenuParams *)menuParams {
+- (nullable SDLMenuParams *)menuParams {
NSObject *obj = [parameters objectForKey:SDLNameMenuParams];
- if (obj == nil || [obj isKindOfClass:SDLMenuParams.class]) {
- return (SDLMenuParams *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLMenuParams alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLMenuParams*)obj;
}
-- (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,13 +116,15 @@
}
}
-- (SDLImage *)cmdIcon {
+- (nullable SDLImage *)cmdIcon {
NSObject *obj = [parameters objectForKey:SDLNameCommandIcon];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddCommandResponse.h b/SmartDeviceLink/SDLAddCommandResponse.h
index ee037f281..554f59d82 100644
--- a/SmartDeviceLink/SDLAddCommandResponse.h
+++ b/SmartDeviceLink/SDLAddCommandResponse.h
@@ -9,6 +9,11 @@
*
* Since <b>SmartDeviceLink 1.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAddCommandResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddCommandResponse.m b/SmartDeviceLink/SDLAddCommandResponse.m
index f02a460a1..d5504c4c8 100644
--- a/SmartDeviceLink/SDLAddCommandResponse.m
+++ b/SmartDeviceLink/SDLAddCommandResponse.m
@@ -4,6 +4,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAddCommandResponse
- (instancetype)init {
@@ -13,3 +15,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddSubMenu.h b/SmartDeviceLink/SDLAddSubMenu.h
index cc0c2bcd8..b411a43bd 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:(UInt32)menuId menuName:(NSString *)menuName;
@@ -47,7 +50,7 @@
* the end of the list</li>
* </ul>
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *position;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *menuName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddSubMenu.m b/SmartDeviceLink/SDLAddSubMenu.m
index afd0e5cd4..8388acc10 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/SDLAddSubMenuResponse.h b/SmartDeviceLink/SDLAddSubMenuResponse.h
index b3124433b..17305aace 100644
--- a/SmartDeviceLink/SDLAddSubMenuResponse.h
+++ b/SmartDeviceLink/SDLAddSubMenuResponse.h
@@ -7,6 +7,11 @@
* SDLAddSubMenuResponse is sent, when SDLAddSubMenu has been called
* Since <b>SmartDeviceLink 1.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAddSubMenuResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAddSubMenuResponse.m b/SmartDeviceLink/SDLAddSubMenuResponse.m
index 328a38401..db483cf3a 100644
--- a/SmartDeviceLink/SDLAddSubMenuResponse.m
+++ b/SmartDeviceLink/SDLAddSubMenuResponse.m
@@ -4,6 +4,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAddSubMenuResponse
- (instancetype)init {
@@ -13,3 +15,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAirbagStatus.h b/SmartDeviceLink/SDLAirbagStatus.h
index 455d525f3..ce10945c7 100644
--- a/SmartDeviceLink/SDLAirbagStatus.h
+++ b/SmartDeviceLink/SDLAirbagStatus.h
@@ -5,6 +5,8 @@
#import "SDLVehicleDataEventStatus.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAirbagStatus : SDLRPCStruct
@property (strong, nonatomic) SDLVehicleDataEventStatus driverAirbagDeployed;
@@ -17,3 +19,5 @@
@property (strong, nonatomic) SDLVehicleDataEventStatus passengerKneeAirbagDeployed;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAirbagStatus.m b/SmartDeviceLink/SDLAirbagStatus.m
index 099bfe4f5..a320d40fc 100644
--- a/SmartDeviceLink/SDLAirbagStatus.m
+++ b/SmartDeviceLink/SDLAirbagStatus.m
@@ -4,6 +4,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAirbagStatus
- (void)setDriverAirbagDeployed:(SDLVehicleDataEventStatus)driverAirbagDeployed {
@@ -111,3 +113,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlert.h b/SmartDeviceLink/SDLAlert.h
index 17009bac7..22b4e9d50 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, nonatomic) NSString *alertText1;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *alertText2;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *alertText3;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<SDLTTSChunk *> *ttsChunks;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLInt> *duration;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLBool> *playTone;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLBool> *progressIndicator;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *progressIndicator;
/**
* @abstract App defined SoftButtons.
@@ -150,6 +153,8 @@
*
* @see SDLSoftButton
*/
-@property (strong, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlert.m b/SmartDeviceLink/SDLAlert.m
index 0c8c3ab88..c1a1f04d4 100644
--- a/SmartDeviceLink/SDLAlert.m
+++ b/SmartDeviceLink/SDLAlert.m
@@ -8,6 +8,8 @@
static UInt16 const SDLDefaultDuration = 5000;
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAlert
- (instancetype)init {
@@ -16,44 +18,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;
@@ -70,7 +72,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 {
@@ -78,11 +80,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 {
@@ -90,11 +92,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 {
@@ -102,11 +104,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 {
@@ -114,7 +116,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;
@@ -127,7 +129,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 {
@@ -135,11 +137,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 {
@@ -147,11 +149,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 {
@@ -159,11 +161,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 {
@@ -171,7 +173,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;
@@ -185,3 +187,5 @@ static UInt16 const SDLDefaultDuration = 5000;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlertManeuver.h b/SmartDeviceLink/SDLAlertManeuver.h
index 0c1e95829..66baa8585 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, nonatomic) NSMutableArray<SDLTTSChunk *> *ttsChunks;
-@property (strong, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLTTSChunk *> *ttsChunks;
+@property (nullable, strong, nonatomic) 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/SDLAlertManeuverResponse.h b/SmartDeviceLink/SDLAlertManeuverResponse.h
index 41dcaaa5e..d541cde0e 100644
--- a/SmartDeviceLink/SDLAlertManeuverResponse.h
+++ b/SmartDeviceLink/SDLAlertManeuverResponse.h
@@ -7,6 +7,11 @@
/** SDLAlertManeuverResponse is sent, when SDLAlertManeuver has been called.
* @since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAlertManeuverResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlertManeuverResponse.m b/SmartDeviceLink/SDLAlertManeuverResponse.m
index 60581be85..b66d13afe 100644
--- a/SmartDeviceLink/SDLAlertManeuverResponse.m
+++ b/SmartDeviceLink/SDLAlertManeuverResponse.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAlertManeuverResponse
- (instancetype)init {
@@ -14,3 +16,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlertResponse.h b/SmartDeviceLink/SDLAlertResponse.h
index b81619042..a2883778c 100644
--- a/SmartDeviceLink/SDLAlertResponse.h
+++ b/SmartDeviceLink/SDLAlertResponse.h
@@ -8,8 +8,13 @@
* Sent after SDLAlert has been sent
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAlertResponse : SDLRPCResponse
-@property (strong, nonatomic) NSNumber<SDLInt> *tryAgainTime;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *tryAgainTime;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAlertResponse.m b/SmartDeviceLink/SDLAlertResponse.m
index e2a3af5e1..e608b807c 100644
--- a/SmartDeviceLink/SDLAlertResponse.m
+++ b/SmartDeviceLink/SDLAlertResponse.m
@@ -13,7 +13,7 @@
return self;
}
-- (void)setTryAgainTime:(NSNumber<SDLInt> *)tryAgainTime {
+- (void)setTryAgainTime:(nullable NSNumber<SDLInt> *)tryAgainTime {
if (tryAgainTime != nil) {
[parameters setObject:tryAgainTime forKey:SDLNameTryAgainTime];
} else {
@@ -21,7 +21,7 @@
}
}
-- (NSNumber<SDLInt> *)tryAgainTime {
+- (nullable NSNumber<SDLInt> *)tryAgainTime {
return [parameters objectForKey:SDLNameTryAgainTime];
}
diff --git a/SmartDeviceLink/SDLAppInfo.h b/SmartDeviceLink/SDLAppInfo.h
index 64a700d6f..98a573970 100644
--- a/SmartDeviceLink/SDLAppInfo.h
+++ b/SmartDeviceLink/SDLAppInfo.h
@@ -3,6 +3,8 @@
#import "SDLRPCStruct.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAppInfo : SDLRPCStruct
+ (instancetype)currentAppInfo;
@@ -12,3 +14,5 @@
@property (strong, nonatomic) NSString *appVersion;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAppInfo.m b/SmartDeviceLink/SDLAppInfo.m
index 0bc1b073c..530e90632 100644
--- a/SmartDeviceLink/SDLAppInfo.m
+++ b/SmartDeviceLink/SDLAppInfo.m
@@ -8,6 +8,8 @@
static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionString";
static NSString *const SDLBundleAppNameKey = @"CFBundleName";
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLAppInfo
+ (instancetype)currentAppInfo {
@@ -60,3 +62,5 @@ static NSString *const SDLBundleAppNameKey = @"CFBundleName";
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAudioPassThruCapabilities.h b/SmartDeviceLink/SDLAudioPassThruCapabilities.h
index a8033c9b3..f4f14b598 100644
--- a/SmartDeviceLink/SDLAudioPassThruCapabilities.h
+++ b/SmartDeviceLink/SDLAudioPassThruCapabilities.h
@@ -42,6 +42,9 @@
* </table>
* Since <b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLAudioPassThruCapabilities : SDLRPCStruct
/**
@@ -61,3 +64,5 @@
@property (strong, nonatomic) SDLAudioType audioType;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLAudioPassThruCapabilities.m b/SmartDeviceLink/SDLAudioPassThruCapabilities.m
index 875179a97..5981de92d 100644
--- a/SmartDeviceLink/SDLAudioPassThruCapabilities.m
+++ b/SmartDeviceLink/SDLAudioPassThruCapabilities.m
@@ -6,6 +6,7 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLAudioPassThruCapabilities
@@ -49,3 +50,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLBeltStatus.h b/SmartDeviceLink/SDLBeltStatus.h
index 7a25dfea9..9b60b9dc7 100644
--- a/SmartDeviceLink/SDLBeltStatus.h
+++ b/SmartDeviceLink/SDLBeltStatus.h
@@ -5,6 +5,8 @@
#import "SDLVehicleDataEventStatus.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLBeltStatus : SDLRPCStruct
@property (strong, nonatomic) SDLVehicleDataEventStatus driverBeltDeployed;
@@ -24,3 +26,5 @@
@property (strong, nonatomic) SDLVehicleDataEventStatus middleRow1BuckleBelted;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLBeltStatus.m b/SmartDeviceLink/SDLBeltStatus.m
index b4777519e..7f376761a 100644
--- a/SmartDeviceLink/SDLBeltStatus.m
+++ b/SmartDeviceLink/SDLBeltStatus.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
#import "SDLVehicleDataEventStatus.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLBeltStatus
- (void)setDriverBeltDeployed:(SDLVehicleDataEventStatus)driverBeltDeployed {
@@ -204,3 +206,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLBodyInformation.h b/SmartDeviceLink/SDLBodyInformation.h
index 3bd4daaad..a0d626b57 100644
--- a/SmartDeviceLink/SDLBodyInformation.h
+++ b/SmartDeviceLink/SDLBodyInformation.h
@@ -10,6 +10,9 @@
/**
* The body information including power modes.
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLBodyInformation : SDLRPCStruct
/**
@@ -30,21 +33,23 @@
/**
* @abstract References signal "DrStatDrv_B_Actl".
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *driverDoorAjar;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *driverDoorAjar;
/**
* @abstract References signal "DrStatPsngr_B_Actl".
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *passengerDoorAjar;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *passengerDoorAjar;
/**
* @abstract References signal "DrStatRl_B_Actl".
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *rearLeftDoorAjar;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *rearLeftDoorAjar;
/**
* @abstract References signal "DrStatRr_B_Actl".
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *rearRightDoorAjar;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *rearRightDoorAjar;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLBodyInformation.m b/SmartDeviceLink/SDLBodyInformation.m
index db54f6264..71f20254b 100644
--- a/SmartDeviceLink/SDLBodyInformation.m
+++ b/SmartDeviceLink/SDLBodyInformation.m
@@ -48,7 +48,7 @@
return (SDLIgnitionStatus)obj;
}
-- (void)setDriverDoorAjar:(NSNumber<SDLBool> *)driverDoorAjar {
+- (void)setDriverDoorAjar:(nullable NSNumber<SDLBool> *)driverDoorAjar {
if (driverDoorAjar != nil) {
[store setObject:driverDoorAjar forKey:SDLNameDriverDoorAjar];
} else {
@@ -56,11 +56,11 @@
}
}
-- (NSNumber<SDLBool> *)driverDoorAjar {
+- (nullable NSNumber<SDLBool> *)driverDoorAjar {
return [store objectForKey:SDLNameDriverDoorAjar];
}
-- (void)setPassengerDoorAjar:(NSNumber<SDLBool> *)passengerDoorAjar {
+- (void)setPassengerDoorAjar:(nullable NSNumber<SDLBool> *)passengerDoorAjar {
if (passengerDoorAjar != nil) {
[store setObject:passengerDoorAjar forKey:SDLNamePassengerDoorAjar];
} else {
@@ -68,11 +68,11 @@
}
}
-- (NSNumber<SDLBool> *)passengerDoorAjar {
+- (nullable NSNumber<SDLBool> *)passengerDoorAjar {
return [store objectForKey:SDLNamePassengerDoorAjar];
}
-- (void)setRearLeftDoorAjar:(NSNumber<SDLBool> *)rearLeftDoorAjar {
+- (void)setRearLeftDoorAjar:(nullable NSNumber<SDLBool> *)rearLeftDoorAjar {
if (rearLeftDoorAjar != nil) {
[store setObject:rearLeftDoorAjar forKey:SDLNameRearLeftDoorAjar];
} else {
@@ -80,11 +80,11 @@
}
}
-- (NSNumber<SDLBool> *)rearLeftDoorAjar {
+- (nullable NSNumber<SDLBool> *)rearLeftDoorAjar {
return [store objectForKey:SDLNameRearLeftDoorAjar];
}
-- (void)setRearRightDoorAjar:(NSNumber<SDLBool> *)rearRightDoorAjar {
+- (void)setRearRightDoorAjar:(nullable NSNumber<SDLBool> *)rearRightDoorAjar {
if (rearRightDoorAjar != nil) {
[store setObject:rearRightDoorAjar forKey:SDLNameRearRightDoorAjar];
} else {
@@ -92,7 +92,7 @@
}
}
-- (NSNumber<SDLBool> *)rearRightDoorAjar {
+- (nullable NSNumber<SDLBool> *)rearRightDoorAjar {
return [store objectForKey:SDLNameRearRightDoorAjar];
}
diff --git a/SmartDeviceLink/SDLButtonCapabilities.h b/SmartDeviceLink/SDLButtonCapabilities.h
index 594a2317a..cc24f84fa 100644
--- a/SmartDeviceLink/SDLButtonCapabilities.h
+++ b/SmartDeviceLink/SDLButtonCapabilities.h
@@ -11,6 +11,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLButtonCapabilities : SDLRPCStruct
/**
@@ -40,3 +43,5 @@
@property (strong, nonatomic) NSNumber<SDLBool> *upDownAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLButtonCapabilities.m b/SmartDeviceLink/SDLButtonCapabilities.m
index 3786a6534..43ed46bb5 100644
--- a/SmartDeviceLink/SDLButtonCapabilities.m
+++ b/SmartDeviceLink/SDLButtonCapabilities.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLButtonCapabilities
- (void)setName:(SDLButtonName)name {
@@ -57,3 +59,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/SDLChangeRegistrationResponse.h b/SmartDeviceLink/SDLChangeRegistrationResponse.h
index 20017d066..89c469fd9 100644
--- a/SmartDeviceLink/SDLChangeRegistrationResponse.h
+++ b/SmartDeviceLink/SDLChangeRegistrationResponse.h
@@ -9,6 +9,11 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLChangeRegistrationResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChangeRegistrationResponse.m b/SmartDeviceLink/SDLChangeRegistrationResponse.m
index a4cab1c9b..ab03f7e8b 100644
--- a/SmartDeviceLink/SDLChangeRegistrationResponse.m
+++ b/SmartDeviceLink/SDLChangeRegistrationResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLChangeRegistrationResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChoice.h b/SmartDeviceLink/SDLChoice.h
index 50bdf8d80..1e88f097b 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, nonatomic) SDLImage *image;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *secondaryText;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *tertiaryText;
+@property (nullable, strong, nonatomic) NSString *tertiaryText;
/**
* @abstract Optional secondary image for choice
*
* Optional
*/
-@property (strong, nonatomic) SDLImage *secondaryImage;
+@property (nullable, strong, nonatomic) SDLImage *secondaryImage;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLChoice.m b/SmartDeviceLink/SDLChoice.m
index f1c425c54..74e346a37 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,16 +81,17 @@
}
}
-- (SDLImage *)image {
+- (nullable SDLImage *)image {
NSObject *obj = [store objectForKey:SDLNameImage];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
+
}
-- (void)setSecondaryText:(NSString *)secondaryText {
+- (void)setSecondaryText:(nullable NSString *)secondaryText {
if (secondaryText != nil) {
[store setObject:secondaryText forKey:SDLNameSecondaryText];
} else {
@@ -96,11 +99,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 +111,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,13 +123,15 @@
}
}
-- (SDLImage *)secondaryImage {
+- (nullable SDLImage *)secondaryImage {
NSObject *obj = [store objectForKey:SDLNameSecondaryImage];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLClusterModeStatus.h b/SmartDeviceLink/SDLClusterModeStatus.h
index 03f48f849..558a1fdcc 100644
--- a/SmartDeviceLink/SDLClusterModeStatus.h
+++ b/SmartDeviceLink/SDLClusterModeStatus.h
@@ -7,6 +7,7 @@
#import "SDLPowerModeQualificationStatus.h"
#import "SDLPowerModeStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLClusterModeStatus : SDLRPCStruct
@@ -16,3 +17,5 @@
@property (strong, nonatomic) SDLPowerModeStatus powerModeStatus;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLClusterModeStatus.m b/SmartDeviceLink/SDLClusterModeStatus.m
index 194cc9aff..131f1a752 100644
--- a/SmartDeviceLink/SDLClusterModeStatus.m
+++ b/SmartDeviceLink/SDLClusterModeStatus.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLClusterModeStatus
- (void)setPowerModeActive:(NSNumber<SDLBool> *)powerModeActive {
@@ -59,3 +61,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLConsoleController.h b/SmartDeviceLink/SDLConsoleController.h
index 66b921908..26cbd39cb 100644
--- a/SmartDeviceLink/SDLConsoleController.h
+++ b/SmartDeviceLink/SDLConsoleController.h
@@ -6,6 +6,7 @@
#import "SDLDebugTool.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLConsoleController : UITableViewController <SDLDebugToolConsole> {
NSMutableArray<NSDictionary<NSString *, id>*> *messageList;
@@ -19,3 +20,5 @@
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCreateInteractionChoiceSet.h b/SmartDeviceLink/SDLCreateInteractionChoiceSet.h
index 05893ade3..2679f0266 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, nonatomic) 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/SDLCreateInteractionChoiceSetResponse.h b/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h
index 0573dcc2f..0f9cd4346 100644
--- a/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h
+++ b/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.h
@@ -10,6 +10,11 @@
*
* Since <b>SmartDeviceLink 1.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLCreateInteractionChoiceSetResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m b/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m
index 11b055e82..80f623f08 100644
--- a/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m
+++ b/SmartDeviceLink/SDLCreateInteractionChoiceSetResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLCreateInteractionChoiceSetResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDIDResult.h b/SmartDeviceLink/SDLDIDResult.h
index e93fbb5c5..2ee14af44 100644
--- a/SmartDeviceLink/SDLDIDResult.h
+++ b/SmartDeviceLink/SDLDIDResult.h
@@ -5,11 +5,14 @@
#import "SDLVehicleDataResultCode.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLDIDResult : SDLRPCStruct
@property (strong, nonatomic) SDLVehicleDataResultCode resultCode;
@property (strong, nonatomic) NSNumber<SDLInt> *didLocation;
-@property (strong, nonatomic) NSString *data;
+@property (nullable, strong, nonatomic) NSString *data;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDIDResult.m b/SmartDeviceLink/SDLDIDResult.m
index 3e441fbbe..b016da96b 100644
--- a/SmartDeviceLink/SDLDIDResult.m
+++ b/SmartDeviceLink/SDLDIDResult.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDIDResult
- (void)setResultCode:(SDLVehicleDataResultCode)resultCode {
@@ -32,7 +34,7 @@
return [store objectForKey:SDLNameDIDLocation];
}
-- (void)setData:(NSString *)data {
+- (void)setData:(nullable NSString *)data {
if (data != nil) {
[store setObject:data forKey:SDLNameData];
} else {
@@ -40,8 +42,10 @@
}
}
-- (NSString *)data {
+- (nullable NSString *)data {
return [store objectForKey:SDLNameData];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDateTime.h b/SmartDeviceLink/SDLDateTime.h
index 7dffbd5d2..9239696c9 100644
--- a/SmartDeviceLink/SDLDateTime.h
+++ b/SmartDeviceLink/SDLDateTime.h
@@ -3,6 +3,8 @@
#import "SDLRPCStruct.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDateTime : SDLRPCStruct
- (instancetype)initWithHour:(UInt8)hour minute:(UInt8)minute;
@@ -77,3 +79,5 @@
@property (copy, nonatomic) NSNumber<SDLInt> *timezoneHourOffset;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDebugTool.h b/SmartDeviceLink/SDLDebugTool.h
index 98ddc6c77..9cb588edd 100644
--- a/SmartDeviceLink/SDLDebugTool.h
+++ b/SmartDeviceLink/SDLDebugTool.h
@@ -25,6 +25,8 @@ typedef NS_ENUM(UInt8, SDLDebugOutput) {
};
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDebugTool : NSObject {
}
@@ -49,3 +51,5 @@ typedef NS_ENUM(UInt8, SDLDebugOutput) {
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDebugToolConsole.h b/SmartDeviceLink/SDLDebugToolConsole.h
index 75d541e16..941061851 100644
--- a/SmartDeviceLink/SDLDebugToolConsole.h
+++ b/SmartDeviceLink/SDLDebugToolConsole.h
@@ -4,9 +4,13 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@protocol SDLDebugToolConsole <NSObject>
@required
- (void)logInfo:(NSString *)info;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteCommand.h b/SmartDeviceLink/SDLDeleteCommand.h
index 4cdf3e266..2bc9e7769 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, nonatomic) 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/SDLDeleteCommandResponse.h b/SmartDeviceLink/SDLDeleteCommandResponse.h
index 4c07a3c2f..95df39a6f 100644
--- a/SmartDeviceLink/SDLDeleteCommandResponse.h
+++ b/SmartDeviceLink/SDLDeleteCommandResponse.h
@@ -9,6 +9,11 @@
*
* Since <b>SmartDeviceLink 1.0</b><br>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteCommandResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteCommandResponse.m b/SmartDeviceLink/SDLDeleteCommandResponse.m
index 7f97574cb..b4ee8167d 100644
--- a/SmartDeviceLink/SDLDeleteCommandResponse.m
+++ b/SmartDeviceLink/SDLDeleteCommandResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteCommandResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteFile.h b/SmartDeviceLink/SDLDeleteFile.h
index 2eb4aecb6..4372e4333 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, nonatomic) 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/SDLDeleteFileResponse.h b/SmartDeviceLink/SDLDeleteFileResponse.h
index 6fe0cb487..aaf8e8f9e 100644
--- a/SmartDeviceLink/SDLDeleteFileResponse.h
+++ b/SmartDeviceLink/SDLDeleteFileResponse.h
@@ -9,8 +9,13 @@
*
* Since <b>SmartDeviceLink 2.0</b><br>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteFileResponse : SDLRPCResponse
@property (strong, nonatomic) NSNumber<SDLInt> *spaceAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteFileResponse.m b/SmartDeviceLink/SDLDeleteFileResponse.m
index f2a77b19e..1ae2c41f3 100644
--- a/SmartDeviceLink/SDLDeleteFileResponse.m
+++ b/SmartDeviceLink/SDLDeleteFileResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteFileResponse
- (instancetype)init {
@@ -27,3 +29,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h b/SmartDeviceLink/SDLDeleteInteractionChoiceSet.h
index 0a6fccd44..8c03f2eca 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, nonatomic) 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/SDLDeleteInteractionChoiceSetResponse.h b/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h
index c67aef1d1..ad0dc0fc7 100644
--- a/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h
+++ b/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.h
@@ -9,6 +9,11 @@
*
* Since <b>SmartDeviceLink 1.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteInteractionChoiceSetResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m b/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m
index bcca0be95..37b7c7940 100644
--- a/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m
+++ b/SmartDeviceLink/SDLDeleteInteractionChoiceSetResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteInteractionChoiceSetResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteSubMenu.h b/SmartDeviceLink/SDLDeleteSubMenu.h
index 9b3f8cc06..74a6363a9 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, nonatomic) 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/SDLDeleteSubMenuResponse.h b/SmartDeviceLink/SDLDeleteSubMenuResponse.h
index 5842a54be..e50781e85 100644
--- a/SmartDeviceLink/SDLDeleteSubMenuResponse.h
+++ b/SmartDeviceLink/SDLDeleteSubMenuResponse.h
@@ -9,6 +9,11 @@
*
* Since <b>SmartDeviceLink 1.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeleteSubMenuResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeleteSubMenuResponse.m b/SmartDeviceLink/SDLDeleteSubMenuResponse.m
index a9755f8a2..ec77c8944 100644
--- a/SmartDeviceLink/SDLDeleteSubMenuResponse.m
+++ b/SmartDeviceLink/SDLDeleteSubMenuResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeleteSubMenuResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeviceInfo.h b/SmartDeviceLink/SDLDeviceInfo.h
index 964749a5d..0af061abc 100644
--- a/SmartDeviceLink/SDLDeviceInfo.h
+++ b/SmartDeviceLink/SDLDeviceInfo.h
@@ -3,16 +3,19 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLDeviceInfo : SDLRPCStruct
+ (instancetype)currentDevice;
-@property (strong, nonatomic) NSString *hardware;
-@property (strong, nonatomic) NSString *firmwareRev;
-@property (strong, nonatomic) NSString *os;
-@property (strong, nonatomic) NSString *osVersion;
-@property (strong, nonatomic) NSString *carrier;
-@property (strong, nonatomic) NSNumber<SDLInt> *maxNumberRFCOMMPorts;
+@property (nullable, strong, nonatomic) NSString *hardware;
+@property (nullable, strong, nonatomic) NSString *firmwareRev;
+@property (nullable, strong, nonatomic) NSString *os;
+@property (nullable, strong, nonatomic) NSString *osVersion;
+@property (nullable, strong, nonatomic) NSString *carrier;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *maxNumberRFCOMMPorts;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeviceInfo.m b/SmartDeviceLink/SDLDeviceInfo.m
index 86b5b711a..0791bfe8a 100644
--- a/SmartDeviceLink/SDLDeviceInfo.m
+++ b/SmartDeviceLink/SDLDeviceInfo.m
@@ -9,6 +9,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeviceInfo
+ (instancetype)currentDevice {
@@ -26,7 +28,7 @@
return deviceInfo;
}
-- (void)setHardware:(NSString *)hardware {
+- (void)setHardware:(nullable NSString *)hardware {
if (hardware != nil) {
[store setObject:hardware forKey:SDLNameHardware];
} else {
@@ -34,11 +36,11 @@
}
}
-- (NSString *)hardware {
+- (nullable NSString *)hardware {
return [store objectForKey:SDLNameHardware];
}
-- (void)setFirmwareRev:(NSString *)firmwareRev {
+- (void)setFirmwareRev:(nullable NSString *)firmwareRev {
if (firmwareRev != nil) {
[store setObject:firmwareRev forKey:SDLNameFirmwareRevision];
} else {
@@ -46,11 +48,11 @@
}
}
-- (NSString *)firmwareRev {
+- (nullable NSString *)firmwareRev {
return [store objectForKey:SDLNameFirmwareRevision];
}
-- (void)setOs:(NSString *)os {
+- (void)setOs:(nullable NSString *)os {
if (os != nil) {
[store setObject:os forKey:SDLNameOS];
} else {
@@ -58,11 +60,11 @@
}
}
-- (NSString *)os {
+- (nullable NSString *)os {
return [store objectForKey:SDLNameOS];
}
-- (void)setOsVersion:(NSString *)osVersion {
+- (void)setOsVersion:(nullable NSString *)osVersion {
if (osVersion != nil) {
[store setObject:osVersion forKey:SDLNameOSVersion];
} else {
@@ -70,11 +72,11 @@
}
}
-- (NSString *)osVersion {
+- (nullable NSString *)osVersion {
return [store objectForKey:SDLNameOSVersion];
}
-- (void)setCarrier:(NSString *)carrier {
+- (void)setCarrier:(nullable NSString *)carrier {
if (carrier != nil) {
[store setObject:carrier forKey:SDLNameCarrier];
} else {
@@ -82,11 +84,11 @@
}
}
-- (NSString *)carrier {
+- (nullable NSString *)carrier {
return [store objectForKey:SDLNameCarrier];
}
-- (void)setMaxNumberRFCOMMPorts:(NSNumber<SDLInt> *)maxNumberRFCOMMPorts {
+- (void)setMaxNumberRFCOMMPorts:(nullable NSNumber<SDLInt> *)maxNumberRFCOMMPorts {
if (maxNumberRFCOMMPorts != nil) {
[store setObject:maxNumberRFCOMMPorts forKey:SDLNameMaxNumberRFCOMMPorts];
} else {
@@ -94,8 +96,10 @@
}
}
-- (NSNumber<SDLInt> *)maxNumberRFCOMMPorts {
+- (nullable NSNumber<SDLInt> *)maxNumberRFCOMMPorts {
return [store objectForKey:SDLNameMaxNumberRFCOMMPorts];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeviceStatus.h b/SmartDeviceLink/SDLDeviceStatus.h
index 7657ea2ef..d1f36d215 100644
--- a/SmartDeviceLink/SDLDeviceStatus.h
+++ b/SmartDeviceLink/SDLDeviceStatus.h
@@ -98,6 +98,9 @@
* </table>
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDeviceStatus : SDLRPCStruct
/**
@@ -184,3 +187,5 @@
@property (strong, nonatomic) NSNumber<SDLBool> *eCallEventActive;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDeviceStatus.m b/SmartDeviceLink/SDLDeviceStatus.m
index fb5f1e853..6a5b7c8e1 100644
--- a/SmartDeviceLink/SDLDeviceStatus.m
+++ b/SmartDeviceLink/SDLDeviceStatus.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLPrimaryAudioSource.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDeviceStatus
- (void)setVoiceRecOn:(NSNumber<SDLBool> *)voiceRecOn {
@@ -145,3 +147,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDiagnosticMessage.h b/SmartDeviceLink/SDLDiagnosticMessage.h
index 3b2025802..e5bff4a58 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<SDLUInt> *> *)data;
@@ -35,3 +38,5 @@
@property (strong, nonatomic) 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/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
index a7366b0c2..5c4c8745f 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
@@ -7,8 +7,13 @@
/** SDLDiagnosticMessageResponse is sent, when SDLDiagnosticMessage has been called.
* Since<b>SmartDeviceLink 3.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDiagnosticMessageResponse : SDLRPCResponse
@property (strong, nonatomic) NSMutableArray<NSNumber<SDLInt> *> *messageDataResult;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
index 46c077f7a..3c110128d 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.m
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDiagnosticMessageResponse
- (instancetype)init {
@@ -26,3 +28,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/SDLDialNumberResponse.h b/SmartDeviceLink/SDLDialNumberResponse.h
index 1270751ac..7f8dfaa14 100644
--- a/SmartDeviceLink/SDLDialNumberResponse.h
+++ b/SmartDeviceLink/SDLDialNumberResponse.h
@@ -9,6 +9,11 @@
@since SDL 4.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDialNumberResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDialNumberResponse.m b/SmartDeviceLink/SDLDialNumberResponse.m
index 3d16f2621..9a8a1c5f1 100644
--- a/SmartDeviceLink/SDLDialNumberResponse.m
+++ b/SmartDeviceLink/SDLDialNumberResponse.m
@@ -6,6 +6,7 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLDialNumberResponse
@@ -16,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDisplayCapabilities.h b/SmartDeviceLink/SDLDisplayCapabilities.h
index d5d7f902a..437f686fc 100644
--- a/SmartDeviceLink/SDLDisplayCapabilities.h
+++ b/SmartDeviceLink/SDLDisplayCapabilities.h
@@ -15,6 +15,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLDisplayCapabilities : SDLRPCStruct
/**
@@ -44,7 +47,7 @@
*
* Optional, Array of SDLImageField, 1 - 100 objects
*/
-@property (strong, nonatomic) NSMutableArray<SDLImageField *> *imageFields;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLImageField *> *imageFields;
/**
* @abstract An array of SDLMediaClockFormat elements, defining the valid string formats used in specifying the contents of the media clock field
@@ -71,20 +74,22 @@
*
* Optional, Array of String, max string size 100, 0 - 100 objects
*/
-@property (strong, nonatomic) NSMutableArray<NSString *> *templatesAvailable;
+@property (nullable, strong, nonatomic) NSMutableArray<NSString *> *templatesAvailable;
/**
* @abstract A set of all parameters related to a prescribed screen area (e.g. for video / touch input)
*
* Optional
*/
-@property (strong, nonatomic) SDLScreenParams *screenParams;
+@property (nullable, strong, nonatomic) SDLScreenParams *screenParams;
/**
* @abstract The number of on-screen custom presets available (if any); otherwise omitted
*
* Optional, Integer 1 - 100
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *numCustomPresetsAvailable;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *numCustomPresetsAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLDisplayCapabilities.m b/SmartDeviceLink/SDLDisplayCapabilities.m
index f3e3f5cfb..0f08e326c 100644
--- a/SmartDeviceLink/SDLDisplayCapabilities.m
+++ b/SmartDeviceLink/SDLDisplayCapabilities.m
@@ -8,6 +8,8 @@
#import "SDLScreenParams.h"
#import "SDLTextField.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLDisplayCapabilities
- (void)setDisplayType:(SDLDisplayType)displayType {
@@ -44,7 +46,7 @@
}
}
-- (void)setImageFields:(NSMutableArray<SDLImageField *> *)imageFields {
+- (void)setImageFields:(nullable NSMutableArray<SDLImageField *> *)imageFields {
if (imageFields != nil) {
[store setObject:imageFields forKey:SDLNameImageFields];
} else {
@@ -52,7 +54,7 @@
}
}
-- (NSMutableArray<SDLImageField *> *)imageFields {
+- (nullable NSMutableArray<SDLImageField *> *)imageFields {
NSMutableArray<SDLImageField *> *array = [store objectForKey:SDLNameImageFields];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLImageField.class]) {
return array;
@@ -98,7 +100,7 @@
return [store objectForKey:SDLNameGraphicSupported];
}
-- (void)setTemplatesAvailable:(NSMutableArray<NSString *> *)templatesAvailable {
+- (void)setTemplatesAvailable:(nullable NSMutableArray<NSString *> *)templatesAvailable {
if (templatesAvailable != nil) {
[store setObject:templatesAvailable forKey:SDLNameTemplatesAvailable];
} else {
@@ -106,11 +108,11 @@
}
}
-- (NSMutableArray<NSString *> *)templatesAvailable {
+- (nullable NSMutableArray<NSString *> *)templatesAvailable {
return [store objectForKey:SDLNameTemplatesAvailable];
}
-- (void)setScreenParams:(SDLScreenParams *)screenParams {
+- (void)setScreenParams:(nullable SDLScreenParams *)screenParams {
if (screenParams != nil) {
[store setObject:screenParams forKey:SDLNameScreenParams];
} else {
@@ -118,16 +120,16 @@
}
}
-- (SDLScreenParams *)screenParams {
+- (nullable SDLScreenParams *)screenParams {
NSObject *obj = [store objectForKey:SDLNameScreenParams];
- if (obj == nil || [obj isKindOfClass:SDLScreenParams.class]) {
- return (SDLScreenParams *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLScreenParams alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLScreenParams*)obj;
}
-- (void)setNumCustomPresetsAvailable:(NSNumber<SDLInt> *)numCustomPresetsAvailable {
+- (void)setNumCustomPresetsAvailable:(nullable NSNumber<SDLInt> *)numCustomPresetsAvailable {
if (numCustomPresetsAvailable != nil) {
[store setObject:numCustomPresetsAvailable forKey:SDLNameNumberCustomPresetsAvailable];
} else {
@@ -135,8 +137,10 @@
}
}
-- (NSNumber<SDLInt> *)numCustomPresetsAvailable {
+- (nullable NSNumber<SDLInt> *)numCustomPresetsAvailable {
return [store objectForKey:SDLNameNumberCustomPresetsAvailable];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLECallInfo.h b/SmartDeviceLink/SDLECallInfo.h
index a4db87cb0..75d88f309 100644
--- a/SmartDeviceLink/SDLECallInfo.h
+++ b/SmartDeviceLink/SDLECallInfo.h
@@ -6,6 +6,7 @@
#import "SDLECallConfirmationStatus.h"
#import "SDLVehicleDataNotificationStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLECallInfo : SDLRPCStruct
@@ -14,3 +15,5 @@
@property (strong, nonatomic) SDLECallConfirmationStatus eCallConfirmationStatus;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLECallInfo.m b/SmartDeviceLink/SDLECallInfo.m
index 62e7cb939..81753457c 100644
--- a/SmartDeviceLink/SDLECallInfo.m
+++ b/SmartDeviceLink/SDLECallInfo.m
@@ -5,6 +5,7 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLECallInfo
@@ -48,3 +49,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEmergencyEvent.h b/SmartDeviceLink/SDLEmergencyEvent.h
index 627ef8bfc..759c64659 100644
--- a/SmartDeviceLink/SDLEmergencyEvent.h
+++ b/SmartDeviceLink/SDLEmergencyEvent.h
@@ -7,6 +7,7 @@
#import "SDLFuelCutoffStatus.h"
#import "SDLVehicleDataEventStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLEmergencyEvent : SDLRPCStruct
@@ -17,3 +18,5 @@
@property (strong, nonatomic) SDLVehicleDataEventStatus multipleEvents;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEmergencyEvent.m b/SmartDeviceLink/SDLEmergencyEvent.m
index 0207cf3f9..e226265d8 100644
--- a/SmartDeviceLink/SDLEmergencyEvent.m
+++ b/SmartDeviceLink/SDLEmergencyEvent.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLEmergencyEvent
- (void)setEmergencyEventType:(SDLEmergencyEventType)emergencyEventType {
@@ -72,3 +74,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEncodedSyncPData.h b/SmartDeviceLink/SDLEncodedSyncPData.h
index 75a6cc683..5d32ced74 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, nonatomic) 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/SDLEncodedSyncPDataResponse.h b/SmartDeviceLink/SDLEncodedSyncPDataResponse.h
index ff1dec1ac..f8a4daf20 100644
--- a/SmartDeviceLink/SDLEncodedSyncPDataResponse.h
+++ b/SmartDeviceLink/SDLEncodedSyncPDataResponse.h
@@ -4,6 +4,10 @@
#import "SDLRPCResponse.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLEncodedSyncPDataResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEncodedSyncPDataResponse.m b/SmartDeviceLink/SDLEncodedSyncPDataResponse.m
index d469e1bfa..ecde6b6e4 100644
--- a/SmartDeviceLink/SDLEncodedSyncPDataResponse.m
+++ b/SmartDeviceLink/SDLEncodedSyncPDataResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLEncodedSyncPDataResponse
- (instancetype)init {
@@ -15,3 +17,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/SDLEndAudioPassThruResponse.h b/SmartDeviceLink/SDLEndAudioPassThruResponse.h
index 1e976a6f8..bda7b4f89 100644
--- a/SmartDeviceLink/SDLEndAudioPassThruResponse.h
+++ b/SmartDeviceLink/SDLEndAudioPassThruResponse.h
@@ -9,6 +9,11 @@
*
* Since <b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLEndAudioPassThruResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLEndAudioPassThruResponse.m b/SmartDeviceLink/SDLEndAudioPassThruResponse.m
index 9cad307ec..e9218d3d6 100644
--- a/SmartDeviceLink/SDLEndAudioPassThruResponse.m
+++ b/SmartDeviceLink/SDLEndAudioPassThruResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLEndAudioPassThruResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFunctionID.h b/SmartDeviceLink/SDLFunctionID.h
index edd72485d..2d96c7882 100644
--- a/SmartDeviceLink/SDLFunctionID.h
+++ b/SmartDeviceLink/SDLFunctionID.h
@@ -7,11 +7,15 @@
#import "SDLNames.h"
#import "NSNumber+NumberType.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLFunctionID : NSObject
+ (instancetype)sharedInstance;
-- (SDLName)functionNameForId:(int)functionID;
-- (NSNumber<SDLInt> *)functionIdForName:(SDLName)functionName;
+- (nullable SDLName)functionNameForId:(int)functionID;
+- (nullable NSNumber<SDLInt> *)functionIdForName:(SDLName)functionName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLFunctionID.m b/SmartDeviceLink/SDLFunctionID.m
index 18caf940e..17c6ba822 100644
--- a/SmartDeviceLink/SDLFunctionID.m
+++ b/SmartDeviceLink/SDLFunctionID.m
@@ -4,6 +4,8 @@
#import "SDLFunctionID.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLFunctionID ()
@property (nonatomic, strong, nonnull) NSDictionary* functionIds;
@@ -93,14 +95,16 @@
return self;
}
-- (SDLName)functionNameForId:(int)functionID {
+- (nullable SDLName)functionNameForId:(int)functionID {
return self.functionIds[@(functionID)];
}
-- (NSNumber<SDLInt> *)functionIdForName:(SDLName)functionName {
+- (nullable NSNumber<SDLInt> *)functionIdForName:(SDLName)functionName {
return [[self.functionIds allKeysForObject:functionName] firstObject];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGPSData.h b/SmartDeviceLink/SDLGPSData.h
index d9ed8d5de..892bd7e46 100644
--- a/SmartDeviceLink/SDLGPSData.h
+++ b/SmartDeviceLink/SDLGPSData.h
@@ -12,6 +12,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGPSData : SDLRPCStruct
/**
@@ -149,3 +152,5 @@
@property (strong, nonatomic) NSNumber<SDLFloat> *speed;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGPSData.m b/SmartDeviceLink/SDLGPSData.m
index 63cdeb550..dc7be5e1c 100644
--- a/SmartDeviceLink/SDLGPSData.m
+++ b/SmartDeviceLink/SDLGPSData.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGPSData
- (void)setLongitudeDegrees:(NSNumber<SDLFloat> *)longitudeDegrees {
@@ -226,3 +228,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGenericResponse.h b/SmartDeviceLink/SDLGenericResponse.h
index 61e1f2c8d..74f1fa495 100644
--- a/SmartDeviceLink/SDLGenericResponse.h
+++ b/SmartDeviceLink/SDLGenericResponse.h
@@ -9,6 +9,11 @@
* retrieved. Only used in case of an error. Currently, only resultCode
* INVALID_DATA is used.
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGenericResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGenericResponse.m b/SmartDeviceLink/SDLGenericResponse.m
index a6a0a8ee9..34368d397 100644
--- a/SmartDeviceLink/SDLGenericResponse.m
+++ b/SmartDeviceLink/SDLGenericResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGenericResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetDTCs.h b/SmartDeviceLink/SDLGetDTCs.h
index e9c490d2f..c212e7f95 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, nonatomic) NSNumber<SDLInt> *dtcMask;
+@property (nullable, strong, nonatomic) 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/SDLGetDTCsResponse.h b/SmartDeviceLink/SDLGetDTCsResponse.h
index e512c3b98..7368b42f2 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.h
+++ b/SmartDeviceLink/SDLGetDTCsResponse.h
@@ -9,9 +9,14 @@
*
* Since <b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGetDTCsResponse : SDLRPCResponse
@property (strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
@property (strong, nonatomic) NSMutableArray<NSString *> *dtc;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.m b/SmartDeviceLink/SDLGetDTCsResponse.m
index 0f77b48ec..6a9edd79c 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.m
+++ b/SmartDeviceLink/SDLGetDTCsResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGetDTCsResponse
- (instancetype)init {
@@ -39,3 +41,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink/SDLGetVehicleData.h
index 555203f40..cee465c23 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, nonatomic) NSNumber<SDLBool> *gps;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *gps;
/**
* @abstract A boolean value. If true, requests speed data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *speed;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *speed;
/**
* @abstract A boolean value. If true, requests rpm data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *rpm;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *rpm;
/**
* @abstract A boolean value. If true, requests FuelLevel data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *fuelLevel;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *fuelLevel;
/**
* @abstract A boolean value. If true, requests fuelLevel_State data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *fuelLevel_State;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *fuelLevel_State;
/**
* @abstract A boolean value. If true, requests instantFuelConsumption data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *instantFuelConsumption;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *instantFuelConsumption;
/**
* @abstract A boolean value. If true, requests externalTemperature data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *externalTemperature;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *externalTemperature;
/**
* @abstract A boolean value. If true, requests Vehicle Identification Number
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *vin;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *vin;
/**
* @abstract A boolean value. If true, requests Currently selected gear data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *prndl;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *prndl;
/**
* @abstract A boolean value. If true, requests tire pressure status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *tirePressure;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *tirePressure;
/**
* @abstract A boolean value. If true, requests odometer data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *odometer;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *odometer;
/**
* @abstract A boolean value. If true, requests belt Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *beltStatus;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *beltStatus;
/**
* @abstract A boolean value. If true, requests body Information data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *bodyInformation;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *bodyInformation;
/**
* @abstract A boolean value. If true, requests device Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *deviceStatus;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *deviceStatus;
/**
* @abstract A boolean value. If true, requests driver Braking data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *driverBraking;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *driverBraking;
/**
* @abstract A boolean value. If true, requests wiper Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *wiperStatus;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *wiperStatus;
/**
* @abstract A boolean value. If true, requests Head Lamp Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *headLampStatus;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *headLampStatus;
/**
* @abstract A boolean value. If true, requests Engine Torque data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *engineTorque;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *engineTorque;
/**
* @abstract A boolean value. If true, means the accPedalPosition data has been
* subscribed.
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *accPedalPosition;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *accPedalPosition;
/**
* @abstract A boolean value. If true, means the steeringWheelAngle data has been
* subscribed.
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *steeringWheelAngle;
-@property (strong, nonatomic) NSNumber<SDLBool> *eCallInfo;
-@property (strong, nonatomic) NSNumber<SDLBool> *airbagStatus;
-@property (strong, nonatomic) NSNumber<SDLBool> *emergencyEvent;
-@property (strong, nonatomic) NSNumber<SDLBool> *clusterModeStatus;
-@property (strong, nonatomic) NSNumber<SDLBool> *myKey;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *steeringWheelAngle;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *eCallInfo;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *airbagStatus;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *emergencyEvent;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *clusterModeStatus;
+@property (nullable, strong, nonatomic) 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/SDLGetVehicleDataResponse.h b/SmartDeviceLink/SDLGetVehicleDataResponse.h
index 152bd5ea9..240f9907b 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.h
@@ -27,111 +27,116 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGetVehicleDataResponse : SDLRPCResponse
/**
* @abstract A SDLGPSData* value. See GPSData.
*/
-@property (strong, nonatomic) SDLGPSData *gps;
+@property (nullable, strong, nonatomic) SDLGPSData *gps;
/**
* @abstract The vehicle speed in kilometers per hour.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *speed;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *speed;
/**
* @abstract The number of revolutions per minute of the engine.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *rpm;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *rpm;
/**
* @abstract The fuel level in the tank (percentage)
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *fuelLevel;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *fuelLevel;
/**
* @abstract A SDLComponentVolumeStatus* value. The fuel level state.
*/
-@property (strong, nonatomic) SDLComponentVolumeStatus fuelLevel_State;
+@property (nullable, strong, nonatomic) SDLComponentVolumeStatus fuelLevel_State;
/**
* @abstract The instantaneous fuel consumption in microlitres.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *instantFuelConsumption;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *instantFuelConsumption;
/**
* @abstract The external temperature in degrees celsius.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *externalTemperature;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *externalTemperature;
/**
* @abstract The Vehicle Identification Number
*/
-@property (strong, nonatomic) NSString *vin;
+@property (nullable, strong, nonatomic) NSString *vin;
/**
* @abstract See PRNDL.
*/
-@property (strong, nonatomic) SDLPRNDL prndl;
+@property (nullable, strong, nonatomic) SDLPRNDL prndl;
/**
* @abstract A SDLTireStatus* value. See TireStatus.
*/
-@property (strong, nonatomic) SDLTireStatus *tirePressure;
+@property (nullable, strong, nonatomic) SDLTireStatus *tirePressure;
/**
* @abstract Odometer reading in km.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *odometer;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *odometer;
/**
* @abstract A SDLBeltStatus* value. The status of the seat belts.
*/
-@property (strong, nonatomic) SDLBeltStatus *beltStatus;
+@property (nullable, strong, nonatomic) SDLBeltStatus *beltStatus;
/**
* @abstract A SDLBodyInformation* value. The body information including power modes.
*/
-@property (strong, nonatomic) SDLBodyInformation *bodyInformation;
+@property (nullable, strong, nonatomic) SDLBodyInformation *bodyInformation;
/**
* @abstract A SDLDeviceStatus* value. The device status including signal and battery strength.
*/
-@property (strong, nonatomic) SDLDeviceStatus *deviceStatus;
+@property (nullable, strong, nonatomic) SDLDeviceStatus *deviceStatus;
/**
* @abstract A SDLVehicleDataResult* value. The status of the brake pedal.
*/
-@property (strong, nonatomic) SDLVehicleDataEventStatus driverBraking;
+@property (nullable, strong, nonatomic) SDLVehicleDataEventStatus driverBraking;
/**
* @abstract A SDLWiperStatus* value. The status of the wipers.
*/
-@property (strong, nonatomic) SDLWiperStatus wiperStatus;
+@property (nullable, strong, nonatomic) SDLWiperStatus wiperStatus;
/**
* @abstract A SDLHeadLampStatus* value. Status of the head lamps.
*/
-@property (strong, nonatomic) SDLHeadLampStatus *headLampStatus;
+@property (nullable, strong, nonatomic) SDLHeadLampStatus *headLampStatus;
/**
* @abstract Torque value for engine (in Nm) on non-diesel variants.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *engineTorque;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *engineTorque;
/**
* @abstract Accelerator pedal position (percentage depressed)
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *accPedalPosition;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *accPedalPosition;
/**
* @abstract Current angle of the steering wheel (in deg)
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *steeringWheelAngle;
-@property (strong, nonatomic) SDLECallInfo *eCallInfo;
-@property (strong, nonatomic) SDLAirbagStatus *airbagStatus;
-@property (strong, nonatomic) SDLEmergencyEvent *emergencyEvent;
-@property (strong, nonatomic) SDLClusterModeStatus *clusterModeStatus;
-@property (strong, nonatomic) SDLMyKey *myKey;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *steeringWheelAngle;
+@property (nullable, strong, nonatomic) SDLECallInfo *eCallInfo;
+@property (nullable, strong, nonatomic) SDLAirbagStatus *airbagStatus;
+@property (nullable, strong, nonatomic) SDLEmergencyEvent *emergencyEvent;
+@property (nullable, strong, nonatomic) SDLClusterModeStatus *clusterModeStatus;
+@property (nullable, strong, nonatomic) SDLMyKey *myKey;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.m b/SmartDeviceLink/SDLGetVehicleDataResponse.m
index ea798a430..225d1b355 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.m
@@ -26,7 +26,7 @@
return self;
}
-- (void)setGps:(SDLGPSData *)gps {
+- (void)setGps:(nullable SDLGPSData *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -34,16 +34,16 @@
}
}
-- (SDLGPSData *)gps {
+- (nullable SDLGPSData *)gps {
NSObject *obj = [parameters objectForKey:SDLNameGPS];
- if (obj == nil || [obj isKindOfClass:SDLGPSData.class]) {
- return (SDLGPSData *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLGPSData alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLGPSData*)obj;
}
-- (void)setSpeed:(NSNumber<SDLFloat> *)speed {
+- (void)setSpeed:(nullable NSNumber<SDLFloat> *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -51,11 +51,11 @@
}
}
-- (NSNumber<SDLFloat> *)speed {
+- (nullable NSNumber<SDLFloat> *)speed {
return [parameters objectForKey:SDLNameSpeed];
}
-- (void)setRpm:(NSNumber<SDLInt> *)rpm {
+- (void)setRpm:(nullable NSNumber<SDLInt> *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -63,11 +63,11 @@
}
}
-- (NSNumber<SDLInt> *)rpm {
+- (nullable NSNumber<SDLInt> *)rpm {
return [parameters objectForKey:SDLNameRPM];
}
-- (void)setFuelLevel:(NSNumber<SDLFloat> *)fuelLevel {
+- (void)setFuelLevel:(nullable NSNumber<SDLFloat> *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -75,11 +75,11 @@
}
}
-- (NSNumber<SDLFloat> *)fuelLevel {
+- (nullable NSNumber<SDLFloat> *)fuelLevel {
return [parameters objectForKey:SDLNameFuelLevel];
}
-- (void)setFuelLevel_State:(SDLComponentVolumeStatus)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable SDLComponentVolumeStatus)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -87,12 +87,12 @@
}
}
-- (SDLComponentVolumeStatus)fuelLevel_State {
+- (nullable SDLComponentVolumeStatus)fuelLevel_State {
NSObject *obj = [parameters objectForKey:SDLNameFuelLevelState];
return (SDLComponentVolumeStatus)obj;
}
-- (void)setInstantFuelConsumption:(NSNumber<SDLFloat> *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable NSNumber<SDLFloat> *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -100,11 +100,11 @@
}
}
-- (NSNumber<SDLFloat> *)instantFuelConsumption {
+- (nullable NSNumber<SDLFloat> *)instantFuelConsumption {
return [parameters objectForKey:SDLNameInstantFuelConsumption];
}
-- (void)setExternalTemperature:(NSNumber<SDLFloat> *)externalTemperature {
+- (void)setExternalTemperature:(nullable NSNumber<SDLFloat> *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -112,11 +112,11 @@
}
}
-- (NSNumber<SDLFloat> *)externalTemperature {
+- (nullable NSNumber<SDLFloat> *)externalTemperature {
return [parameters objectForKey:SDLNameExternalTemperature];
}
-- (void)setVin:(NSString *)vin {
+- (void)setVin:(nullable NSString *)vin {
if (vin != nil) {
[parameters setObject:vin forKey:SDLNameVIN];
} else {
@@ -124,11 +124,11 @@
}
}
-- (NSString *)vin {
+- (nullable NSString *)vin {
return [parameters objectForKey:SDLNameVIN];
}
-- (void)setPrndl:(SDLPRNDL)prndl {
+- (void)setPrndl:(nullable SDLPRNDL)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -136,12 +136,12 @@
}
}
-- (SDLPRNDL)prndl {
+- (nullable SDLPRNDL)prndl {
NSObject *obj = [parameters objectForKey:SDLNamePRNDL];
return (SDLPRNDL)obj;
}
-- (void)setTirePressure:(SDLTireStatus *)tirePressure {
+- (void)setTirePressure:(nullable SDLTireStatus *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -149,16 +149,16 @@
}
}
-- (SDLTireStatus *)tirePressure {
+- (nullable SDLTireStatus *)tirePressure {
NSObject *obj = [parameters objectForKey:SDLNameTirePressure];
- if (obj == nil || [obj isKindOfClass:SDLTireStatus.class]) {
- return (SDLTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLTireStatus*)obj;
}
-- (void)setOdometer:(NSNumber<SDLInt> *)odometer {
+- (void)setOdometer:(nullable NSNumber<SDLInt> *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -166,11 +166,11 @@
}
}
-- (NSNumber<SDLInt> *)odometer {
+- (nullable NSNumber<SDLInt> *)odometer {
return [parameters objectForKey:SDLNameOdometer];
}
-- (void)setBeltStatus:(SDLBeltStatus *)beltStatus {
+- (void)setBeltStatus:(nullable SDLBeltStatus *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -178,16 +178,16 @@
}
}
-- (SDLBeltStatus *)beltStatus {
+- (nullable SDLBeltStatus *)beltStatus {
NSObject *obj = [parameters objectForKey:SDLNameBeltStatus];
- if (obj == nil || [obj isKindOfClass:SDLBeltStatus.class]) {
- return (SDLBeltStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLBeltStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLBeltStatus*)obj;
}
-- (void)setBodyInformation:(SDLBodyInformation *)bodyInformation {
+- (void)setBodyInformation:(nullable SDLBodyInformation *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -195,16 +195,16 @@
}
}
-- (SDLBodyInformation *)bodyInformation {
+- (nullable SDLBodyInformation *)bodyInformation {
NSObject *obj = [parameters objectForKey:SDLNameBodyInformation];
- if (obj == nil || [obj isKindOfClass:SDLBodyInformation.class]) {
- return (SDLBodyInformation *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLBodyInformation alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLBodyInformation*)obj;
}
-- (void)setDeviceStatus:(SDLDeviceStatus *)deviceStatus {
+- (void)setDeviceStatus:(nullable SDLDeviceStatus *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -212,16 +212,16 @@
}
}
-- (SDLDeviceStatus *)deviceStatus {
+- (nullable SDLDeviceStatus *)deviceStatus {
NSObject *obj = [parameters objectForKey:SDLNameDeviceStatus];
- if (obj == nil || [obj isKindOfClass:SDLDeviceStatus.class]) {
- return (SDLDeviceStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLDeviceStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLDeviceStatus*)obj;
}
-- (void)setDriverBraking:(SDLVehicleDataEventStatus)driverBraking {
+- (void)setDriverBraking:(nullable SDLVehicleDataEventStatus)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -229,12 +229,12 @@
}
}
-- (SDLVehicleDataEventStatus)driverBraking {
+- (nullable SDLVehicleDataEventStatus)driverBraking {
NSObject *obj = [parameters objectForKey:SDLNameDriverBraking];
return (SDLVehicleDataEventStatus)obj;
}
-- (void)setWiperStatus:(SDLWiperStatus)wiperStatus {
+- (void)setWiperStatus:(nullable SDLWiperStatus)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -242,12 +242,12 @@
}
}
-- (SDLWiperStatus)wiperStatus {
+- (nullable SDLWiperStatus)wiperStatus {
NSObject *obj = [parameters objectForKey:SDLNameWiperStatus];
return (SDLWiperStatus)obj;
}
-- (void)setHeadLampStatus:(SDLHeadLampStatus *)headLampStatus {
+- (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -255,16 +255,16 @@
}
}
-- (SDLHeadLampStatus *)headLampStatus {
+- (nullable SDLHeadLampStatus *)headLampStatus {
NSObject *obj = [parameters objectForKey:SDLNameHeadLampStatus];
- if (obj == nil || [obj isKindOfClass:SDLHeadLampStatus.class]) {
- return (SDLHeadLampStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLHeadLampStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLHeadLampStatus*)obj;
}
-- (void)setEngineTorque:(NSNumber<SDLFloat> *)engineTorque {
+- (void)setEngineTorque:(nullable NSNumber<SDLFloat> *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -272,11 +272,11 @@
}
}
-- (NSNumber<SDLFloat> *)engineTorque {
+- (nullable NSNumber<SDLFloat> *)engineTorque {
return [parameters objectForKey:SDLNameEngineTorque];
}
-- (void)setAccPedalPosition:(NSNumber<SDLFloat> *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable NSNumber<SDLFloat> *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -284,11 +284,11 @@
}
}
-- (NSNumber<SDLFloat> *)accPedalPosition {
+- (nullable NSNumber<SDLFloat> *)accPedalPosition {
return [parameters objectForKey:SDLNameAccelerationPedalPosition];
}
-- (void)setSteeringWheelAngle:(NSNumber<SDLFloat> *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable NSNumber<SDLFloat> *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -296,11 +296,11 @@
}
}
-- (NSNumber<SDLFloat> *)steeringWheelAngle {
+- (nullable NSNumber<SDLFloat> *)steeringWheelAngle {
return [parameters objectForKey:SDLNameSteeringWheelAngle];
}
-- (void)setECallInfo:(SDLECallInfo *)eCallInfo {
+- (void)setECallInfo:(nullable SDLECallInfo *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -308,16 +308,16 @@
}
}
-- (SDLECallInfo *)eCallInfo {
+- (nullable SDLECallInfo *)eCallInfo {
NSObject *obj = [parameters objectForKey:SDLNameECallInfo];
- if (obj == nil || [obj isKindOfClass:SDLECallInfo.class]) {
- return (SDLECallInfo *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLECallInfo alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLECallInfo*)obj;
}
-- (void)setAirbagStatus:(SDLAirbagStatus *)airbagStatus {
+- (void)setAirbagStatus:(nullable SDLAirbagStatus *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -325,16 +325,16 @@
}
}
-- (SDLAirbagStatus *)airbagStatus {
+- (nullable SDLAirbagStatus *)airbagStatus {
NSObject *obj = [parameters objectForKey:SDLNameAirbagStatus];
- if (obj == nil || [obj isKindOfClass:SDLAirbagStatus.class]) {
- return (SDLAirbagStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLAirbagStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLAirbagStatus*)obj;
}
-- (void)setEmergencyEvent:(SDLEmergencyEvent *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -342,16 +342,16 @@
}
}
-- (SDLEmergencyEvent *)emergencyEvent {
+- (nullable SDLEmergencyEvent *)emergencyEvent {
NSObject *obj = [parameters objectForKey:SDLNameEmergencyEvent];
- if (obj == nil || [obj isKindOfClass:SDLEmergencyEvent.class]) {
- return (SDLEmergencyEvent *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLEmergencyEvent alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLEmergencyEvent*)obj;
}
-- (void)setClusterModeStatus:(SDLClusterModeStatus *)clusterModeStatus {
+- (void)setClusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus {
if (clusterModeStatus != nil) {
[parameters setObject:clusterModeStatus forKey:SDLNameClusterModeStatus];
} else {
@@ -359,16 +359,16 @@
}
}
-- (SDLClusterModeStatus *)clusterModeStatus {
+- (nullable SDLClusterModeStatus *)clusterModeStatus {
NSObject *obj = [parameters objectForKey:SDLNameClusterModeStatus];
- if (obj == nil || [obj isKindOfClass:SDLClusterModeStatus.class]) {
- return (SDLClusterModeStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLClusterModeStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLClusterModeStatus*)obj;
}
-- (void)setMyKey:(SDLMyKey *)myKey {
+- (void)setMyKey:(nullable SDLMyKey *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -376,13 +376,13 @@
}
}
-- (SDLMyKey *)myKey {
+- (nullable SDLMyKey *)myKey {
NSObject *obj = [parameters objectForKey:SDLNameMyKey];
- if (obj == nil || [obj isKindOfClass:SDLMyKey.class]) {
- return (SDLMyKey *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLMyKey alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLMyKey*)obj;
}
@end
diff --git a/SmartDeviceLink/SDLGetWaypoints.h b/SmartDeviceLink/SDLGetWaypoints.h
index 91f95ab9f..b0aaf96c5 100644
--- a/SmartDeviceLink/SDLGetWaypoints.h
+++ b/SmartDeviceLink/SDLGetWaypoints.h
@@ -5,6 +5,7 @@
#import "SDLWaypointType.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLGetWayPoints : SDLRPCRequest
@@ -16,10 +17,16 @@
*
* Required
*/
-@property (strong, nonatomic) SDLWaypointType waypointType;
+@property (nullable, strong, nonatomic) SDLWaypointType waypointType;
@end
+NS_ASSUME_NONNULL_END
+
+NS_ASSUME_NONNULL_BEGIN
+
__deprecated_msg("Use SDLGetWayPoints instead")
@interface SDLGetWaypoints : SDLGetWayPoints
- @end
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetWaypoints.m b/SmartDeviceLink/SDLGetWaypoints.m
index 3733bf8d7..79b485f51 100644
--- a/SmartDeviceLink/SDLGetWaypoints.m
+++ b/SmartDeviceLink/SDLGetWaypoints.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGetWayPoints
- (instancetype)init {
@@ -25,7 +27,7 @@
return self;
}
-- (void)setWaypointType:(SDLWaypointType)waypointType {
+- (void)setWaypointType:(nullable SDLWaypointType)waypointType {
if (waypointType != nil) {
parameters[SDLNameWaypointType] = waypointType;
} else {
@@ -33,7 +35,7 @@
}
}
-- (SDLWaypointType)waypointType {
+- (nullable SDLWaypointType)waypointType {
return parameters[SDLNameWaypointType];
}
@@ -42,3 +44,5 @@
@implementation SDLGetWaypoints
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetWaypointsResponse.h b/SmartDeviceLink/SDLGetWaypointsResponse.h
index 1d01fafda..3da0b1a0d 100644
--- a/SmartDeviceLink/SDLGetWaypointsResponse.h
+++ b/SmartDeviceLink/SDLGetWaypointsResponse.h
@@ -5,6 +5,8 @@
@class SDLLocationDetails;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLGetWayPointsResponse : SDLRPCResponse
/**
@@ -14,10 +16,12 @@
*
* Optional, Array size 1 - 10
*/
-@property (strong, nonatomic) NSArray<SDLLocationDetails *> *waypoints;
+@property (nullable, strong, nonatomic) NSArray<SDLLocationDetails *> *waypoints;
@end
__deprecated_msg("Use SDLGetWayPointsResponse instead")
@interface SDLGetWaypointsResponse : SDLGetWayPointsResponse
- @end
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGetWaypointsResponse.m b/SmartDeviceLink/SDLGetWaypointsResponse.m
index 7deb35a09..7affe27b1 100644
--- a/SmartDeviceLink/SDLGetWaypointsResponse.m
+++ b/SmartDeviceLink/SDLGetWaypointsResponse.m
@@ -6,6 +6,8 @@
#import "SDLLocationDetails.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLGetWayPointsResponse
- (instancetype)init {
@@ -14,7 +16,7 @@
return self;
}
-- (void)setWaypoints:(NSArray<SDLLocationDetails *> *)waypoints {
+- (void)setWaypoints:(nullable NSArray<SDLLocationDetails *> *)waypoints {
if (waypoints != nil) {
parameters[SDLNameWaypoints] = waypoints;
} else {
@@ -22,7 +24,7 @@
}
}
-- (NSArray<SDLLocationDetails *> *)waypoints {
+- (nullable NSArray<SDLLocationDetails *> *)waypoints {
NSMutableArray *array = [parameters objectForKey:SDLNameWaypoints];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLLocationDetails.class]) {
return [array copy];
@@ -40,3 +42,5 @@
@implementation SDLGetWaypointsResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGlobals.h b/SmartDeviceLink/SDLGlobals.h
index fced9d4e9..367915d0c 100644
--- a/SmartDeviceLink/SDLGlobals.h
+++ b/SmartDeviceLink/SDLGlobals.h
@@ -8,6 +8,8 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
#define SDL_SYSTEM_VERSION_LESS_THAN(version) ([[[UIDevice currentDevice] systemVersion] compare:version options:NSNumericSearch] == NSOrderedAscending)
#define BLOCK_RETURN return
@@ -17,6 +19,8 @@
@property (assign, nonatomic, readonly) NSUInteger maxMTUSize;
@property (assign, nonatomic) NSUInteger maxHeadUnitVersion;
-+ (instancetype)globals;
++ (instancetype)sharedGlobals;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLGlobals.m b/SmartDeviceLink/SDLGlobals.m
index 7f122c01e..46036d1d4 100644
--- a/SmartDeviceLink/SDLGlobals.m
+++ b/SmartDeviceLink/SDLGlobals.m
@@ -8,8 +8,9 @@
#import "SDLGlobals.h"
-static const NSUInteger maxProxyVersion = 4;
+NS_ASSUME_NONNULL_BEGIN
+static const NSUInteger maxProxyVersion = 4;
@interface SDLGlobals ()
@@ -20,7 +21,7 @@ static const NSUInteger maxProxyVersion = 4;
@implementation SDLGlobals
-+ (instancetype)globals {
++ (instancetype)sharedGlobals {
static SDLGlobals *sharedGlobals = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
@@ -75,3 +76,5 @@ static const NSUInteger maxProxyVersion = 4;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMICapabilities.h b/SmartDeviceLink/SDLHMICapabilities.h
index b20e5b27d..6c7fe43d5 100644
--- a/SmartDeviceLink/SDLHMICapabilities.h
+++ b/SmartDeviceLink/SDLHMICapabilities.h
@@ -4,6 +4,8 @@
#import "SDLRPCStruct.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLHMICapabilities : SDLRPCStruct
/**
@@ -11,13 +13,15 @@
Boolean value. Optional.
*/
-@property (copy, nonatomic) NSNumber<SDLBool> *navigation;
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *navigation;
/**
Availability of build in phone. True: Available, False: Not Available
Boolean value. Optional.
*/
-@property (copy, nonatomic) NSNumber<SDLBool> *phoneCall;
+@property (nullable, copy, nonatomic) NSNumber<SDLBool> *phoneCall;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMICapabilities.m b/SmartDeviceLink/SDLHMICapabilities.m
index 677ff8e84..52fe4d8cb 100644
--- a/SmartDeviceLink/SDLHMICapabilities.m
+++ b/SmartDeviceLink/SDLHMICapabilities.m
@@ -6,9 +6,11 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLHMICapabilities
-- (void)setNavigation:(NSNumber<SDLBool> *)navigation {
+- (void)setNavigation:(nullable NSNumber<SDLBool> *)navigation {
if (navigation != nil) {
store[SDLNameNavigation] = navigation;
} else {
@@ -16,11 +18,11 @@
}
}
-- (NSNumber<SDLBool> *)navigation {
+- (nullable NSNumber<SDLBool> *)navigation {
return store[SDLNameNavigation];
}
-- (void)setPhoneCall:(NSNumber<SDLBool> *)phoneCall {
+- (void)setPhoneCall:(nullable NSNumber<SDLBool> *)phoneCall {
if (phoneCall != nil) {
store[SDLNamePhoneCall] = phoneCall;
} else {
@@ -28,8 +30,10 @@
}
}
-- (NSNumber<SDLBool> *)phoneCall {
+- (nullable NSNumber<SDLBool> *)phoneCall {
return store[SDLNamePhoneCall];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMIPermissions.h b/SmartDeviceLink/SDLHMIPermissions.h
index e9d85a280..a37f867e6 100644
--- a/SmartDeviceLink/SDLHMIPermissions.h
+++ b/SmartDeviceLink/SDLHMIPermissions.h
@@ -11,6 +11,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLHMIPermissions : SDLRPCStruct
/**
@@ -32,3 +35,5 @@
@property (strong, nonatomic) NSMutableArray<SDLHMILevel> *userDisallowed;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHMIPermissions.m b/SmartDeviceLink/SDLHMIPermissions.m
index 7e3a9c16f..cd301151e 100644
--- a/SmartDeviceLink/SDLHMIPermissions.m
+++ b/SmartDeviceLink/SDLHMIPermissions.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLHMIPermissions
- (void)setAllowed:(NSMutableArray<SDLHMILevel> *)allowed {
@@ -52,3 +54,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHeadLampStatus.h b/SmartDeviceLink/SDLHeadLampStatus.h
index ffc8e7b0d..f695fdb2d 100644
--- a/SmartDeviceLink/SDLHeadLampStatus.h
+++ b/SmartDeviceLink/SDLHeadLampStatus.h
@@ -9,6 +9,9 @@
/**
* Status of the head lamps
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLHeadLampStatus : SDLRPCStruct
/**
@@ -20,6 +23,8 @@
*/
@property (strong, nonatomic) NSNumber<SDLBool> *highBeamsOn;
-@property (strong, nonatomic) SDLAmbientLightStatus ambientLightSensorStatus;
+@property (nullable, strong, nonatomic) SDLAmbientLightStatus ambientLightSensorStatus;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHeadLampStatus.m b/SmartDeviceLink/SDLHeadLampStatus.m
index 68936b8b0..fb79c8175 100644
--- a/SmartDeviceLink/SDLHeadLampStatus.m
+++ b/SmartDeviceLink/SDLHeadLampStatus.m
@@ -6,6 +6,8 @@
#import "SDLAmbientLightStatus.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLHeadLampStatus
- (void)setLowBeamsOn:(NSNumber<SDLBool> *)lowBeamsOn {
@@ -32,7 +34,7 @@
return [store objectForKey:SDLNameHighBeamsOn];
}
-- (void)setAmbientLightSensorStatus:(SDLAmbientLightStatus)ambientLightSensorStatus {
+- (void)setAmbientLightSensorStatus:(nullable SDLAmbientLightStatus)ambientLightSensorStatus {
if (ambientLightSensorStatus != nil) {
[store setObject:ambientLightSensorStatus forKey:SDLNameAmbientLightSensorStatus];
} else {
@@ -40,9 +42,11 @@
}
}
-- (SDLAmbientLightStatus)ambientLightSensorStatus {
+- (nullable SDLAmbientLightStatus)ambientLightSensorStatus {
NSObject *obj = [store objectForKey:SDLNameAmbientLightSensorStatus];
return (SDLAmbientLightStatus)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHexUtility.h b/SmartDeviceLink/SDLHexUtility.h
index 7b639a7af..95b564b57 100644
--- a/SmartDeviceLink/SDLHexUtility.h
+++ b/SmartDeviceLink/SDLHexUtility.h
@@ -5,9 +5,13 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLHexUtility : NSObject
+ (NSString *)getHexString:(UInt8 *)bytes length:(NSUInteger)length;
+ (NSString *)getHexString:(NSData *)data;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLHexUtility.m b/SmartDeviceLink/SDLHexUtility.m
index 0787d804a..b103322ed 100644
--- a/SmartDeviceLink/SDLHexUtility.m
+++ b/SmartDeviceLink/SDLHexUtility.m
@@ -7,6 +7,8 @@
@implementation SDLHexUtility
+NS_ASSUME_NONNULL_BEGIN
+
// Using this function as a fail-safe, because we know this is successful.
+ (NSString *)getHexString:(UInt8 *)bytes length:(NSUInteger)length {
NSMutableString *ret = [NSMutableString stringWithCapacity:(length * 2)];
@@ -58,3 +60,5 @@ NSString *getHexString(NSData *data) {
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLIAPSession.h b/SmartDeviceLink/SDLIAPSession.h
index 789c42b23..6442540c4 100644
--- a/SmartDeviceLink/SDLIAPSession.h
+++ b/SmartDeviceLink/SDLIAPSession.h
@@ -8,15 +8,17 @@
@class SDLStreamDelegate;
+NS_ASSUME_NONNULL_BEGIN
+
typedef void (^SessionCompletionHandler)(BOOL success);
@interface SDLIAPSession : NSObject
-@property (strong, nonatomic) EAAccessory *accessory;
-@property (strong, nonatomic) NSString *protocol;
-@property (strong, nonatomic) EASession *easession;
-@property (weak, nonatomic) id<SDLIAPSessionDelegate> delegate;
-@property (strong, nonatomic) SDLStreamDelegate *streamDelegate;
+@property (nullable, strong, nonatomic) EAAccessory *accessory;
+@property (nullable, strong, nonatomic) NSString *protocol;
+@property (nullable, strong, nonatomic) EASession *easession;
+@property (nullable, weak, nonatomic) id<SDLIAPSessionDelegate> delegate;
+@property (nullable, strong, nonatomic) SDLStreamDelegate *streamDelegate;
- (instancetype)initWithAccessory:(EAAccessory *)accessory
forProtocol:(NSString *)protocol;
@@ -25,3 +27,5 @@ typedef void (^SessionCompletionHandler)(BOOL success);
- (void)stop;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLIAPSession.m b/SmartDeviceLink/SDLIAPSession.m
index a2f2ec73f..7bbc96fa1 100644
--- a/SmartDeviceLink/SDLIAPSession.m
+++ b/SmartDeviceLink/SDLIAPSession.m
@@ -7,6 +7,7 @@
#import "SDLStreamDelegate.h"
#import "SDLTimer.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLIAPSession ()
@@ -26,11 +27,8 @@
self = [super init];
if (self) {
- _delegate = nil;
_accessory = accessory;
_protocol = protocol;
- _streamDelegate = nil;
- _easession = nil;
_isInputStreamOpen = NO;
_isOutputStreamOpen = NO;
}
@@ -141,16 +139,6 @@
};
}
-
-#pragma mark - Lifecycle Destruction
-
-- (void)dealloc {
- self.delegate = nil;
- self.accessory = nil;
- self.protocol = nil;
- self.streamDelegate = nil;
- self.easession = nil;
- [SDLDebugTool logInfo:@"SDLIAPSession Dealloc"];
-}
-
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLIAPSessionDelegate.h b/SmartDeviceLink/SDLIAPSessionDelegate.h
index 6ec7e189b..b391a38fc 100644
--- a/SmartDeviceLink/SDLIAPSessionDelegate.h
+++ b/SmartDeviceLink/SDLIAPSessionDelegate.h
@@ -5,9 +5,13 @@
#import <Foundation/Foundation.h>
@class SDLIAPSession;
+NS_ASSUME_NONNULL_BEGIN
+
@protocol SDLIAPSessionDelegate
- (void)onSessionInitializationCompleteForSession:(SDLIAPSession *)session;
- (void)onSessionStreamsEnded:(SDLIAPSession *)session;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLIAPTransport.h b/SmartDeviceLink/SDLIAPTransport.h
index 30ac042a9..94fd01bda 100644
--- a/SmartDeviceLink/SDLIAPTransport.h
+++ b/SmartDeviceLink/SDLIAPTransport.h
@@ -6,10 +6,13 @@
#import "SDLAbstractTransport.h"
#import "SDLIAPSessionDelegate.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLIAPTransport : SDLAbstractTransport <SDLIAPSessionDelegate>
-@property (strong, nonatomic) SDLIAPSession *controlSession;
-@property (strong, nonatomic) SDLIAPSession *session;
+@property (nullable, strong, nonatomic) SDLIAPSession *controlSession;
+@property (nullable, strong, nonatomic) SDLIAPSession *session;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLIAPTransport.m b/SmartDeviceLink/SDLIAPTransport.m
index 3c1bbd507..e2a85bc78 100644
--- a/SmartDeviceLink/SDLIAPTransport.m
+++ b/SmartDeviceLink/SDLIAPTransport.m
@@ -15,6 +15,7 @@
#import "SDLTimer.h"
#import <CommonCrypto/CommonDigest.h>
+NS_ASSUME_NONNULL_BEGIN
NSString *const legacyProtocolString = @"com.ford.sync.prot0";
NSString *const controlProtocolString = @"com.smartdevicelink.prot0";
@@ -27,12 +28,11 @@ int const streamOpenTimeoutSeconds = 2;
@interface SDLIAPTransport () {
dispatch_queue_t _transmit_queue;
- BOOL _alreadyDestructed;
}
@property (assign, nonatomic) int retryCounter;
@property (assign, nonatomic) BOOL sessionSetupInProgress;
-@property (strong, nonatomic) SDLTimer *protocolIndexTimer;
+@property (nullable, strong, nonatomic) SDLTimer *protocolIndexTimer;
@end
@@ -41,12 +41,8 @@ int const streamOpenTimeoutSeconds = 2;
- (instancetype)init {
if (self = [super init]) {
- _alreadyDestructed = NO;
- _session = nil;
- _controlSession = nil;
_retryCounter = 0;
_sessionSetupInProgress = NO;
- _protocolIndexTimer = nil;
_transmit_queue = dispatch_queue_create("com.sdl.transport.iap.transmit", DISPATCH_QUEUE_SERIAL);
[self sdl_startEventListening];
@@ -58,6 +54,12 @@ int const streamOpenTimeoutSeconds = 2;
}
+- (void)dealloc {
+ [self disconnect];
+ [self sdl_stopEventListening];
+ [SDLDebugTool logInfo:@"SDLIAPTransport Dealloc" withType:SDLDebugType_Transport_iAP toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+}
+
#pragma mark - Notification Subscriptions
- (void)sdl_startEventListening {
@@ -380,9 +382,9 @@ int const streamOpenTimeoutSeconds = 2;
return ^(NSInputStream *istream) {
__strong typeof(weakSelf) strongSelf = weakSelf;
- uint8_t buf[[SDLGlobals globals].maxMTUSize];
+ uint8_t buf[[SDLGlobals sharedGlobals].maxMTUSize];
while ([istream hasBytesAvailable]) {
- NSInteger bytesRead = [istream read:buf maxLength:[SDLGlobals globals].maxMTUSize];
+ NSInteger bytesRead = [istream read:buf maxLength:[SDLGlobals sharedGlobals].maxMTUSize];
NSData *dataIn = [NSData dataWithBytes:buf length:bytesRead];
if (bytesRead > 0) {
@@ -450,26 +452,6 @@ int const streamOpenTimeoutSeconds = 2;
return delay;
}
-
-#pragma mark - Lifecycle Destruction
-
-- (void)sdl_destructObjects {
- if (!_alreadyDestructed) {
- _alreadyDestructed = YES;
- [self sdl_stopEventListening];
- self.controlSession = nil;
- self.session = nil;
- self.delegate = nil;
- }
-}
-
-- (void)dispose {
- [self sdl_destructObjects];
-}
-
-- (void)dealloc {
- [self sdl_destructObjects];
- [SDLDebugTool logInfo:@"SDLIAPTransport Dealloc" withType:SDLDebugType_Transport_iAP toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
-}
-
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImage.h b/SmartDeviceLink/SDLImage.h
index 722fbfd0b..cb21b9545 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, nonatomic) 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/SDLImageField.h b/SmartDeviceLink/SDLImageField.h
index 8ae4aa005..429e77343 100644
--- a/SmartDeviceLink/SDLImageField.h
+++ b/SmartDeviceLink/SDLImageField.h
@@ -8,10 +8,14 @@
@class SDLImageResolution;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLImageField : SDLRPCStruct
@property (strong, nonatomic) SDLImageFieldName name;
@property (strong, nonatomic) NSMutableArray<SDLFileType> *imageTypeSupported;
-@property (strong, nonatomic) SDLImageResolution *imageResolution;
+@property (nullable, strong, nonatomic) SDLImageResolution *imageResolution;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImageField.m b/SmartDeviceLink/SDLImageField.m
index fe6b089b6..d7f2974fe 100644
--- a/SmartDeviceLink/SDLImageField.m
+++ b/SmartDeviceLink/SDLImageField.m
@@ -7,6 +7,8 @@
#import "SDLImageResolution.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLImageField
- (void)setName:(SDLImageFieldName)name {
@@ -43,7 +45,7 @@
}
}
-- (void)setImageResolution:(SDLImageResolution *)imageResolution {
+- (void)setImageResolution:(nullable SDLImageResolution *)imageResolution {
if (imageResolution != nil) {
[store setObject:imageResolution forKey:SDLNameImageResolution];
} else {
@@ -51,13 +53,15 @@
}
}
-- (SDLImageResolution *)imageResolution {
+- (nullable SDLImageResolution *)imageResolution {
NSObject *obj = [store objectForKey:SDLNameImageResolution];
- if (obj == nil || [obj isKindOfClass:SDLImageResolution.class]) {
- return (SDLImageResolution *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImageResolution alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImageResolution*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImageResolution.h b/SmartDeviceLink/SDLImageResolution.h
index 50df87cce..d9b25eec7 100644
--- a/SmartDeviceLink/SDLImageResolution.h
+++ b/SmartDeviceLink/SDLImageResolution.h
@@ -4,9 +4,13 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLImageResolution : SDLRPCStruct
@property (strong, nonatomic) NSNumber<SDLInt> *resolutionWidth;
@property (strong, nonatomic) NSNumber<SDLInt> *resolutionHeight;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLImageResolution.m b/SmartDeviceLink/SDLImageResolution.m
index 61b7f1eaf..ad62502ee 100644
--- a/SmartDeviceLink/SDLImageResolution.m
+++ b/SmartDeviceLink/SDLImageResolution.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLImageResolution
- (void)setResolutionWidth:(NSNumber<SDLInt> *)resolutionWidth {
@@ -33,3 +35,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLKeyboardProperties.h b/SmartDeviceLink/SDLKeyboardProperties.h
index 0b34180e8..576053bd9 100644
--- a/SmartDeviceLink/SDLKeyboardProperties.h
+++ b/SmartDeviceLink/SDLKeyboardProperties.h
@@ -7,14 +7,18 @@
#import "SDLKeypressMode.h"
#import "SDLLanguage.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLKeyboardProperties : SDLRPCStruct
-- (instancetype)initWithLanguage:(SDLLanguage)language layout:(SDLKeyboardLayout)layout keypressMode:(SDLKeypressMode)keypressMode limitedCharacterList:(NSArray<NSString *> *)limitedCharacterList autoCompleteText:(NSString *)autoCompleteText;
+- (instancetype)initWithLanguage:(nullable SDLLanguage)language layout:(nullable SDLKeyboardLayout)layout keypressMode:(nullable SDLKeypressMode)keypressMode limitedCharacterList:(nullable NSArray<NSString *> *)limitedCharacterList autoCompleteText:(nullable NSString *)autoCompleteText;
-@property (strong, nonatomic) SDLLanguage language;
-@property (strong, nonatomic) SDLKeyboardLayout keyboardLayout;
-@property (strong, nonatomic) SDLKeypressMode keypressMode;
-@property (strong, nonatomic) NSMutableArray<NSString *> *limitedCharacterList;
-@property (strong, nonatomic) NSString *autoCompleteText;
+@property (nullable, strong, nonatomic) SDLLanguage language;
+@property (nullable, strong, nonatomic) SDLKeyboardLayout keyboardLayout;
+@property (nullable, strong, nonatomic) SDLKeypressMode keypressMode;
+@property (nullable, strong, nonatomic) NSMutableArray<NSString *> *limitedCharacterList;
+@property (nullable, strong, nonatomic) NSString *autoCompleteText;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLKeyboardProperties.m b/SmartDeviceLink/SDLKeyboardProperties.m
index 8219d5365..20f6c2e8b 100644
--- a/SmartDeviceLink/SDLKeyboardProperties.m
+++ b/SmartDeviceLink/SDLKeyboardProperties.m
@@ -5,9 +5,11 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLKeyboardProperties
-- (instancetype)initWithLanguage:(SDLLanguage)language layout:(SDLKeyboardLayout)layout keypressMode:(SDLKeypressMode)keypressMode limitedCharacterList:(NSArray<NSString *> *)limitedCharacterList autoCompleteText:(NSString *)autoCompleteText {
+- (instancetype)initWithLanguage:(nullable SDLLanguage)language layout:(nullable SDLKeyboardLayout)layout keypressMode:(nullable SDLKeypressMode)keypressMode limitedCharacterList:(nullable NSArray<NSString *> *)limitedCharacterList autoCompleteText:(nullable NSString *)autoCompleteText {
self = [self init];
if (!self) {
return nil;
@@ -22,7 +24,7 @@
return self;
}
-- (void)setLanguage:(SDLLanguage)language {
+- (void)setLanguage:(nullable SDLLanguage)language {
if (language != nil) {
[store setObject:language forKey:SDLNameLanguage];
} else {
@@ -30,12 +32,12 @@
}
}
-- (SDLLanguage)language {
+- (nullable SDLLanguage)language {
NSObject *obj = [store objectForKey:SDLNameLanguage];
return (SDLLanguage )obj;
}
-- (void)setKeyboardLayout:(SDLKeyboardLayout)keyboardLayout {
+- (void)setKeyboardLayout:(nullable SDLKeyboardLayout)keyboardLayout {
if (keyboardLayout != nil) {
[store setObject:keyboardLayout forKey:SDLNameKeyboardLayout];
} else {
@@ -43,12 +45,12 @@
}
}
-- (SDLKeyboardLayout)keyboardLayout {
+- (nullable SDLKeyboardLayout)keyboardLayout {
NSObject *obj = [store objectForKey:SDLNameKeyboardLayout];
return (SDLKeyboardLayout)obj;
}
-- (void)setKeypressMode:(SDLKeypressMode)keypressMode {
+- (void)setKeypressMode:(nullable SDLKeypressMode)keypressMode {
if (keypressMode != nil) {
[store setObject:keypressMode forKey:SDLNameKeypressMode];
} else {
@@ -56,12 +58,12 @@
}
}
-- (SDLKeypressMode)keypressMode {
+- (nullable SDLKeypressMode)keypressMode {
NSObject *obj = [store objectForKey:SDLNameKeypressMode];
return (SDLKeypressMode)obj;
}
-- (void)setLimitedCharacterList:(NSMutableArray<NSString *> *)limitedCharacterList {
+- (void)setLimitedCharacterList:(nullable NSMutableArray<NSString *> *)limitedCharacterList {
if (limitedCharacterList != nil) {
[store setObject:limitedCharacterList forKey:SDLNameLimitedCharacterList];
} else {
@@ -69,11 +71,11 @@
}
}
-- (NSMutableArray<NSString *> *)limitedCharacterList {
+- (nullable NSMutableArray<NSString *> *)limitedCharacterList {
return [store objectForKey:SDLNameLimitedCharacterList];
}
-- (void)setAutoCompleteText:(NSString *)autoCompleteText {
+- (void)setAutoCompleteText:(nullable NSString *)autoCompleteText {
if (autoCompleteText != nil) {
[store setObject:autoCompleteText forKey:SDLNameAutoCompleteText];
} else {
@@ -81,8 +83,10 @@
}
}
-- (NSString *)autoCompleteText {
+- (nullable NSString *)autoCompleteText {
return [store objectForKey:SDLNameAutoCompleteText];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 0ddf64a03..ebd3b5e0b 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -175,7 +175,8 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
self.lastCorrelationId = 0;
self.hmiLevel = nil;
- [self sdl_disposeProxy]; // call this method instead of stopProxy to avoid double-dispatching
+ [SDLDebugTool logInfo:@"Stopping Proxy"];
+ self.proxy = nil;
[self.delegate managerDidDisconnect];
[self startWithReadyHandler:self.readyHandler]; // Start up again to start watching for new connections
@@ -377,13 +378,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
#pragma mark Helper Methods
-
-- (void)sdl_disposeProxy {
- [SDLDebugTool logInfo:@"Stop Proxy"];
- [self.proxy dispose];
- self.proxy = nil;
-}
-
- (NSNumber<SDLInt> *)sdl_getNextCorrelationId {
if (self.lastCorrelationId == UINT16_MAX) {
self.lastCorrelationId = 0;
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/SDLListFilesResponse.h b/SmartDeviceLink/SDLListFilesResponse.h
index 853060987..c07d617fe 100644
--- a/SmartDeviceLink/SDLListFilesResponse.h
+++ b/SmartDeviceLink/SDLListFilesResponse.h
@@ -9,9 +9,14 @@
*
* Since <b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLListFilesResponse : SDLRPCResponse
-@property (strong, nonatomic) NSMutableArray<NSString *> *filenames;
+@property (nullable, strong, nonatomic) NSMutableArray<NSString *> *filenames;
@property (strong, nonatomic) NSNumber<SDLInt> *spaceAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLListFilesResponse.m b/SmartDeviceLink/SDLListFilesResponse.m
index 2e7f0dc8f..6a86eab1b 100644
--- a/SmartDeviceLink/SDLListFilesResponse.m
+++ b/SmartDeviceLink/SDLListFilesResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLListFilesResponse
- (instancetype)init {
@@ -14,7 +16,7 @@
return self;
}
-- (void)setFilenames:(NSMutableArray<NSString *> *)filenames {
+- (void)setFilenames:(nullable NSMutableArray<NSString *> *)filenames {
if (filenames != nil) {
[parameters setObject:filenames forKey:SDLNameFilenames];
} else {
@@ -22,7 +24,7 @@
}
}
-- (NSMutableArray<NSString *> *)filenames {
+- (nullable NSMutableArray<NSString *> *)filenames {
return [parameters objectForKey:SDLNameFilenames];
}
@@ -39,3 +41,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLocationCoordinate.h b/SmartDeviceLink/SDLLocationCoordinate.h
index dd2850f97..0fef535c2 100644
--- a/SmartDeviceLink/SDLLocationCoordinate.h
+++ b/SmartDeviceLink/SDLLocationCoordinate.h
@@ -3,6 +3,8 @@
#import "SDLRPCStruct.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLLocationCoordinate : SDLRPCStruct
/**
@@ -20,3 +22,5 @@
@property (copy, nonatomic) NSNumber<SDLFloat> *longitudeDegrees;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLocationCoordinate.m b/SmartDeviceLink/SDLLocationCoordinate.m
index c3f69279a..d7aec2d41 100644
--- a/SmartDeviceLink/SDLLocationCoordinate.m
+++ b/SmartDeviceLink/SDLLocationCoordinate.m
@@ -4,6 +4,8 @@
#import "SDLLocationCoordinate.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLLocationCoordinate
- (void)setLongitudeDegrees:(NSNumber<SDLFloat> *)longitudeDegrees {
@@ -31,3 +33,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLocationDetails.h b/SmartDeviceLink/SDLLocationDetails.h
index 6f38c54ae..3bce4d58c 100644
--- a/SmartDeviceLink/SDLLocationDetails.h
+++ b/SmartDeviceLink/SDLLocationDetails.h
@@ -7,6 +7,8 @@
@class SDLImage;
@class SDLOasisAddress;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLLocationDetails : SDLRPCStruct
/**
@@ -16,35 +18,35 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLLocationCoordinate *coordinate;
+@property (nullable, strong, nonatomic) SDLLocationCoordinate *coordinate;
/**
* @abstract Name of location.
*
* Optional, Max length 500 chars
*/
-@property (copy, nonatomic) NSString *locationName;
+@property (nullable, copy, nonatomic) NSString *locationName;
/**
* @abstract Location address for display purposes only.
*
* Optional, Array of Strings, Array length 0 - 4, Max String length 500
*/
-@property (copy, nonatomic) NSArray<NSString *> *addressLines;
+@property (nullable, copy, nonatomic) NSArray<NSString *> *addressLines;
/**
* @abstract Description intended location / establishment.
*
* Optional, Max length 500 chars
*/
-@property (copy, nonatomic) NSString *locationDescription;
+@property (nullable, copy, nonatomic) NSString *locationDescription;
/**
* @abstract Phone number of location / establishment.
*
* Optional, Max length 500 chars
*/
-@property (copy, nonatomic) NSString *phoneNumber;
+@property (nullable, copy, nonatomic) NSString *phoneNumber;
/**
* @abstract Image / icon of intended location.
@@ -53,7 +55,7 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLImage *locationImage;
+@property (nullable, strong, nonatomic) SDLImage *locationImage;
/**
* @abstract Address to be used by navigation engines for search.
@@ -62,7 +64,9 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLOasisAddress *searchAddress;
+@property (nullable, strong, nonatomic) SDLOasisAddress *searchAddress;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLocationDetails.m b/SmartDeviceLink/SDLLocationDetails.m
index e5b113fcb..e10f97ff8 100644
--- a/SmartDeviceLink/SDLLocationDetails.m
+++ b/SmartDeviceLink/SDLLocationDetails.m
@@ -8,9 +8,11 @@
#import "SDLNames.h"
#import "SDLOasisAddress.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLLocationDetails
-- (void)setCoordinate:(SDLLocationCoordinate *)coordinate {
+- (void)setCoordinate:(nullable SDLLocationCoordinate *)coordinate {
if (coordinate != nil) {
store[SDLNameLocationCoordinate] = coordinate;
} else {
@@ -18,7 +20,7 @@
}
}
-- (SDLLocationCoordinate *)coordinate {
+- (nullable SDLLocationCoordinate *)coordinate {
NSObject *obj = [store objectForKey: SDLNameLocationCoordinate];
if (obj == nil || [obj isKindOfClass:SDLLocationCoordinate.class]) {
return (SDLLocationCoordinate *)obj;
@@ -27,7 +29,7 @@
}
}
-- (void)setLocationName:(NSString *)locationName {
+- (void)setLocationName:(nullable NSString *)locationName {
if (locationName != nil) {
store[SDLNameLocationName] = locationName;
} else {
@@ -35,11 +37,11 @@
}
}
-- (NSString *)locationName {
+- (nullable NSString *)locationName {
return store[SDLNameLocationName];
}
-- (void)setAddressLines:(NSArray<NSString *> *)addressLines {
+- (void)setAddressLines:(nullable NSArray<NSString *> *)addressLines {
if (addressLines != nil) {
store[SDLNameAddressLines] = addressLines;
} else {
@@ -47,11 +49,11 @@
}
}
-- (NSArray<NSString *> *)addressLines {
+- (nullable NSArray<NSString *> *)addressLines {
return store[SDLNameAddressLines];
}
-- (void)setLocationDescription:(NSString *)locationDescription {
+- (void)setLocationDescription:(nullable NSString *)locationDescription {
if (locationDescription != nil) {
store[SDLNameLocationDescription] = locationDescription;
} else {
@@ -59,11 +61,11 @@
}
}
-- (NSString *)locationDescription {
+- (nullable NSString *)locationDescription {
return store[SDLNameLocationDescription];
}
-- (void)setPhoneNumber:(NSString *)phoneNumber {
+- (void)setPhoneNumber:(nullable NSString *)phoneNumber {
if (phoneNumber != nil) {
store[SDLNamePhoneNumber] = phoneNumber;
} else {
@@ -71,11 +73,11 @@
}
}
-- (NSString *)phoneNumber {
+- (nullable NSString *)phoneNumber {
return store[SDLNamePhoneNumber];
}
-- (void)setLocationImage:(SDLImage *)locationImage {
+- (void)setLocationImage:(nullable SDLImage *)locationImage {
if (locationImage != nil) {
store[SDLNameLocationImage] = locationImage;
} else {
@@ -83,7 +85,7 @@
}
}
-- (SDLImage *)locationImage {
+- (nullable SDLImage *)locationImage {
NSObject *obj = [store objectForKey: SDLNameLocationImage];
if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
return (SDLImage *)obj;
@@ -92,7 +94,7 @@
}
}
-- (void)setSearchAddress:(SDLOasisAddress *)searchAddress {
+- (void)setSearchAddress:(nullable SDLOasisAddress *)searchAddress {
if (searchAddress != nil) {
store[SDLNameSearchAddress] = searchAddress;
} else {
@@ -100,7 +102,7 @@
}
}
-- (SDLOasisAddress *)searchAddress {
+- (nullable SDLOasisAddress *)searchAddress {
NSObject *obj = [store objectForKey:SDLNameSearchAddress];
if (obj == nil || [obj isKindOfClass:SDLOasisAddress.class]) {
return (SDLOasisAddress *)obj;
@@ -110,3 +112,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.h b/SmartDeviceLink/SDLLockScreenStatusManager.h
index 43c6d4fab..2a37b9d83 100644
--- a/SmartDeviceLink/SDLLockScreenStatusManager.h
+++ b/SmartDeviceLink/SDLLockScreenStatusManager.h
@@ -10,13 +10,16 @@
@class SDLOnLockScreenStatus;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLLockScreenStatusManager : NSObject
@property (assign, nonatomic) BOOL userSelected;
@property (assign, nonatomic) BOOL driverDistracted;
-@property (strong, nonatomic) SDLHMILevel hmiLevel;
+@property (nullable, strong, nonatomic) SDLHMILevel hmiLevel;
@property (strong, nonatomic, readonly) SDLLockScreenStatus lockScreenStatus;
@property (strong, nonatomic, readonly) SDLOnLockScreenStatus *lockScreenStatusNotification;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLLockScreenStatusManager.m b/SmartDeviceLink/SDLLockScreenStatusManager.m
index 08742991d..87edc20d9 100644
--- a/SmartDeviceLink/SDLLockScreenStatusManager.m
+++ b/SmartDeviceLink/SDLLockScreenStatusManager.m
@@ -8,6 +8,7 @@
#import "SDLLockScreenStatus.h"
#import "SDLOnLockScreenStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLLockScreenStatusManager ()
@@ -39,7 +40,7 @@
_haveDriverDistractionStatus = YES;
}
-- (void)setHmiLevel:(SDLHMILevel)hmiLevel {
+- (void)setHmiLevel:(nullable SDLHMILevel)hmiLevel {
if (_hmiLevel != hmiLevel) {
_hmiLevel = hmiLevel;
}
@@ -92,3 +93,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLMenuParams.h b/SmartDeviceLink/SDLMenuParams.h
index 042e67238..c5b0c81ff 100644
--- a/SmartDeviceLink/SDLMenuParams.h
+++ b/SmartDeviceLink/SDLMenuParams.h
@@ -9,6 +9,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLMenuParams : SDLRPCStruct
- (instancetype)initWithMenuName:(NSString *)menuName;
@@ -21,7 +24,7 @@
*
* Optional, Integer, 0 - 2,000,000,000
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *parentID;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *parentID;
/**
* @abstract The position within the items of the parent Command Menu
@@ -35,7 +38,7 @@
*
* Optional, Integer, 0 - 1000
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *position;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *position;
/**
* @abstract the menu name which appears in menu, representing this command
@@ -45,3 +48,5 @@
@property (strong, nonatomic) NSString *menuName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLMenuParams.m b/SmartDeviceLink/SDLMenuParams.m
index 558f7014a..d20c2ca44 100644
--- a/SmartDeviceLink/SDLMenuParams.m
+++ b/SmartDeviceLink/SDLMenuParams.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLMenuParams
- (instancetype)initWithMenuName:(NSString *)menuName parentId:(UInt32)parentId position:(UInt16)position {
@@ -31,7 +33,7 @@
return self;
}
-- (void)setParentID:(NSNumber<SDLInt> *)parentID {
+- (void)setParentID:(nullable NSNumber<SDLInt> *)parentID {
if (parentID != nil) {
[store setObject:parentID forKey:SDLNameParentId];
} else {
@@ -39,11 +41,11 @@
}
}
-- (NSNumber<SDLInt> *)parentID {
+- (nullable NSNumber<SDLInt> *)parentID {
return [store objectForKey:SDLNameParentId];
}
-- (void)setPosition:(NSNumber<SDLInt> *)position {
+- (void)setPosition:(nullable NSNumber<SDLInt> *)position {
if (position != nil) {
[store setObject:position forKey:SDLNamePosition];
} else {
@@ -51,7 +53,7 @@
}
}
-- (NSNumber<SDLInt> *)position {
+- (nullable NSNumber<SDLInt> *)position {
return [store objectForKey:SDLNamePosition];
}
@@ -68,3 +70,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLMyKey.h b/SmartDeviceLink/SDLMyKey.h
index be4092476..1100d4990 100644
--- a/SmartDeviceLink/SDLMyKey.h
+++ b/SmartDeviceLink/SDLMyKey.h
@@ -5,9 +5,12 @@
#import "SDLVehicleDataStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLMyKey : SDLRPCStruct
@property (strong, nonatomic) SDLVehicleDataStatus e911Override;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLMyKey.m b/SmartDeviceLink/SDLMyKey.m
index a271a063e..158ddc4c4 100644
--- a/SmartDeviceLink/SDLMyKey.m
+++ b/SmartDeviceLink/SDLMyKey.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
#import "SDLVehicleDataStatus.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLMyKey
- (void)setE911Override:(SDLVehicleDataStatus)e911Override {
@@ -22,3 +24,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLNames.h b/SmartDeviceLink/SDLNames.h
index f13ecb179..10cc8c0f3 100644
--- a/SmartDeviceLink/SDLNames.h
+++ b/SmartDeviceLink/SDLNames.h
@@ -4,6 +4,8 @@
#import <Foundation/Foundation.h>
#import "SDLMacros.h"
+NS_ASSUME_NONNULL_BEGIN
+
typedef NSString* SDLName SDL_SWIFT_ENUM;
extern SDLName const SDLNameAccelerationPedalPosition;
@@ -441,3 +443,5 @@ extern SDLName const SDLNameWiperStatus;
extern SDLName const SDLNameX;
extern SDLName const SDLNameY;
extern SDLName const SDLNameYear;
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLNames.m b/SmartDeviceLink/SDLNames.m
index 112bfcdae..a4957bf2f 100644
--- a/SmartDeviceLink/SDLNames.m
+++ b/SmartDeviceLink/SDLNames.m
@@ -3,6 +3,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
SDLName const SDLNameAccelerationPedalPosition = @"accPedalPosition";
SDLName const SDLNameActual = @"actual";
SDLName const SDLNameAddCommand = @"AddCommand";
@@ -438,3 +440,5 @@ SDLName const SDLNameWiperStatus = @"wiperStatus";
SDLName const SDLNameX = @"x";
SDLName const SDLNameY = @"y";
SDLName const SDLNameYear = @"year";
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOasisAddress.h b/SmartDeviceLink/SDLOasisAddress.h
index 17bb00af6..d2a463264 100644
--- a/SmartDeviceLink/SDLOasisAddress.h
+++ b/SmartDeviceLink/SDLOasisAddress.h
@@ -3,73 +3,77 @@
#import "SDLRPCStruct.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOasisAddress : SDLRPCStruct
-- (instancetype)initWithSubThoroughfare:(NSString *)subThoroughfare thoroughfare:(NSString *)thoroughfare locality:(NSString *)locality administrativeArea:(NSString *)administrativeArea postalCode:(NSString *)postalCode countryCode:(NSString *)countryCode;
+- (instancetype)initWithSubThoroughfare:(nullable NSString *)subThoroughfare thoroughfare:(nullable NSString *)thoroughfare locality:(nullable NSString *)locality administrativeArea:(nullable NSString *)administrativeArea postalCode:(nullable NSString *)postalCode countryCode:(nullable NSString *)countryCode;
-- (instancetype)initWithSubThoroughfare:(NSString *)subThoroughfare thoroughfare:(NSString *)thoroughfare locality:(NSString *)locality administrativeArea:(NSString *)administrativeArea postalCode:(NSString *)postalCode countryCode:(NSString *)countryCode countryName:(NSString *)countryName subAdministrativeArea:(NSString *)subAdministrativeArea subLocality:(NSString *)subLocality;
+- (instancetype)initWithSubThoroughfare:(nullable NSString *)subThoroughfare thoroughfare:(nullable NSString *)thoroughfare locality:(nullable NSString *)locality administrativeArea:(nullable NSString *)administrativeArea postalCode:(nullable NSString *)postalCode countryCode:(nullable NSString *)countryCode countryName:(nullable NSString *)countryName subAdministrativeArea:(nullable NSString *)subAdministrativeArea subLocality:(nullable NSString *)subLocality;
/**
* @abstract Name of the country (localized)
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *countryName;
+@property (nullable, copy, nonatomic) NSString *countryName;
/**
* @abstract countryCode of the country(ISO 3166-2)
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *countryCode;
+@property (nullable, copy, nonatomic) NSString *countryCode;
/**
* @abstract postalCode of location (PLZ, ZIP, PIN, CAP etc.)
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *postalCode;
+@property (nullable, copy, nonatomic) NSString *postalCode;
/**
* @abstract Portion of country (e.g. state)
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *administrativeArea;
+@property (nullable, copy, nonatomic) NSString *administrativeArea;
/**
* @abstract Portion of administrativeArea (e.g. county)
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *subAdministrativeArea;
+@property (nullable, copy, nonatomic) NSString *subAdministrativeArea;
/**
* @abstract Hypernym for city/village
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *locality;
+@property (nullable, copy, nonatomic) NSString *locality;
/**
* @abstract Hypernym for district
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *subLocality;
+@property (nullable, copy, nonatomic) NSString *subLocality;
/**
* @abstract Hypernym for street, road etc.
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *thoroughfare;
+@property (nullable, copy, nonatomic) NSString *thoroughfare;
/**
* @abstract Portion of thoroughfare (e.g. house number)
*
* Optional, max length = 200
*/
-@property (copy, nonatomic) NSString *subThoroughfare;
+@property (nullable, copy, nonatomic) NSString *subThoroughfare;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOasisAddress.m b/SmartDeviceLink/SDLOasisAddress.m
index 27782fa49..079863394 100644
--- a/SmartDeviceLink/SDLOasisAddress.m
+++ b/SmartDeviceLink/SDLOasisAddress.m
@@ -4,13 +4,15 @@
#import "SDLOasisAddress.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOasisAddress
-- (instancetype)initWithSubThoroughfare:(NSString *)subThoroughfare thoroughfare:(NSString *)thoroughfare locality:(NSString *)locality administrativeArea:(NSString *)administrativeArea postalCode:(NSString *)postalCode countryCode:(NSString *)countryCode {
+- (instancetype)initWithSubThoroughfare:(nullable NSString *)subThoroughfare thoroughfare:(nullable NSString *)thoroughfare locality:(nullable NSString *)locality administrativeArea:(nullable NSString *)administrativeArea postalCode:(nullable NSString *)postalCode countryCode:(nullable NSString *)countryCode {
return [self initWithSubThoroughfare:subThoroughfare thoroughfare:thoroughfare locality:locality administrativeArea:administrativeArea postalCode:postalCode countryCode:countryCode countryName:nil subAdministrativeArea:nil subLocality:nil];
}
-- (instancetype)initWithSubThoroughfare:(NSString *)subThoroughfare thoroughfare:(NSString *)thoroughfare locality:(NSString *)locality administrativeArea:(NSString *)administrativeArea postalCode:(NSString *)postalCode countryCode:(NSString *)countryCode countryName:(NSString *)countryName subAdministrativeArea:(NSString *)subAdministrativeArea subLocality:(NSString *)subLocality {
+- (instancetype)initWithSubThoroughfare:(nullable NSString *)subThoroughfare thoroughfare:(nullable NSString *)thoroughfare locality:(nullable NSString *)locality administrativeArea:(nullable NSString *)administrativeArea postalCode:(nullable NSString *)postalCode countryCode:(nullable NSString *)countryCode countryName:(nullable NSString *)countryName subAdministrativeArea:(nullable NSString *)subAdministrativeArea subLocality:(nullable NSString *)subLocality {
self = [self init];
if (!self) {
return nil;
@@ -30,7 +32,7 @@
}
-- (void)setCountryName:(NSString *)countryName {
+- (void)setCountryName:(nullable NSString *)countryName {
if (countryName != nil) {
store[SDLNameCountryName] = countryName;
} else {
@@ -38,11 +40,11 @@
}
}
-- (NSString *)countryName {
+- (nullable NSString *)countryName {
return store[SDLNameCountryName];
}
-- (void)setCountryCode:(NSString *)countryCode {
+- (void)setCountryCode:(nullable NSString *)countryCode {
if (countryCode != nil) {
store[SDLNameCountryCode] = countryCode;
} else {
@@ -50,11 +52,11 @@
}
}
-- (NSString *)countryCode {
+- (nullable NSString *)countryCode {
return store[SDLNameCountryCode];
}
-- (void)setPostalCode:(NSString *)postalCode {
+- (void)setPostalCode:(nullable NSString *)postalCode {
if (postalCode != nil) {
store[SDLNamePostalCode] = postalCode;
} else {
@@ -62,11 +64,11 @@
}
}
-- (NSString *)postalCode {
+- (nullable NSString *)postalCode {
return store[SDLNamePostalCode];
}
-- (void)setAdministrativeArea:(NSString *)administrativeArea {
+- (void)setAdministrativeArea:(nullable NSString *)administrativeArea {
if (administrativeArea != nil) {
store[SDLNameAdministrativeArea] = administrativeArea;
} else {
@@ -74,11 +76,11 @@
}
}
-- (NSString *)administrativeArea {
+- (nullable NSString *)administrativeArea {
return store[SDLNameAdministrativeArea];
}
-- (void)setSubAdministrativeArea:(NSString *)subAdministrativeArea {
+- (void)setSubAdministrativeArea:(nullable NSString *)subAdministrativeArea {
if (subAdministrativeArea != nil) {
store[SDLNameSubAdministrativeArea] = subAdministrativeArea;
} else {
@@ -86,11 +88,11 @@
}
}
-- (NSString *)subAdministrativeArea {
+- (nullable NSString *)subAdministrativeArea {
return store[SDLNameSubAdministrativeArea];
}
-- (void)setLocality:(NSString *)locality {
+- (void)setLocality:(nullable NSString *)locality {
if (locality != nil) {
store[SDLNameLocality] = locality;
} else {
@@ -98,11 +100,11 @@
}
}
-- (NSString *)locality {
+- (nullable NSString *)locality {
return store[SDLNameLocality];
}
-- (void)setSubLocality:(NSString *)subLocality {
+- (void)setSubLocality:(nullable NSString *)subLocality {
if (subLocality != nil) {
store[SDLNameSubLocality] = subLocality;
} else {
@@ -110,11 +112,11 @@
}
}
-- (NSString *)subLocality {
+- (nullable NSString *)subLocality {
return store[SDLNameSubLocality];
}
-- (void)setThoroughfare:(NSString *)thoroughfare {
+- (void)setThoroughfare:(nullable NSString *)thoroughfare {
if (thoroughfare != nil) {
store[SDLNameThoroughfare] = thoroughfare;
} else {
@@ -122,11 +124,11 @@
}
}
-- (NSString *)thoroughfare {
+- (nullable NSString *)thoroughfare {
return store[SDLNameThoroughfare];
}
-- (void)setSubThoroughfare:(NSString *)subThoroughfare {
+- (void)setSubThoroughfare:(nullable NSString *)subThoroughfare {
if (subThoroughfare != nil) {
store[SDLNameSubThoroughfare] = subThoroughfare;
} else {
@@ -134,8 +136,10 @@
}
}
-- (NSString *)subThoroughfare {
+- (nullable NSString *)subThoroughfare {
return store[SDLNameSubThoroughfare];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLObjectWithPriority.h b/SmartDeviceLink/SDLObjectWithPriority.h
index 49f2df71c..848773f05 100644
--- a/SmartDeviceLink/SDLObjectWithPriority.h
+++ b/SmartDeviceLink/SDLObjectWithPriority.h
@@ -5,14 +5,17 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface SDLObjectWithPriority : NSObject
-@property (strong, nonatomic) id object;
+@property (nullable, strong, nonatomic) id object;
@property (assign, nonatomic) NSInteger priority;
-- (instancetype)initWithObject:(id)object priority:(NSInteger)priority NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithObject:(nullable id)object priority:(NSInteger)priority NS_DESIGNATED_INITIALIZER;
-+ (instancetype)objectWithObject:(id)object priority:(NSInteger)priority;
++ (instancetype)objectWithObject:(nullable id)object priority:(NSInteger)priority;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLObjectWithPriority.m b/SmartDeviceLink/SDLObjectWithPriority.m
index 4dd72091e..6c8d72878 100644
--- a/SmartDeviceLink/SDLObjectWithPriority.m
+++ b/SmartDeviceLink/SDLObjectWithPriority.m
@@ -5,10 +5,11 @@
#import "SDLObjectWithPriority.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLObjectWithPriority
-- (instancetype)initWithObject:(id)object priority:(NSInteger)priority {
+- (instancetype)initWithObject:(nullable id)object priority:(NSInteger)priority {
self = [super init];
if (self == nil) {
return nil;
@@ -24,8 +25,10 @@
return [self initWithObject:nil priority:NSIntegerMax];
}
-+ (instancetype)objectWithObject:(id)object priority:(NSInteger)priority {
++ (instancetype)objectWithObject:(nullable id)object priority:(NSInteger)priority {
return [[self alloc] initWithObject:object priority:priority];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h
index 012b9c395..7e18b858a 100644
--- a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h
+++ b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.h
@@ -14,6 +14,9 @@
* @since SDL 1.0
* @see SDLRegisterAppInterface
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnAppInterfaceUnregistered : SDLRPCNotification
/**
@@ -22,3 +25,5 @@
@property (strong, nonatomic) SDLAppInterfaceUnregisteredReason reason;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m
index 60ae29be8..0f7d28871 100644
--- a/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m
+++ b/SmartDeviceLink/SDLOnAppInterfaceUnregistered.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnAppInterfaceUnregistered
- (instancetype)init {
@@ -27,3 +29,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnAudioPassThru.h b/SmartDeviceLink/SDLOnAudioPassThru.h
index 1f9c5d74b..4fc9d9e08 100644
--- a/SmartDeviceLink/SDLOnAudioPassThru.h
+++ b/SmartDeviceLink/SDLOnAudioPassThru.h
@@ -23,6 +23,11 @@
* </ul>
* </ul>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnAudioPassThru : SDLRPCNotification
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnAudioPassThru.m b/SmartDeviceLink/SDLOnAudioPassThru.m
index 72f23e5ef..72f5711b2 100644
--- a/SmartDeviceLink/SDLOnAudioPassThru.m
+++ b/SmartDeviceLink/SDLOnAudioPassThru.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnAudioPassThru
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnButtonEvent.h b/SmartDeviceLink/SDLOnButtonEvent.h
index a70438742..f4b65d95d 100644
--- a/SmartDeviceLink/SDLOnButtonEvent.h
+++ b/SmartDeviceLink/SDLOnButtonEvent.h
@@ -43,6 +43,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnButtonEvent : SDLRPCNotification
/**
@@ -62,6 +65,8 @@
*
* Optional, Integer, 0 - 65536
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *customButtonID;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *customButtonID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnButtonEvent.m b/SmartDeviceLink/SDLOnButtonEvent.m
index f3ff12291..f088857e4 100644
--- a/SmartDeviceLink/SDLOnButtonEvent.m
+++ b/SmartDeviceLink/SDLOnButtonEvent.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnButtonEvent
- (instancetype)init {
@@ -39,7 +41,7 @@
return (SDLButtonEventMode)obj;
}
-- (void)setCustomButtonID:(NSNumber<SDLInt> *)customButtonID {
+- (void)setCustomButtonID:(nullable NSNumber<SDLInt> *)customButtonID {
if (customButtonID != nil) {
[parameters setObject:customButtonID forKey:SDLNameCustomButtonId];
} else {
@@ -47,8 +49,10 @@
}
}
-- (NSNumber<SDLInt> *)customButtonID {
+- (nullable NSNumber<SDLInt> *)customButtonID {
return [parameters objectForKey:SDLNameCustomButtonId];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnButtonPress.h b/SmartDeviceLink/SDLOnButtonPress.h
index d18c2a81c..1c8381114 100644
--- a/SmartDeviceLink/SDLOnButtonPress.h
+++ b/SmartDeviceLink/SDLOnButtonPress.h
@@ -48,6 +48,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnButtonPress : SDLRPCNotification
/**
@@ -75,6 +78,8 @@
*
* Optional, Integer 0 - 65536
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *customButtonID;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *customButtonID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnButtonPress.m b/SmartDeviceLink/SDLOnButtonPress.m
index 4cea2a77a..8635ee7d3 100644
--- a/SmartDeviceLink/SDLOnButtonPress.m
+++ b/SmartDeviceLink/SDLOnButtonPress.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnButtonPress
- (instancetype)init {
@@ -39,7 +41,7 @@
return (SDLButtonPressMode)obj;
}
-- (void)setCustomButtonID:(NSNumber<SDLInt> *)customButtonID {
+- (void)setCustomButtonID:(nullable NSNumber<SDLInt> *)customButtonID {
if (customButtonID != nil) {
[parameters setObject:customButtonID forKey:SDLNameCustomButtonId];
} else {
@@ -47,8 +49,10 @@
}
}
-- (NSNumber<SDLInt> *)customButtonID {
+- (nullable NSNumber<SDLInt> *)customButtonID {
return [parameters objectForKey:SDLNameCustomButtonId];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnCommand.h b/SmartDeviceLink/SDLOnCommand.h
index 566a6d84a..0b685a486 100644
--- a/SmartDeviceLink/SDLOnCommand.h
+++ b/SmartDeviceLink/SDLOnCommand.h
@@ -14,6 +14,9 @@
* @since SDL 1.0
* @see SDLAddCommand SDLDeleteCommand SDLDeleteSubMenu
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnCommand : SDLRPCNotification
/**
@@ -27,3 +30,5 @@
@property (strong, nonatomic) SDLTriggerSource triggerSource;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnCommand.m b/SmartDeviceLink/SDLOnCommand.m
index ee9e729a9..180294bfc 100644
--- a/SmartDeviceLink/SDLOnCommand.m
+++ b/SmartDeviceLink/SDLOnCommand.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnCommand
- (instancetype)init {
@@ -39,3 +41,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnDriverDistraction.h b/SmartDeviceLink/SDLOnDriverDistraction.h
index 573753580..7a0b4e163 100644
--- a/SmartDeviceLink/SDLOnDriverDistraction.h
+++ b/SmartDeviceLink/SDLOnDriverDistraction.h
@@ -22,6 +22,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnDriverDistraction : SDLRPCNotification
/**
@@ -30,3 +33,5 @@
@property (strong, nonatomic) SDLDriverDistractionState state;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnDriverDistraction.m b/SmartDeviceLink/SDLOnDriverDistraction.m
index bd366dd50..31f86fd96 100644
--- a/SmartDeviceLink/SDLOnDriverDistraction.m
+++ b/SmartDeviceLink/SDLOnDriverDistraction.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
#import "SDLDriverDistractionState.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnDriverDistraction
- (instancetype)init {
@@ -28,3 +30,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnEncodedSyncPData.h b/SmartDeviceLink/SDLOnEncodedSyncPData.h
index 334f53c07..9bcbdae45 100644
--- a/SmartDeviceLink/SDLOnEncodedSyncPData.h
+++ b/SmartDeviceLink/SDLOnEncodedSyncPData.h
@@ -3,11 +3,14 @@
#import "SDLRPCNotification.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLOnEncodedSyncPData : SDLRPCNotification
@property (strong, nonatomic) NSMutableArray<NSString *> *data;
-@property (strong, nonatomic) NSString *URL;
-@property (strong, nonatomic) NSNumber<SDLInt> *Timeout;
+@property (nullable, strong, nonatomic) NSString *URL;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *Timeout;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnEncodedSyncPData.m b/SmartDeviceLink/SDLOnEncodedSyncPData.m
index ab2edfe63..b83f8408a 100644
--- a/SmartDeviceLink/SDLOnEncodedSyncPData.m
+++ b/SmartDeviceLink/SDLOnEncodedSyncPData.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnEncodedSyncPData
- (instancetype)init {
@@ -25,7 +27,7 @@
return [parameters objectForKey:SDLNameData];
}
-- (void)setURL:(NSString *)URL {
+- (void)setURL:(nullable NSString *)URL {
if (URL != nil) {
[parameters setObject:URL forKey:SDLNameURLUppercase];
} else {
@@ -33,11 +35,11 @@
}
}
-- (NSString *)URL {
+- (nullable NSString *)URL {
return [parameters objectForKey:SDLNameURLUppercase];
}
-- (void)setTimeout:(NSNumber<SDLInt> *)Timeout {
+- (void)setTimeout:(nullable NSNumber<SDLInt> *)Timeout {
if (Timeout != nil) {
[parameters setObject:Timeout forKey:SDLNameTimeoutCapitalized];
} else {
@@ -45,8 +47,10 @@
}
}
-- (NSNumber<SDLInt> *)Timeout {
+- (nullable NSNumber<SDLInt> *)Timeout {
return [parameters objectForKey:SDLNameTimeoutCapitalized];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnHMIStatus.h b/SmartDeviceLink/SDLOnHMIStatus.h
index a948e2258..10ae21948 100644
--- a/SmartDeviceLink/SDLOnHMIStatus.h
+++ b/SmartDeviceLink/SDLOnHMIStatus.h
@@ -22,6 +22,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnHMIStatus : SDLRPCNotification
/**
@@ -43,3 +46,5 @@
@property (strong, nonatomic) SDLSystemContext systemContext;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnHMIStatus.m b/SmartDeviceLink/SDLOnHMIStatus.m
index f95c63a5b..bccd5a937 100644
--- a/SmartDeviceLink/SDLOnHMIStatus.m
+++ b/SmartDeviceLink/SDLOnHMIStatus.m
@@ -8,6 +8,8 @@
#import "SDLNames.h"
#import "SDLSystemContext.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnHMIStatus
- (instancetype)init {
@@ -56,3 +58,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnHashChange.h b/SmartDeviceLink/SDLOnHashChange.h
index fbdb108d4..59dd0f0d0 100644
--- a/SmartDeviceLink/SDLOnHashChange.h
+++ b/SmartDeviceLink/SDLOnHashChange.h
@@ -4,8 +4,12 @@
#import "SDLRPCNotification.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnHashChange : SDLRPCNotification
@property (strong, nonatomic) NSString *hashID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnHashChange.m b/SmartDeviceLink/SDLOnHashChange.m
index a89fb23a2..6159e58e5 100644
--- a/SmartDeviceLink/SDLOnHashChange.m
+++ b/SmartDeviceLink/SDLOnHashChange.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnHashChange
- (instancetype)init {
@@ -27,3 +29,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnKeyboardInput.h b/SmartDeviceLink/SDLOnKeyboardInput.h
index 47ec78c6d..38c4989ef 100644
--- a/SmartDeviceLink/SDLOnKeyboardInput.h
+++ b/SmartDeviceLink/SDLOnKeyboardInput.h
@@ -5,10 +5,13 @@
#import "SDLKeyboardEvent.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLOnKeyboardInput : SDLRPCNotification
@property (strong, nonatomic) SDLKeyboardEvent event;
-@property (strong, nonatomic) NSString *data;
+@property (nullable, strong, nonatomic) NSString *data;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnKeyboardInput.m b/SmartDeviceLink/SDLOnKeyboardInput.m
index 16848f5b7..7fa95770b 100644
--- a/SmartDeviceLink/SDLOnKeyboardInput.m
+++ b/SmartDeviceLink/SDLOnKeyboardInput.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnKeyboardInput
- (instancetype)init {
@@ -26,7 +28,7 @@
return (SDLKeyboardEvent)obj;
}
-- (void)setData:(NSString *)data {
+- (void)setData:(nullable NSString *)data {
if (data != nil) {
[parameters setObject:data forKey:SDLNameData];
} else {
@@ -34,8 +36,10 @@
}
}
-- (NSString *)data {
+- (nullable NSString *)data {
return [parameters objectForKey:SDLNameData];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnLanguageChange.h b/SmartDeviceLink/SDLOnLanguageChange.h
index 6809f34ad..4937c70fd 100644
--- a/SmartDeviceLink/SDLOnLanguageChange.h
+++ b/SmartDeviceLink/SDLOnLanguageChange.h
@@ -11,6 +11,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnLanguageChange : SDLRPCNotification
/**
@@ -24,3 +27,5 @@
@property (strong, nonatomic) SDLLanguage hmiDisplayLanguage;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnLanguageChange.m b/SmartDeviceLink/SDLOnLanguageChange.m
index 12e287fe8..324e4f424 100644
--- a/SmartDeviceLink/SDLOnLanguageChange.m
+++ b/SmartDeviceLink/SDLOnLanguageChange.m
@@ -6,6 +6,8 @@
#import "SDLLanguage.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnLanguageChange
- (instancetype)init {
@@ -42,3 +44,5 @@
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnLockScreenStatus.h b/SmartDeviceLink/SDLOnLockScreenStatus.h
index 186868afb..830cd223f 100644
--- a/SmartDeviceLink/SDLOnLockScreenStatus.h
+++ b/SmartDeviceLink/SDLOnLockScreenStatus.h
@@ -17,6 +17,9 @@
* For simplicity, the OnLockScreenStatus RPC will be provided via the onOnLockScreenNotification call back. The call back will include the LockScreenStatus enum which indicates if the lockscreen is required, optional or not required.
* The call back also includes details regarding the current HMI_Status level, driver distraction status and user selection status of the application.
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnLockScreenStatus : SDLRPCNotification
/**
@@ -42,3 +45,5 @@
@property (strong, nonatomic) SDLHMILevel hmiLevel;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnLockScreenStatus.m b/SmartDeviceLink/SDLOnLockScreenStatus.m
index 437cee85c..fdd36d7d2 100644
--- a/SmartDeviceLink/SDLOnLockScreenStatus.m
+++ b/SmartDeviceLink/SDLOnLockScreenStatus.m
@@ -8,6 +8,7 @@
#import "SDLHMILevel.h"
#import "SDLLockScreenStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLOnLockScreenStatus
@@ -68,3 +69,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnPermissionsChange.h b/SmartDeviceLink/SDLOnPermissionsChange.h
index d63bfd3cc..daec5ec66 100644
--- a/SmartDeviceLink/SDLOnPermissionsChange.h
+++ b/SmartDeviceLink/SDLOnPermissionsChange.h
@@ -10,6 +10,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnPermissionsChange : SDLRPCNotification
/**
@@ -22,3 +25,5 @@
@property (strong, nonatomic) NSMutableArray<SDLPermissionItem *> *permissionItem;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnPermissionsChange.m b/SmartDeviceLink/SDLOnPermissionsChange.m
index 81a025614..0dc7eac20 100644
--- a/SmartDeviceLink/SDLOnPermissionsChange.m
+++ b/SmartDeviceLink/SDLOnPermissionsChange.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
#import "SDLPermissionItem.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnPermissionsChange
- (instancetype)init {
@@ -36,3 +38,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnSyncPData.h b/SmartDeviceLink/SDLOnSyncPData.h
index 9902d5e6f..cf2e1af13 100644
--- a/SmartDeviceLink/SDLOnSyncPData.h
+++ b/SmartDeviceLink/SDLOnSyncPData.h
@@ -4,9 +4,13 @@
#import "SDLRPCNotification.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnSyncPData : SDLRPCNotification
-@property (strong, nonatomic) NSString *URL;
-@property (strong, nonatomic) NSNumber<SDLInt> *Timeout;
+@property (nullable, strong, nonatomic) NSString *URL;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *Timeout;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnSyncPData.m b/SmartDeviceLink/SDLOnSyncPData.m
index bde0b3ff5..0719ad955 100644
--- a/SmartDeviceLink/SDLOnSyncPData.m
+++ b/SmartDeviceLink/SDLOnSyncPData.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnSyncPData
- (instancetype)init {
@@ -14,7 +16,7 @@
return self;
}
-- (void)setURL:(NSString *)URL {
+- (void)setURL:(nullable NSString *)URL {
if (URL != nil) {
[parameters setObject:URL forKey:SDLNameURLUppercase];
} else {
@@ -22,11 +24,11 @@
}
}
-- (NSString *)URL {
+- (nullable NSString *)URL {
return [parameters objectForKey:SDLNameURLUppercase];
}
-- (void)setTimeout:(NSNumber<SDLInt> *)Timeout {
+- (void)setTimeout:(nullable NSNumber<SDLInt> *)Timeout {
if (Timeout != nil) {
[parameters setObject:Timeout forKey:SDLNameTimeoutCapitalized];
} else {
@@ -34,8 +36,10 @@
}
}
-- (NSNumber<SDLInt> *)Timeout {
+- (nullable NSNumber<SDLInt> *)Timeout {
return [parameters objectForKey:SDLNameTimeoutCapitalized];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnSystemRequest.h b/SmartDeviceLink/SDLOnSystemRequest.h
index 008020d10..236cde278 100644
--- a/SmartDeviceLink/SDLOnSystemRequest.h
+++ b/SmartDeviceLink/SDLOnSystemRequest.h
@@ -6,14 +6,17 @@
#import "SDLFileType.h"
#import "SDLRequestType.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLOnSystemRequest : SDLRPCNotification
@property (strong, nonatomic) SDLRequestType requestType;
-@property (strong, nonatomic) NSString *url;
-@property (strong, nonatomic) NSNumber<SDLInt> *timeout;
-@property (strong, nonatomic) SDLFileType fileType;
-@property (strong, nonatomic) NSNumber<SDLUInt> *offset;
-@property (strong, nonatomic) NSNumber<SDLUInt> *length;
+@property (nullable, strong, nonatomic) NSString *url;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *timeout;
+@property (nullable, strong, nonatomic) SDLFileType fileType;
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *offset;
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *length;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnSystemRequest.m b/SmartDeviceLink/SDLOnSystemRequest.m
index 8e91fcd5d..298b531c5 100644
--- a/SmartDeviceLink/SDLOnSystemRequest.m
+++ b/SmartDeviceLink/SDLOnSystemRequest.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnSystemRequest
- (instancetype)init {
@@ -26,7 +28,7 @@
return (SDLRequestType)obj;
}
-- (void)setUrl:(NSString *)url {
+- (void)setUrl:(nullable NSString *)url {
if (url != nil) {
[parameters setObject:url forKey:SDLNameURL];
} else {
@@ -34,11 +36,11 @@
}
}
-- (NSString *)url {
+- (nullable NSString *)url {
return [parameters objectForKey:SDLNameURL];
}
-- (void)setTimeout:(NSNumber<SDLInt> *)timeout {
+- (void)setTimeout:(nullable NSNumber<SDLInt> *)timeout {
if (timeout != nil) {
[parameters setObject:timeout forKey:SDLNameTimeout];
} else {
@@ -46,11 +48,11 @@
}
}
-- (NSNumber<SDLInt> *)timeout {
+- (nullable NSNumber<SDLInt> *)timeout {
return [parameters objectForKey:SDLNameTimeout];
}
-- (void)setFileType:(SDLFileType)fileType {
+- (void)setFileType:(nullable SDLFileType)fileType {
if (fileType != nil) {
[parameters setObject:fileType forKey:SDLNameFileType];
} else {
@@ -58,12 +60,12 @@
}
}
-- (SDLFileType)fileType {
+- (nullable SDLFileType)fileType {
NSObject *obj = [parameters objectForKey:SDLNameFileType];
return (SDLFileType)obj;
}
-- (void)setOffset:(NSNumber<SDLInt> *)offset {
+- (void)setOffset:(nullable NSNumber<SDLInt> *)offset {
if (offset != nil) {
[parameters setObject:offset forKey:SDLNameOffset];
} else {
@@ -71,11 +73,11 @@
}
}
-- (NSNumber<SDLInt> *)offset {
+- (nullable NSNumber<SDLInt> *)offset {
return [parameters objectForKey:SDLNameOffset];
}
-- (void)setLength:(NSNumber<SDLInt> *)length {
+- (void)setLength:(nullable NSNumber<SDLInt> *)length {
if (length != nil) {
[parameters setObject:length forKey:SDLNameLength];
} else {
@@ -83,8 +85,10 @@
}
}
-- (NSNumber<SDLInt> *)length {
+- (nullable NSNumber<SDLInt> *)length {
return [parameters objectForKey:SDLNameLength];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnTBTClientState.h b/SmartDeviceLink/SDLOnTBTClientState.h
index 7a3534fa1..33e9c37be 100644
--- a/SmartDeviceLink/SDLOnTBTClientState.h
+++ b/SmartDeviceLink/SDLOnTBTClientState.h
@@ -5,8 +5,12 @@
#import "SDLTBTState.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnTBTClientState : SDLRPCNotification
@property (strong, nonatomic) SDLTBTState state;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnTBTClientState.m b/SmartDeviceLink/SDLOnTBTClientState.m
index 5fe83a23c..5a6408fdd 100644
--- a/SmartDeviceLink/SDLOnTBTClientState.m
+++ b/SmartDeviceLink/SDLOnTBTClientState.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnTBTClientState
- (instancetype)init {
@@ -27,3 +29,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnTouchEvent.h b/SmartDeviceLink/SDLOnTouchEvent.h
index 8b9e52315..21b3e1c5b 100644
--- a/SmartDeviceLink/SDLOnTouchEvent.h
+++ b/SmartDeviceLink/SDLOnTouchEvent.h
@@ -7,9 +7,13 @@
@class SDLTouchEvent;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnTouchEvent : SDLRPCNotification
@property (strong, nonatomic) SDLTouchType type;
@property (strong, nonatomic) NSMutableArray<SDLTouchEvent *> *event;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnTouchEvent.m b/SmartDeviceLink/SDLOnTouchEvent.m
index a05291f29..cf69803e4 100644
--- a/SmartDeviceLink/SDLOnTouchEvent.m
+++ b/SmartDeviceLink/SDLOnTouchEvent.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
#import "SDLTouchEvent.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnTouchEvent
- (instancetype)init {
@@ -49,3 +51,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnVehicleData.h b/SmartDeviceLink/SDLOnVehicleData.h
index 4fb8d3dee..6a8c4af78 100644
--- a/SmartDeviceLink/SDLOnVehicleData.h
+++ b/SmartDeviceLink/SDLOnVehicleData.h
@@ -26,112 +26,117 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnVehicleData : SDLRPCNotification
/**
* @abstract A SDLGPSData* value. See GPSData.
*/
-@property (strong, nonatomic) SDLGPSData *gps;
+@property (nullable, strong, nonatomic) SDLGPSData *gps;
/**
* @abstract The vehicle speed in kilometers per hour.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *speed;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *speed;
/**
* @abstract The number of revolutions per minute of the engine.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *rpm;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *rpm;
/**
* @abstract The fuel level in the tank (percentage)
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *fuelLevel;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *fuelLevel;
/**
* @abstract A SDLComponentVolumeStatus* value. The fuel level state.
*/
-@property (strong, nonatomic) SDLComponentVolumeStatus fuelLevel_State;
+@property (nullable, strong, nonatomic) SDLComponentVolumeStatus fuelLevel_State;
/**
* @abstract The instantaneous fuel consumption in microlitres.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *instantFuelConsumption;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *instantFuelConsumption;
/**
* @abstract The external temperature in degrees celsius.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *externalTemperature;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *externalTemperature;
/**
* @abstract The Vehicle Identification Number
*/
-@property (strong, nonatomic) NSString *vin;
+@property (nullable, strong, nonatomic) NSString *vin;
/**
* @abstract See PRNDL.
*/
-@property (strong, nonatomic) SDLPRNDL prndl;
+@property (nullable, strong, nonatomic) SDLPRNDL prndl;
/**
* @abstract A SDLTireStatus* value. See TireStatus.
*/
-@property (strong, nonatomic) SDLTireStatus *tirePressure;
+@property (nullable, strong, nonatomic) SDLTireStatus *tirePressure;
/**
* @abstract Odometer reading in km.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *odometer;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *odometer;
/**
* @abstract A SDLBeltStatus* value. The status of the seat belts.
*/
-@property (strong, nonatomic) SDLBeltStatus *beltStatus;
+@property (nullable, strong, nonatomic) SDLBeltStatus *beltStatus;
/**
* @abstract A SDLBodyInformation* value. The body information including power modes.
*/
-@property (strong, nonatomic) SDLBodyInformation *bodyInformation;
+@property (nullable, strong, nonatomic) SDLBodyInformation *bodyInformation;
/**
* @abstract A SDLDeviceStatus* value. The device status including signal and battery strength.
*/
-@property (strong, nonatomic) SDLDeviceStatus *deviceStatus;
+@property (nullable, strong, nonatomic) SDLDeviceStatus *deviceStatus;
/**
* @abstract A SDLVehicleDataResult* value. The status of the brake pedal.
*/
-@property (strong, nonatomic) SDLVehicleDataEventStatus driverBraking;
+@property (nullable, strong, nonatomic) SDLVehicleDataEventStatus driverBraking;
/**
* @abstract A SDLWiperStatus* value. The status of the wipers.
*/
-@property (strong, nonatomic) SDLWiperStatus wiperStatus;
+@property (nullable, strong, nonatomic) SDLWiperStatus wiperStatus;
/**
* @abstract A SDLHeadLampStatus* value. Status of the head lamps.
*/
-@property (strong, nonatomic) SDLHeadLampStatus *headLampStatus;
+@property (nullable, strong, nonatomic) SDLHeadLampStatus *headLampStatus;
/**
* @abstract Torque value for engine (in Nm) on non-diesel variants.
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *engineTorque;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *engineTorque;
/**
* @abstract Accelerator pedal position (percentage depressed)
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *accPedalPosition;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *accPedalPosition;
/**
* @abstract Current angle of the steering wheel (in deg)
*/
-@property (strong, nonatomic) NSNumber<SDLFloat> *steeringWheelAngle;
-@property (strong, nonatomic) SDLECallInfo *eCallInfo;
-@property (strong, nonatomic) SDLAirbagStatus *airbagStatus;
-@property (strong, nonatomic) SDLEmergencyEvent *emergencyEvent;
-@property (strong, nonatomic) SDLClusterModeStatus *clusterModeStatus;
-@property (strong, nonatomic) SDLMyKey *myKey;
+@property (nullable, strong, nonatomic) NSNumber<SDLFloat> *steeringWheelAngle;
+@property (nullable, strong, nonatomic) SDLECallInfo *eCallInfo;
+@property (nullable, strong, nonatomic) SDLAirbagStatus *airbagStatus;
+@property (nullable, strong, nonatomic) SDLEmergencyEvent *emergencyEvent;
+@property (nullable, strong, nonatomic) SDLClusterModeStatus *clusterModeStatus;
+@property (nullable, strong, nonatomic) SDLMyKey *myKey;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnVehicleData.m b/SmartDeviceLink/SDLOnVehicleData.m
index 9d750efbd..4d7b0ef82 100644
--- a/SmartDeviceLink/SDLOnVehicleData.m
+++ b/SmartDeviceLink/SDLOnVehicleData.m
@@ -16,6 +16,7 @@
#import "SDLNames.h"
#import "SDLTireStatus.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLOnVehicleData
@@ -25,7 +26,7 @@
return self;
}
-- (void)setGps:(SDLGPSData *)gps {
+- (void)setGps:(nullable SDLGPSData *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -33,16 +34,16 @@
}
}
-- (SDLGPSData *)gps {
+- (nullable SDLGPSData *)gps {
NSObject *obj = [parameters objectForKey:SDLNameGPS];
- if (obj == nil || [obj isKindOfClass:SDLGPSData.class]) {
- return (SDLGPSData *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLGPSData alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLGPSData*)obj;
}
-- (void)setSpeed:(NSNumber<SDLFloat> *)speed {
+- (void)setSpeed:(nullable NSNumber<SDLFloat> *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -50,11 +51,11 @@
}
}
-- (NSNumber<SDLFloat> *)speed {
+- (nullable NSNumber<SDLFloat> *)speed {
return [parameters objectForKey:SDLNameSpeed];
}
-- (void)setRpm:(NSNumber<SDLInt> *)rpm {
+- (void)setRpm:(nullable NSNumber<SDLInt> *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -62,11 +63,11 @@
}
}
-- (NSNumber<SDLInt> *)rpm {
+- (nullable NSNumber<SDLInt> *)rpm {
return [parameters objectForKey:SDLNameRPM];
}
-- (void)setFuelLevel:(NSNumber<SDLFloat> *)fuelLevel {
+- (void)setFuelLevel:(nullable NSNumber<SDLFloat> *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -74,11 +75,11 @@
}
}
-- (NSNumber<SDLFloat> *)fuelLevel {
+- (nullable NSNumber<SDLFloat> *)fuelLevel {
return [parameters objectForKey:SDLNameFuelLevel];
}
-- (void)setFuelLevel_State:(SDLComponentVolumeStatus)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable SDLComponentVolumeStatus)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -86,12 +87,12 @@
}
}
-- (SDLComponentVolumeStatus)fuelLevel_State {
+- (nullable SDLComponentVolumeStatus)fuelLevel_State {
NSObject *obj = [parameters objectForKey:SDLNameFuelLevelState];
return (SDLComponentVolumeStatus)obj;
}
-- (void)setInstantFuelConsumption:(NSNumber<SDLFloat> *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable NSNumber<SDLFloat> *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -99,11 +100,11 @@
}
}
-- (NSNumber<SDLFloat> *)instantFuelConsumption {
+- (nullable NSNumber<SDLFloat> *)instantFuelConsumption {
return [parameters objectForKey:SDLNameInstantFuelConsumption];
}
-- (void)setExternalTemperature:(NSNumber<SDLFloat> *)externalTemperature {
+- (void)setExternalTemperature:(nullable NSNumber<SDLFloat> *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -111,11 +112,11 @@
}
}
-- (NSNumber<SDLFloat> *)externalTemperature {
+- (nullable NSNumber<SDLFloat> *)externalTemperature {
return [parameters objectForKey:SDLNameExternalTemperature];
}
-- (void)setVin:(NSString *)vin {
+- (void)setVin:(nullable NSString *)vin {
if (vin != nil) {
[parameters setObject:vin forKey:SDLNameVIN];
} else {
@@ -123,11 +124,11 @@
}
}
-- (NSString *)vin {
+- (nullable NSString *)vin {
return [parameters objectForKey:SDLNameVIN];
}
-- (void)setPrndl:(SDLPRNDL)prndl {
+- (void)setPrndl:(nullable SDLPRNDL)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -135,12 +136,12 @@
}
}
-- (SDLPRNDL)prndl {
+- (nullable SDLPRNDL)prndl {
NSObject *obj = [parameters objectForKey:SDLNamePRNDL];
return (SDLPRNDL)obj;
}
-- (void)setTirePressure:(SDLTireStatus *)tirePressure {
+- (void)setTirePressure:(nullable SDLTireStatus *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -148,16 +149,16 @@
}
}
-- (SDLTireStatus *)tirePressure {
+- (nullable SDLTireStatus *)tirePressure {
NSObject *obj = [parameters objectForKey:SDLNameTirePressure];
- if (obj == nil || [obj isKindOfClass:SDLTireStatus.class]) {
- return (SDLTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLTireStatus*)obj;
}
-- (void)setOdometer:(NSNumber<SDLInt> *)odometer {
+- (void)setOdometer:(nullable NSNumber<SDLInt> *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -165,11 +166,11 @@
}
}
-- (NSNumber<SDLInt> *)odometer {
+- (nullable NSNumber<SDLInt> *)odometer {
return [parameters objectForKey:SDLNameOdometer];
}
-- (void)setBeltStatus:(SDLBeltStatus *)beltStatus {
+- (void)setBeltStatus:(nullable SDLBeltStatus *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -177,16 +178,16 @@
}
}
-- (SDLBeltStatus *)beltStatus {
+- (nullable SDLBeltStatus *)beltStatus {
NSObject *obj = [parameters objectForKey:SDLNameBeltStatus];
- if (obj == nil || [obj isKindOfClass:SDLBeltStatus.class]) {
- return (SDLBeltStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLBeltStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLBeltStatus*)obj;
}
-- (void)setBodyInformation:(SDLBodyInformation *)bodyInformation {
+- (void)setBodyInformation:(nullable SDLBodyInformation *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -194,16 +195,16 @@
}
}
-- (SDLBodyInformation *)bodyInformation {
+- (nullable SDLBodyInformation *)bodyInformation {
NSObject *obj = [parameters objectForKey:SDLNameBodyInformation];
- if (obj == nil || [obj isKindOfClass:SDLBodyInformation.class]) {
- return (SDLBodyInformation *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLBodyInformation alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLBodyInformation*)obj;
}
-- (void)setDeviceStatus:(SDLDeviceStatus *)deviceStatus {
+- (void)setDeviceStatus:(nullable SDLDeviceStatus *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -211,16 +212,16 @@
}
}
-- (SDLDeviceStatus *)deviceStatus {
+- (nullable SDLDeviceStatus *)deviceStatus {
NSObject *obj = [parameters objectForKey:SDLNameDeviceStatus];
- if (obj == nil || [obj isKindOfClass:SDLDeviceStatus.class]) {
- return (SDLDeviceStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLDeviceStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLDeviceStatus*)obj;
}
-- (void)setDriverBraking:(SDLVehicleDataEventStatus)driverBraking {
+- (void)setDriverBraking:(nullable SDLVehicleDataEventStatus)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -228,12 +229,12 @@
}
}
-- (SDLVehicleDataEventStatus)driverBraking {
+- (nullable SDLVehicleDataEventStatus)driverBraking {
NSObject *obj = [parameters objectForKey:SDLNameDriverBraking];
return (SDLVehicleDataEventStatus)obj;
}
-- (void)setWiperStatus:(SDLWiperStatus)wiperStatus {
+- (void)setWiperStatus:(nullable SDLWiperStatus)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -241,12 +242,12 @@
}
}
-- (SDLWiperStatus)wiperStatus {
+- (nullable SDLWiperStatus)wiperStatus {
NSObject *obj = [parameters objectForKey:SDLNameWiperStatus];
return (SDLWiperStatus)obj;
}
-- (void)setHeadLampStatus:(SDLHeadLampStatus *)headLampStatus {
+- (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -254,16 +255,16 @@
}
}
-- (SDLHeadLampStatus *)headLampStatus {
+- (nullable SDLHeadLampStatus *)headLampStatus {
NSObject *obj = [parameters objectForKey:SDLNameHeadLampStatus];
- if (obj == nil || [obj isKindOfClass:SDLHeadLampStatus.class]) {
- return (SDLHeadLampStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLHeadLampStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLHeadLampStatus*)obj;
}
-- (void)setEngineTorque:(NSNumber<SDLFloat> *)engineTorque {
+- (void)setEngineTorque:(nullable NSNumber<SDLFloat> *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -271,11 +272,11 @@
}
}
-- (NSNumber<SDLFloat> *)engineTorque {
+- (nullable NSNumber<SDLFloat> *)engineTorque {
return [parameters objectForKey:SDLNameEngineTorque];
}
-- (void)setAccPedalPosition:(NSNumber<SDLFloat> *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable NSNumber<SDLFloat> *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -283,11 +284,11 @@
}
}
-- (NSNumber<SDLFloat> *)accPedalPosition {
+- (nullable NSNumber<SDLFloat> *)accPedalPosition {
return [parameters objectForKey:SDLNameAccelerationPedalPosition];
}
-- (void)setSteeringWheelAngle:(NSNumber<SDLFloat> *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable NSNumber<SDLFloat> *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -295,11 +296,11 @@
}
}
-- (NSNumber<SDLFloat> *)steeringWheelAngle {
+- (nullable NSNumber<SDLFloat> *)steeringWheelAngle {
return [parameters objectForKey:SDLNameSteeringWheelAngle];
}
-- (void)setECallInfo:(SDLECallInfo *)eCallInfo {
+- (void)setECallInfo:(nullable SDLECallInfo *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -307,16 +308,16 @@
}
}
-- (SDLECallInfo *)eCallInfo {
+- (nullable SDLECallInfo *)eCallInfo {
NSObject *obj = [parameters objectForKey:SDLNameECallInfo];
- if (obj == nil || [obj isKindOfClass:SDLECallInfo.class]) {
- return (SDLECallInfo *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLECallInfo alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLECallInfo*)obj;
}
-- (void)setAirbagStatus:(SDLAirbagStatus *)airbagStatus {
+- (void)setAirbagStatus:(nullable SDLAirbagStatus *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -324,16 +325,16 @@
}
}
-- (SDLAirbagStatus *)airbagStatus {
+- (nullable SDLAirbagStatus *)airbagStatus {
NSObject *obj = [parameters objectForKey:SDLNameAirbagStatus];
- if (obj == nil || [obj isKindOfClass:SDLAirbagStatus.class]) {
- return (SDLAirbagStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLAirbagStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLAirbagStatus*)obj;
}
-- (void)setEmergencyEvent:(SDLEmergencyEvent *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -341,16 +342,16 @@
}
}
-- (SDLEmergencyEvent *)emergencyEvent {
+- (nullable SDLEmergencyEvent *)emergencyEvent {
NSObject *obj = [parameters objectForKey:SDLNameEmergencyEvent];
- if (obj == nil || [obj isKindOfClass:SDLEmergencyEvent.class]) {
- return (SDLEmergencyEvent *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLEmergencyEvent alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLEmergencyEvent*)obj;
}
-- (void)setClusterModeStatus:(SDLClusterModeStatus *)clusterModeStatus {
+- (void)setClusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus {
if (clusterModeStatus != nil) {
[parameters setObject:clusterModeStatus forKey:SDLNameClusterModeStatus];
} else {
@@ -358,16 +359,16 @@
}
}
-- (SDLClusterModeStatus *)clusterModeStatus {
+- (nullable SDLClusterModeStatus *)clusterModeStatus {
NSObject *obj = [parameters objectForKey:SDLNameClusterModeStatus];
- if (obj == nil || [obj isKindOfClass:SDLClusterModeStatus.class]) {
- return (SDLClusterModeStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLClusterModeStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLClusterModeStatus*)obj;
}
-- (void)setMyKey:(SDLMyKey *)myKey {
+- (void)setMyKey:(nullable SDLMyKey *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -375,13 +376,15 @@
}
}
-- (SDLMyKey *)myKey {
+- (nullable SDLMyKey *)myKey {
NSObject *obj = [parameters objectForKey:SDLNameMyKey];
- if (obj == nil || [obj isKindOfClass:SDLMyKey.class]) {
- return (SDLMyKey *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLMyKey alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLMyKey*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnWaypointChange.h b/SmartDeviceLink/SDLOnWaypointChange.h
index 58b5fca81..7e96eae5c 100644
--- a/SmartDeviceLink/SDLOnWaypointChange.h
+++ b/SmartDeviceLink/SDLOnWaypointChange.h
@@ -5,6 +5,8 @@
@class SDLLocationDetails;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLOnWayPointChange : SDLRPCNotification
/**
@@ -18,4 +20,6 @@
__deprecated_msg("Use SDLOnWayPointChange instead")
@interface SDLOnWaypointChange : SDLOnWayPointChange
- @end
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLOnWaypointChange.m b/SmartDeviceLink/SDLOnWaypointChange.m
index 9a744b030..6cca2df2a 100644
--- a/SmartDeviceLink/SDLOnWaypointChange.m
+++ b/SmartDeviceLink/SDLOnWaypointChange.m
@@ -6,6 +6,8 @@
#import "SDLLocationDetails.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLOnWayPointChange
- (instancetype)init {
@@ -40,3 +42,5 @@
@implementation SDLOnWaypointChange
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLParameterPermissions.h b/SmartDeviceLink/SDLParameterPermissions.h
index 8eed1a28e..c2356665a 100644
--- a/SmartDeviceLink/SDLParameterPermissions.h
+++ b/SmartDeviceLink/SDLParameterPermissions.h
@@ -9,6 +9,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLParameterPermissions : SDLRPCStruct
/**
@@ -25,3 +28,5 @@
@property (strong, nonatomic) NSMutableArray<NSString *> *userDisallowed;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLParameterPermissions.m b/SmartDeviceLink/SDLParameterPermissions.m
index d9b5043f1..fc4655d67 100644
--- a/SmartDeviceLink/SDLParameterPermissions.m
+++ b/SmartDeviceLink/SDLParameterPermissions.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLParameterPermissions
- (void)setAllowed:(NSMutableArray<NSString *> *)allowed {
@@ -33,3 +35,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformAudioPassThru.h b/SmartDeviceLink/SDLPerformAudioPassThru.h
index 9ab35e61d..a48a44cbb 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, nonatomic) NSMutableArray<SDLTTSChunk *> *initialPrompt;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *audioPassThruDisplayText1;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *audioPassThruDisplayText2;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLBool> *muteAudio;
+@property (nullable, strong, nonatomic) 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/SDLPerformAudioPassThruResponse.h b/SmartDeviceLink/SDLPerformAudioPassThruResponse.h
index c187f0c78..853a566bc 100644
--- a/SmartDeviceLink/SDLPerformAudioPassThruResponse.h
+++ b/SmartDeviceLink/SDLPerformAudioPassThruResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPerformAudioPassThruResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformAudioPassThruResponse.m b/SmartDeviceLink/SDLPerformAudioPassThruResponse.m
index 386b91c50..dec6fbd88 100644
--- a/SmartDeviceLink/SDLPerformAudioPassThruResponse.m
+++ b/SmartDeviceLink/SDLPerformAudioPassThruResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPerformAudioPassThruResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink/SDLPerformInteraction.h
index 2baa9146a..4c61a9fd4 100644
--- a/SmartDeviceLink/SDLPerformInteraction.h
+++ b/SmartDeviceLink/SDLPerformInteraction.h
@@ -25,23 +25,26 @@
* Since SmartDeviceLink 1.0<br/>
* See SDLCreateInteractionChoiceSet SDLDeleteInteractionChoiceSet
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPerformInteraction : SDLRPCRequest
- (instancetype)initWithInteractionChoiceSetId:(UInt16)interactionChoiceSetId;
- (instancetype)initWithInteractionChoiceSetIdList:(NSArray<NSNumber<SDLUInt> *> *)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<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout;
-- (instancetype)initWithInitialPrompt:(NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp;
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
-- (instancetype)initWithInitialChunks:(NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp;
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp;
-- (instancetype)initWithInitialChunks:(NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(SDLLayoutMode)layout;
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)layout;
/**
* @abstract The Text that Displayed when the interaction begins. This text may
@@ -54,7 +57,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, nonatomic) NSMutableArray<SDLTTSChunk *> *initialPrompt;
+@property (nullable, strong, nonatomic) 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
@@ -70,23 +73,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, nonatomic) NSMutableArray<SDLTTSChunk *> *helpPrompt;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<SDLTTSChunk *> *timeoutPrompt;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLInt> *timeout;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<SDLVRHelpItem *> *vrHelp;
-@property (strong, nonatomic) SDLLayoutMode interactionLayout;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLVRHelpItem *> *vrHelp;
+@property (nullable, strong, nonatomic) SDLLayoutMode interactionLayout;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m
index 1e483ed2d..8ee162446 100644
--- a/SmartDeviceLink/SDLPerformInteraction.m
+++ b/SmartDeviceLink/SDLPerformInteraction.m
@@ -8,7 +8,7 @@
#import "SDLTTSChunk.h"
#import "SDLVRHelpItem.h"
-static UInt16 const SDLDefaultTimeout = 10000;
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLPerformInteraction
@@ -22,30 +22,45 @@ 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<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout {
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)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<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(NSString *)helpPrompt timeoutPrompt:(NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp {
+- (instancetype)initWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)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<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(NSArray *)helpChunks timeoutChunks:(NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp {
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp {
return [self initWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:helpChunks timeoutChunks:timeoutChunks interactionMode:interactionMode timeout:timeout vrHelp:vrHelp interactionLayout:nil];
}
-- (instancetype)initWithInitialChunks:(NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(SDLLayoutMode)layout {
+- (instancetype)initWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLUInt> *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(UInt32)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp interactionLayout:(nullable SDLLayoutMode)layout {
self = [self initWithInteractionChoiceSetIdList:interactionChoiceSetIDList];
if (!self) {
return nil;
@@ -86,7 +101,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 {
@@ -94,7 +109,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;
@@ -132,7 +147,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 {
@@ -140,7 +155,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;
@@ -153,7 +168,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 {
@@ -161,7 +176,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;
@@ -174,7 +189,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 {
@@ -182,11 +197,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 {
@@ -194,7 +209,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;
@@ -207,7 +222,7 @@ static UInt16 const SDLDefaultTimeout = 10000;
}
}
-- (void)setInteractionLayout:(SDLLayoutMode)interactionLayout {
+- (void)setInteractionLayout:(nullable SDLLayoutMode)interactionLayout {
if (interactionLayout != nil) {
[parameters setObject:interactionLayout forKey:SDLNameInteractionLayout];
} else {
@@ -215,9 +230,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/SDLPerformInteractionResponse.h b/SmartDeviceLink/SDLPerformInteractionResponse.h
index 0ccc0695f..587b0e955 100644
--- a/SmartDeviceLink/SDLPerformInteractionResponse.h
+++ b/SmartDeviceLink/SDLPerformInteractionResponse.h
@@ -11,6 +11,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPerformInteractionResponse : SDLRPCResponse
/**
@@ -20,7 +23,7 @@
*
* Optional, Integer, 0 - 2,000,000,000
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *choiceID;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *choiceID;
/**
* @abstract Manually entered text selection, e.g. through keyboard
@@ -29,14 +32,16 @@
*
* Optional, Max length 500 chars
*/
-@property (strong, nonatomic) NSString *manualTextEntry;
+@property (nullable, strong, nonatomic) NSString *manualTextEntry;
/**
* @abstract A *SDLTriggerSource* object which will be shown in the HMI
*
* @discussion Only is valid if resultCode is SUCCESS.
*/
-@property (strong, nonatomic) SDLTriggerSource triggerSource;
+@property (nullable, strong, nonatomic) SDLTriggerSource triggerSource;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPerformInteractionResponse.m b/SmartDeviceLink/SDLPerformInteractionResponse.m
index 077fd7386..f606848f2 100644
--- a/SmartDeviceLink/SDLPerformInteractionResponse.m
+++ b/SmartDeviceLink/SDLPerformInteractionResponse.m
@@ -14,7 +14,7 @@
return self;
}
-- (void)setChoiceID:(NSNumber<SDLInt> *)choiceID {
+- (void)setChoiceID:(nullable NSNumber<SDLInt> *)choiceID {
if (choiceID != nil) {
[parameters setObject:choiceID forKey:SDLNameChoiceId];
} else {
@@ -22,11 +22,11 @@
}
}
-- (NSNumber<SDLInt> *)choiceID {
+- (nullable NSNumber<SDLInt> *)choiceID {
return [parameters objectForKey:SDLNameChoiceId];
}
-- (void)setManualTextEntry:(NSString *)manualTextEntry {
+- (void)setManualTextEntry:(nullable NSString *)manualTextEntry {
if (manualTextEntry != nil) {
[parameters setObject:manualTextEntry forKey:SDLNameManualTextEntry];
} else {
@@ -34,11 +34,11 @@
}
}
-- (NSString *)manualTextEntry {
+- (nullable NSString *)manualTextEntry {
return [parameters objectForKey:SDLNameManualTextEntry];
}
-- (void)setTriggerSource:(SDLTriggerSource)triggerSource {
+- (void)setTriggerSource:(nullable SDLTriggerSource)triggerSource {
if (triggerSource != nil) {
[parameters setObject:triggerSource forKey:SDLNameTriggerSource];
} else {
@@ -46,7 +46,7 @@
}
}
-- (SDLTriggerSource)triggerSource {
+- (nullable SDLTriggerSource)triggerSource {
NSObject *obj = [parameters objectForKey:SDLNameTriggerSource];
return (SDLTriggerSource)obj;
}
diff --git a/SmartDeviceLink/SDLPermissionItem.h b/SmartDeviceLink/SDLPermissionItem.h
index f9597f201..ea7eb7154 100644
--- a/SmartDeviceLink/SDLPermissionItem.h
+++ b/SmartDeviceLink/SDLPermissionItem.h
@@ -6,6 +6,7 @@
@class SDLHMIPermissions;
@class SDLParameterPermissions;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLPermissionItem : SDLRPCStruct
@@ -14,3 +15,5 @@
@property (strong, nonatomic) SDLParameterPermissions *parameterPermissions;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPermissionItem.m b/SmartDeviceLink/SDLPermissionItem.m
index ccd7bca6a..dabf169aa 100644
--- a/SmartDeviceLink/SDLPermissionItem.m
+++ b/SmartDeviceLink/SDLPermissionItem.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLParameterPermissions.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPermissionItem
- (void)setRpcName:(NSString *)rpcName {
@@ -31,11 +33,11 @@
- (SDLHMIPermissions *)hmiPermissions {
NSObject *obj = [store objectForKey:SDLNameHMIPermissions];
- if (obj == nil || [obj isKindOfClass:SDLHMIPermissions.class]) {
- return (SDLHMIPermissions *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLHMIPermissions alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLHMIPermissions*)obj;
}
- (void)setParameterPermissions:(SDLParameterPermissions *)parameterPermissions {
@@ -48,11 +50,13 @@
- (SDLParameterPermissions *)parameterPermissions {
NSObject *obj = [store objectForKey:SDLNameParameterPermissions];
- if (obj == nil || [obj isKindOfClass:SDLParameterPermissions.class]) {
- return (SDLParameterPermissions *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLParameterPermissions alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLParameterPermissions*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPolicyDataParser.h b/SmartDeviceLink/SDLPolicyDataParser.h
index f8fec23a3..cdc763b1e 100644
--- a/SmartDeviceLink/SDLPolicyDataParser.h
+++ b/SmartDeviceLink/SDLPolicyDataParser.h
@@ -4,6 +4,8 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPolicyDataParser : NSObject
@property (assign, nonatomic) Byte protocolVersion;
@@ -25,7 +27,9 @@
@property (strong, nonatomic) NSData *payload;
@property (strong, nonatomic) NSData *signatureTag;
-- (NSData *)unwrap:(NSData *)wrappedData;
+- (nullable NSData *)unwrap:(NSData *)wrappedData;
- (void)parsePolicyData:(NSData *)data;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPolicyDataParser.m b/SmartDeviceLink/SDLPolicyDataParser.m
index 68cfcfa44..a724d4a79 100644
--- a/SmartDeviceLink/SDLPolicyDataParser.m
+++ b/SmartDeviceLink/SDLPolicyDataParser.m
@@ -5,9 +5,11 @@
#import "SDLPolicyDataParser.h"
#import "SDLDebugTool.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPolicyDataParser
-- (NSData *)unwrap:(NSData *)wrappedData {
+- (nullable NSData *)unwrap:(NSData *)wrappedData {
NSData *decodedData = nil;
@try {
@@ -34,10 +36,6 @@
}
- (void)parsePolicyData:(NSData *)data {
- if (data == nil) {
- return;
- }
-
@try {
Byte *bytes = (Byte *)data.bytes;
@@ -95,19 +93,22 @@
}
int payloadOffset = 5;
- if (self.isHighBandwidth)
+ if (self.isHighBandwidth) {
payloadOffset += 11;
- if (self.hasESN)
+ }
+ if (self.hasESN) {
payloadOffset += self.ESN.length;
- if (self.isEncrypted)
+ }
+ if (self.isEncrypted) {
payloadOffset += self.initializationVector.length;
+ }
+
self.payload = [NSData dataWithBytes:(bytes + payloadOffset) length:self.payloadSize];
if (self.isSigned) {
int signatureTagOffset = (int)data.length - 16;
self.signatureTag = [NSData dataWithBytes:(bytes + signatureTagOffset) length:16];
}
-
}
@catch (NSException *exception) {
[SDLDebugTool logInfo:@"Error in PolicyDataParser::parsePolicyData()"];
@@ -138,3 +139,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPresetBankCapabilities.h b/SmartDeviceLink/SDLPresetBankCapabilities.h
index 6a2bed48a..9242bddbd 100644
--- a/SmartDeviceLink/SDLPresetBankCapabilities.h
+++ b/SmartDeviceLink/SDLPresetBankCapabilities.h
@@ -9,6 +9,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPresetBankCapabilities : SDLRPCStruct
/**
@@ -19,3 +22,5 @@
@property (strong, nonatomic) NSNumber<SDLBool> *onScreenPresetsAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPresetBankCapabilities.m b/SmartDeviceLink/SDLPresetBankCapabilities.m
index 8ad3a63ee..1b0f56f31 100644
--- a/SmartDeviceLink/SDLPresetBankCapabilities.m
+++ b/SmartDeviceLink/SDLPresetBankCapabilities.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPresetBankCapabilities
- (void)setOnScreenPresetsAvailable:(NSNumber<SDLBool> *)onScreenPresetsAvailable {
@@ -21,3 +23,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPrioritizedObjectCollection.h b/SmartDeviceLink/SDLPrioritizedObjectCollection.h
index 8cf90c805..993f7d903 100644
--- a/SmartDeviceLink/SDLPrioritizedObjectCollection.h
+++ b/SmartDeviceLink/SDLPrioritizedObjectCollection.h
@@ -5,6 +5,8 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPrioritizedObjectCollection : NSObject
/**
@@ -15,13 +17,15 @@
* @param object The object to be added to the priority collection
* @param priority The priority to use when determining the location of the object in the collection. A lower number is considered a higher priority
*/
-- (void)addObject:(id)object withPriority:(NSInteger)priority;
+- (void)addObject:(nullable id)object withPriority:(NSInteger)priority;
/**
* Retreive the highest priority object from the collection. This also removes the object.
*
* @return The highest priority object retrieved from the collection.
*/
-- (id)nextObject;
+- (nullable id)nextObject;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPrioritizedObjectCollection.m b/SmartDeviceLink/SDLPrioritizedObjectCollection.m
index c1b5b15b7..398ca4057 100644
--- a/SmartDeviceLink/SDLPrioritizedObjectCollection.m
+++ b/SmartDeviceLink/SDLPrioritizedObjectCollection.m
@@ -6,6 +6,7 @@
#import "SDLPrioritizedObjectCollection.h"
#import "SDLObjectWithPriority.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLPrioritizedObjectCollection () {
NSMutableArray<id> *privateArray;
@@ -23,7 +24,7 @@
return self;
}
-- (void)addObject:(id)object withPriority:(NSInteger)priority {
+- (void)addObject:(nullable id)object withPriority:(NSInteger)priority {
if (object == nil || [[NSNull null] isEqual:object]) {
return;
}
@@ -49,7 +50,7 @@
}
}
-- (instancetype)nextObject {
+- (nullable instancetype)nextObject {
if (privateArray.count == 0) {
return nil;
}
@@ -64,3 +65,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocol.h b/SmartDeviceLink/SDLProtocol.h
index 78b1c798e..a646cef45 100644
--- a/SmartDeviceLink/SDLProtocol.h
+++ b/SmartDeviceLink/SDLProtocol.h
@@ -5,12 +5,15 @@
@class SDLProtocolHeader;
@class SDLProtocolRecievedMessageRouter;
+NS_ASSUME_NONNULL_BEGIN
+
typedef NS_ENUM(NSUInteger, SDLProtocolError) {
SDLProtocolErrorNoSecurityManager,
};
extern NSString *const SDLProtocolSecurityErrorDomain;
+
@interface SDLProtocol : SDLAbstractProtocol <SDLProtocolListener>
// Sending
@@ -29,3 +32,5 @@ extern NSString *const SDLProtocolSecurityErrorDomain;
- (void)handleBytesFromTransport:(NSData *)receivedData;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocol.m b/SmartDeviceLink/SDLProtocol.m
index 9e27b3157..53d2ee036 100644
--- a/SmartDeviceLink/SDLProtocol.m
+++ b/SmartDeviceLink/SDLProtocol.m
@@ -28,17 +28,18 @@ NSString *const SDLProtocolSecurityErrorDomain = @"com.sdl.protocol.security";
typedef NSNumber SDLServiceTypeBox;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLProtocol () {
UInt32 _messageID;
dispatch_queue_t _receiveQueue;
dispatch_queue_t _sendQueue;
SDLPrioritizedObjectCollection *_prioritizedCollection;
- BOOL _alreadyDestructed;
}
@property (strong, nonatomic) NSMutableData *receiveBuffer;
-@property (strong, nonatomic) SDLProtocolReceivedMessageRouter *messageRouter;
-@property (nonatomic, strong) NSMutableDictionary<SDLServiceTypeBox *, SDLProtocolHeader *> *serviceHeaders;
+@property (nullable, strong, nonatomic) SDLProtocolReceivedMessageRouter *messageRouter;
+@property (strong, nonatomic) NSMutableDictionary<SDLServiceTypeBox *, SDLProtocolHeader *> *serviceHeaders;
@end
@@ -62,6 +63,9 @@ typedef NSNumber SDLServiceTypeBox;
return self;
}
+- (void)dealloc {
+ [SDLDebugTool logInfo:@"SDLProtocol Dealloc" withType:SDLDebugType_Transport_iAP toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+}
#pragma mark - Service metadata
- (UInt8)sdl_retrieveSessionIDforServiceType:(SDLServiceType)serviceType {
@@ -102,7 +106,7 @@ typedef NSNumber SDLServiceTypeBox;
}
- (SDLProtocolMessage *)sdl_createStartServiceMessageWithType:(SDLServiceType)serviceType encrypted:(BOOL)encryption {
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals globals].protocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].protocolVersion];
switch (serviceType) {
case SDLServiceType_RPC: {
// Need a different header for starting the RPC service, we get the session Id from the HU, or its the same as the RPC service's
@@ -127,7 +131,7 @@ typedef NSNumber SDLServiceTypeBox;
return [SDLProtocolMessage messageWithHeader:header andPayload:nil];
}
-- (void)sdl_initializeTLSEncryptionWithCompletionHandler:(void (^)(BOOL success, NSError *error))completionHandler {
+- (void)sdl_initializeTLSEncryptionWithCompletionHandler:(void (^)(BOOL success, NSError *_Nullable error))completionHandler {
if (self.securityManager == nil) {
[SDLDebugTool logInfo:@"Could not start service, encryption was requested but failed because no security manager has been set."];
@@ -163,7 +167,7 @@ typedef NSNumber SDLServiceTypeBox;
}
- (void)endServiceWithType:(SDLServiceType)serviceType {
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals globals].protocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].protocolVersion];
header.frameType = SDLFrameType_Control;
header.serviceType = serviceType;
header.frameData = SDLFrameData_EndSession;
@@ -183,7 +187,7 @@ typedef NSNumber SDLServiceTypeBox;
- (BOOL)sendRPC:(SDLRPCMessage *)message encrypted:(BOOL)encryption error:(NSError *__autoreleasing *)error {
NSParameterAssert(message != nil);
- NSData *jsonData = [NSJSONSerialization dataWithJSONObject:[message serializeAsDictionary:[SDLGlobals globals].protocolVersion] options:kNilOptions error:error];
+ NSData *jsonData = [NSJSONSerialization dataWithJSONObject:[message serializeAsDictionary:[SDLGlobals sharedGlobals].protocolVersion] options:kNilOptions error:error];
if (error != nil) {
[SDLDebugTool logInfo:[NSString stringWithFormat:@"Error encoding JSON data: %@", *error] withType:SDLDebugType_Protocol];
@@ -196,7 +200,7 @@ typedef NSNumber SDLServiceTypeBox;
// Build the message payload. Include the binary header if necessary
// VERSION DEPENDENT CODE
- switch ([SDLGlobals globals].protocolVersion) {
+ switch ([SDLGlobals sharedGlobals].protocolVersion) {
case 1: {
// No binary header in version 1
messagePayload = jsonData;
@@ -233,12 +237,12 @@ typedef NSNumber SDLServiceTypeBox;
}
} break;
default: {
- NSAssert(NO, @"Attempting to send an RPC based on an unknown version number: %@, message: %@", @([SDLGlobals globals].protocolVersion), message);
+ NSAssert(NO, @"Attempting to send an RPC based on an unknown version number: %@, message: %@", @([SDLGlobals sharedGlobals].protocolVersion), message);
} break;
}
// Build the protocol level header & message
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals globals].protocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].protocolVersion];
header.encrypted = encryption;
header.frameType = SDLFrameType_Single;
header.serviceType = (message.bulkData.length <= 0) ? SDLServiceType_RPC : SDLServiceType_BulkData;
@@ -247,7 +251,7 @@ typedef NSNumber SDLServiceTypeBox;
header.bytesInPayload = (UInt32)messagePayload.length;
// V2+ messages need to have message ID property set.
- if ([SDLGlobals globals].protocolVersion >= 2) {
+ if ([SDLGlobals sharedGlobals].protocolVersion >= 2) {
[((SDLV2ProtocolHeader *)header) setMessageID:++_messageID];
}
@@ -255,11 +259,11 @@ typedef NSNumber SDLServiceTypeBox;
SDLProtocolMessage *protocolMessage = [SDLProtocolMessage messageWithHeader:header andPayload:messagePayload];
// See if the message is small enough to send in one transmission. If not, break it up into smaller messages and send.
- if (protocolMessage.size < [SDLGlobals globals].maxMTUSize) {
+ if (protocolMessage.size < [SDLGlobals sharedGlobals].maxMTUSize) {
[self sdl_logRPCSend:protocolMessage];
[self sdl_sendDataToTransport:protocolMessage.data onService:SDLServiceType_RPC];
} else {
- NSArray<SDLProtocolMessage *> *messages = [SDLProtocolMessageDisassembler disassemble:protocolMessage withLimit:[SDLGlobals globals].maxMTUSize];
+ NSArray<SDLProtocolMessage *> *messages = [SDLProtocolMessageDisassembler disassemble:protocolMessage withLimit:[SDLGlobals sharedGlobals].maxMTUSize];
for (SDLProtocolMessage *smallerMessage in messages) {
[self sdl_logRPCSend:smallerMessage];
[self sdl_sendDataToTransport:smallerMessage.data onService:SDLServiceType_RPC];
@@ -301,7 +305,7 @@ typedef NSNumber SDLServiceTypeBox;
}
- (void)sdl_sendRawData:(NSData *)data onService:(SDLServiceType)service encryption:(BOOL)encryption {
- SDLV2ProtocolHeader *header = [[SDLV2ProtocolHeader alloc] initWithVersion:[SDLGlobals globals].protocolVersion];
+ SDLV2ProtocolHeader *header = [[SDLV2ProtocolHeader alloc] initWithVersion:[SDLGlobals sharedGlobals].protocolVersion];
header.encrypted = encryption;
header.frameType = SDLFrameType_Single;
header.serviceType = service;
@@ -322,11 +326,11 @@ typedef NSNumber SDLServiceTypeBox;
SDLProtocolMessage *message = [SDLProtocolMessage messageWithHeader:header andPayload:data];
- if (message.size < [SDLGlobals globals].maxMTUSize) {
+ if (message.size < [SDLGlobals sharedGlobals].maxMTUSize) {
[self sdl_logRPCSend:message];
[self sdl_sendDataToTransport:message.data onService:header.serviceType];
} else {
- NSArray<SDLProtocolMessage *> *messages = [SDLProtocolMessageDisassembler disassemble:message withLimit:[SDLGlobals globals].maxMTUSize];
+ NSArray<SDLProtocolMessage *> *messages = [SDLProtocolMessageDisassembler disassemble:message withLimit:[SDLGlobals sharedGlobals].maxMTUSize];
for (SDLProtocolMessage *smallerMessage in messages) {
[self sdl_logRPCSend:smallerMessage];
[self sdl_sendDataToTransport:smallerMessage.data onService:header.serviceType];
@@ -341,7 +345,7 @@ typedef NSNumber SDLServiceTypeBox;
- (void)handleBytesFromTransport:(NSData *)receivedData {
// Initialize the receive buffer which will contain bytes while messages are constructed.
if (self.receiveBuffer == nil) {
- self.receiveBuffer = [NSMutableData dataWithCapacity:(4 * [SDLGlobals globals].maxMTUSize)];
+ self.receiveBuffer = [NSMutableData dataWithCapacity:(4 * [SDLGlobals sharedGlobals].maxMTUSize)];
}
// Save the data
@@ -411,7 +415,7 @@ typedef NSNumber SDLServiceTypeBox;
- (void)handleProtocolStartSessionACK:(SDLProtocolHeader *)header {
switch (header.serviceType) {
case SDLServiceType_RPC: {
- [SDLGlobals globals].maxHeadUnitVersion = header.version;
+ [SDLGlobals sharedGlobals].maxHeadUnitVersion = header.version;
} break;
default:
break;
@@ -466,7 +470,7 @@ typedef NSNumber SDLServiceTypeBox;
- (void)handleHeartbeatForSession:(Byte)session {
// Respond with a heartbeat ACK
- SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals globals].protocolVersion];
+ SDLProtocolHeader *header = [SDLProtocolHeader headerForVersion:[SDLGlobals sharedGlobals].protocolVersion];
header.frameType = SDLFrameType_Control;
header.serviceType = SDLServiceType_Control;
header.frameData = SDLFrameData_HeartbeatACK;
@@ -613,26 +617,6 @@ typedef NSNumber SDLServiceTypeBox;
return [SDLProtocolMessage messageWithHeader:serverMessageHeader andPayload:binaryData];
}
-
-#pragma mark - Lifecycle
-
-- (void)sdl_destructObjects {
- if (!_alreadyDestructed) {
- _alreadyDestructed = YES;
- _messageRouter.delegate = nil;
- _messageRouter = nil;
- self.transport = nil;
- self.protocolDelegateTable = nil;
- }
-}
-
-- (void)dispose {
- [self sdl_destructObjects];
-}
-
-- (void)dealloc {
- [self sdl_destructObjects];
- [SDLDebugTool logInfo:@"SDLProtocol Dealloc" withType:SDLDebugType_Transport_iAP toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
-}
-
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolHeader.h b/SmartDeviceLink/SDLProtocolHeader.h
index 407494e6c..97c405db2 100644
--- a/SmartDeviceLink/SDLProtocolHeader.h
+++ b/SmartDeviceLink/SDLProtocolHeader.h
@@ -37,6 +37,7 @@ typedef NS_ENUM(UInt8, SDLFrameData) {
SDLFrameData_ConsecutiveLastFrame = 0x00
};
+NS_ASSUME_NONNULL_BEGIN
@interface SDLProtocolHeader : NSObject <NSCopying> {
UInt8 _version;
@@ -54,9 +55,11 @@ typedef NS_ENUM(UInt8, SDLFrameData) {
@property (assign, nonatomic) UInt32 bytesInPayload;
- (instancetype)init;
-- (NSData *)data;
+- (nullable NSData *)data;
- (void)parse:(NSData *)data;
- (NSString *)description;
+ (__kindof SDLProtocolHeader *)headerForVersion:(UInt8)version;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolHeader.m b/SmartDeviceLink/SDLProtocolHeader.m
index 65e025c61..6dbf21c38 100644
--- a/SmartDeviceLink/SDLProtocolHeader.m
+++ b/SmartDeviceLink/SDLProtocolHeader.m
@@ -6,6 +6,8 @@
#import "SDLV1ProtocolHeader.h"
#import "SDLV2ProtocolHeader.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLProtocolHeader
@synthesize version = _version;
@@ -28,12 +30,12 @@
_encrypted = compressed;
}
-- (id)copyWithZone:(NSZone *)zone {
+- (id)copyWithZone:(nullable NSZone *)zone {
[self doesNotRecognizeSelector:_cmd];
return 0;
}
-- (NSData *)data {
+- (nullable NSData *)data {
[self doesNotRecognizeSelector:_cmd];
return nil;
}
@@ -66,3 +68,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolListener.h b/SmartDeviceLink/SDLProtocolListener.h
index 3371dfde3..20ad1eafd 100644
--- a/SmartDeviceLink/SDLProtocolListener.h
+++ b/SmartDeviceLink/SDLProtocolListener.h
@@ -5,6 +5,7 @@
@class SDLProtocolMessage;
+NS_ASSUME_NONNULL_BEGIN
@protocol SDLProtocolListener <NSObject>
@@ -22,3 +23,5 @@
- (void)onError:(NSString *)info exception:(NSException *)e;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolMessage.h b/SmartDeviceLink/SDLProtocolMessage.h
index cb0d9075b..c4400a8c7 100644
--- a/SmartDeviceLink/SDLProtocolMessage.h
+++ b/SmartDeviceLink/SDLProtocolMessage.h
@@ -5,19 +5,22 @@
@class SDLProtocolHeader;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLProtocolMessage : NSObject
@property (strong, nonatomic) SDLProtocolHeader *header;
-@property (strong, nonatomic) NSData *payload;
+@property (nullable, strong, nonatomic) NSData *payload;
@property (strong, nonatomic, readonly) NSData *data;
-+ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload; // Returns a V1 or V2 object
++ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload; // Returns a V1 or V2 object
- (NSUInteger)size;
- (NSString *)description;
-- (NSDictionary<NSString *, id> *)rpcDictionary; // Use for RPC type messages to obtain the data in a dictionary
+- (nullable NSDictionary<NSString *, id> *)rpcDictionary; // Use for RPC type messages to obtain the data in a dictionary
+ (UInt8)determineVersion:(NSData *)data;
-
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolMessage.m b/SmartDeviceLink/SDLProtocolMessage.m
index 611d85924..bdcf6883d 100644
--- a/SmartDeviceLink/SDLProtocolMessage.m
+++ b/SmartDeviceLink/SDLProtocolMessage.m
@@ -10,11 +10,7 @@
#import "SDLV1ProtocolMessage.h"
#import "SDLV2ProtocolMessage.h"
-@interface SDLProtocolMessage ()
-
-@property (strong, nonatomic) NSMutableData *internalBuffer;
-
-@end
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLProtocolMessage
@@ -33,7 +29,7 @@
return self;
}
-- (NSDictionary<NSString *, id> *)rpcDictionary {
+- (nullable NSDictionary<NSString *, id> *)rpcDictionary {
[self doesNotRecognizeSelector:_cmd];
return nil;
}
@@ -84,7 +80,7 @@
}
// Returns a V1 or V2 object
-+ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload {
++ (id)messageWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload {
SDLProtocolMessage *newMessage = nil;
UInt8 version = header.version;
@@ -100,3 +96,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolMessageAssembler.h b/SmartDeviceLink/SDLProtocolMessageAssembler.h
index d95708d85..589d8032a 100644
--- a/SmartDeviceLink/SDLProtocolMessageAssembler.h
+++ b/SmartDeviceLink/SDLProtocolMessageAssembler.h
@@ -5,8 +5,9 @@
@class SDLProtocolMessage;
+NS_ASSUME_NONNULL_BEGIN
-typedef void (^SDLMessageAssemblyCompletionHandler)(BOOL done, SDLProtocolMessage *assembledMessage);
+typedef void (^SDLMessageAssemblyCompletionHandler)(BOOL done, SDLProtocolMessage * _Nullable assembledMessage);
@interface SDLProtocolMessageAssembler : NSObject
@@ -14,9 +15,10 @@ typedef void (^SDLMessageAssemblyCompletionHandler)(BOOL done, SDLProtocolMessag
@property (assign, nonatomic, readonly) UInt8 sessionID;
@property (assign, nonatomic) UInt32 frameCount; // number of consecutive frames required for reassembly
@property (assign, nonatomic) UInt32 expectedBytes;
-@property (strong, nonatomic) NSMutableDictionary<NSNumber *, NSData *> *parts;
- (instancetype)initWithSessionID:(UInt8)sessionID;
- (void)handleMessage:(SDLProtocolMessage *)message withCompletionHandler:(SDLMessageAssemblyCompletionHandler)completionHandler;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolMessageAssembler.m b/SmartDeviceLink/SDLProtocolMessageAssembler.m
index b43c94189..858efbd45 100644
--- a/SmartDeviceLink/SDLProtocolMessageAssembler.m
+++ b/SmartDeviceLink/SDLProtocolMessageAssembler.m
@@ -7,6 +7,14 @@
#import "SDLProtocolHeader.h"
#import "SDLProtocolMessage.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLProtocolMessageAssembler ()
+
+@property (nullable, strong) NSMutableDictionary<NSNumber *, NSData *> *parts;
+
+@end
+
@implementation SDLProtocolMessageAssembler
- (instancetype)initWithSessionID:(UInt8)sessionID {
@@ -93,3 +101,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolMessageDisassembler.h b/SmartDeviceLink/SDLProtocolMessageDisassembler.h
index b4b8afa5c..644b1c1de 100644
--- a/SmartDeviceLink/SDLProtocolMessageDisassembler.h
+++ b/SmartDeviceLink/SDLProtocolMessageDisassembler.h
@@ -5,9 +5,12 @@
@class SDLProtocolMessage;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLProtocolMessageDisassembler : NSObject
+ (NSArray<SDLProtocolMessage *> *)disassemble:(SDLProtocolMessage *)protocolMessage withLimit:(NSUInteger)mtu;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolMessageDisassembler.m b/SmartDeviceLink/SDLProtocolMessageDisassembler.m
index 7e3d0df3e..42e773855 100644
--- a/SmartDeviceLink/SDLProtocolMessageDisassembler.m
+++ b/SmartDeviceLink/SDLProtocolMessageDisassembler.m
@@ -5,6 +5,7 @@
#import "SDLProtocolHeader.h"
#import "SDLProtocolMessage.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLProtocolMessageDisassembler
@@ -87,3 +88,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h b/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h
index 69d0fcfbc..c153c0c41 100644
--- a/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h
+++ b/SmartDeviceLink/SDLProtocolReceivedMessageRouter.h
@@ -5,11 +5,14 @@
#import "SDLProtocolListener.h"
@class SDLProtocolMessage;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLProtocolReceivedMessageRouter : NSObject
-@property (weak, nonatomic) id<SDLProtocolListener> delegate;
+@property (weak, nonatomic, nullable) id<SDLProtocolListener> delegate;
- (void)handleReceivedMessage:(SDLProtocolMessage *)message;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m b/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m
index 69beaf8b7..a3bc929a5 100644
--- a/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m
+++ b/SmartDeviceLink/SDLProtocolReceivedMessageRouter.m
@@ -8,10 +8,10 @@
#import "SDLProtocolMessage.h"
#import "SDLProtocolMessageAssembler.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLProtocolReceivedMessageRouter ()
-@property (assign, nonatomic) BOOL alreadyDestructed;
@property (strong, nonatomic) NSMutableDictionary<NSNumber *, SDLProtocolMessageAssembler *> *messageAssemblers;
@end
@@ -21,7 +21,6 @@
- (instancetype)init {
if (self = [super init]) {
- _alreadyDestructed = NO;
self.messageAssemblers = [NSMutableDictionary dictionaryWithCapacity:2];
}
return self;
@@ -114,22 +113,6 @@
[assembler handleMessage:message withCompletionHandler:completionHandler];
}
-
-#pragma mark - Lifecycle
-
-- (void)sdl_destructObjects {
- if (!self.alreadyDestructed) {
- self.alreadyDestructed = YES;
- self.delegate = nil;
- }
-}
-
-- (void)sdl_dispose {
- [self sdl_destructObjects];
-}
-
-- (void)dealloc {
- [self sdl_destructObjects];
-}
-
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProxy.h b/SmartDeviceLink/SDLProxy.h
index a8752abb6..81d1743f0 100644
--- a/SmartDeviceLink/SDLProxy.h
+++ b/SmartDeviceLink/SDLProxy.h
@@ -13,26 +13,26 @@
#import "SDLProxyListener.h"
#import "SDLSecurityType.h"
+NS_ASSUME_NONNULL_BEGIN
+
__deprecated_msg("Use SDLManager instead")
@interface SDLProxy : NSObject<SDLProtocolListener, NSStreamDelegate> {
Byte _version;
Byte _bulkSessionID;
BOOL _isConnected;
- BOOL _alreadyDestructed;
}
-@property (strong, nonatomic) SDLAbstractProtocol *protocol;
-@property (strong, nonatomic) SDLAbstractTransport *transport;
-@property (copy, nonatomic, readonly) NSSet<NSObject<SDLProxyListener> *> *proxyListeners;
+@property (nullable, strong, nonatomic) SDLAbstractProtocol *protocol;
+@property (nullable, strong, nonatomic) SDLAbstractTransport *transport;
+@property (readonly, copy, nonatomic) NSSet<NSObject<SDLProxyListener> *> *proxyListeners;
@property (strong, nonatomic) SDLTimer *startSessionTimer;
@property (copy, nonatomic) NSString *debugConsoleGroupName;
-@property (copy, nonatomic, readonly) NSString *proxyVersion;
-@property (strong, nonatomic, readonly) SDLStreamingMediaManager *streamingMediaManager;
+@property (readonly, copy, nonatomic) NSString *proxyVersion;
+@property (nullable, nonatomic, strong, readonly) SDLStreamingMediaManager *streamingMediaManager;
- (id)initWithTransport:(SDLAbstractTransport *)transport
protocol:(SDLAbstractProtocol *)protocol
delegate:(NSObject<SDLProxyListener> *)delegate;
-- (void)dispose;
- (void)addDelegate:(NSObject<SDLProxyListener> *)delegate;
- (void)removeDelegate:(NSObject<SDLProxyListener> *)delegate;
@@ -59,3 +59,5 @@ __deprecated_msg("Use SDLManager instead")
- (void)putFileStream:(NSInputStream *)inputStream withRequest:(SDLPutFile *)putFileRPCRequest;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m
index 955c0eb07..48c905a8c 100644
--- a/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink/SDLProxy.m
@@ -41,6 +41,8 @@
#import "SDLURLSession.h"
#import "SDLVehicleType.h"
+NS_ASSUME_NONNULL_BEGIN
+
typedef NSString SDLVehicleMake;
typedef void (^URLSessionTaskCompletionHandler)(NSData *data, NSURLResponse *response, NSError *error);
@@ -51,16 +53,15 @@ const float startSessionTime = 10.0;
const float notifyProxyClosedDelay = 0.1;
const int POLICIES_CORRELATION_ID = 65535;
-
@interface SDLProxy () {
SDLLockScreenStatusManager *_lsm;
}
@property (copy, nonatomic) NSString *appId;
@property (strong, nonatomic) NSMutableSet<NSObject<SDLProxyListener> *> *mutableProxyListeners;
-@property (strong, nonatomic, readwrite, nullable) SDLStreamingMediaManager *streamingMediaManager;
-@property (strong, nonatomic, nullable) SDLDisplayCapabilities *displayCapabilities;
-@property (strong, nonatomic) NSMutableDictionary<SDLVehicleMake *, Class> *securityManagers;
+@property (nullable, nonatomic, strong, readwrite) SDLStreamingMediaManager *streamingMediaManager;
+@property (nullable, nonatomic, strong) SDLDisplayCapabilities *displayCapabilities;
+@property (nonatomic, strong) NSMutableDictionary<SDLVehicleMake *, Class> *securityManagers;
@end
@@ -72,7 +73,6 @@ const int POLICIES_CORRELATION_ID = 65535;
if (self = [super init]) {
_debugConsoleGroupName = @"default";
_lsm = [[SDLLockScreenStatusManager alloc] init];
- _alreadyDestructed = NO;
_mutableProxyListeners = [NSMutableSet setWithObject:theDelegate];
_securityManagers = [NSMutableDictionary dictionary];
@@ -91,40 +91,16 @@ const int POLICIES_CORRELATION_ID = 65535;
return self;
}
-- (void)destructObjects {
- if (!_alreadyDestructed) {
- _alreadyDestructed = YES;
-
- [[NSNotificationCenter defaultCenter] removeObserver:self];
- [[EAAccessoryManager sharedAccessoryManager] unregisterForLocalNotifications];
-
- [[SDLURLSession defaultSession] cancelAllTasks];
-
- [self.protocol dispose];
- [self.transport dispose];
-
- _transport = nil;
- _protocol = nil;
- _mutableProxyListeners = nil;
- _streamingMediaManager = nil;
- _displayCapabilities = nil;
- }
-}
-
-- (void)dispose {
- if (self.transport != nil) {
- [self.transport disconnect];
- }
-
+- (void)dealloc {
if (self.protocol.securityManager != nil) {
[self.protocol.securityManager stop];
}
-
- [self destructObjects];
-}
-
-- (void)dealloc {
- [self destructObjects];
+
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [[EAAccessoryManager sharedAccessoryManager] unregisterForLocalNotifications];
+
+ [[SDLURLSession defaultSession] cancelAllTasks];
+
[SDLDebugTool logInfo:@"SDLProxy Dealloc" withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:_debugConsoleGroupName];
}
@@ -176,7 +152,7 @@ const int POLICIES_CORRELATION_ID = 65535;
return SDLProxyVersion;
}
-- (SDLStreamingMediaManager *)streamingMediaManager {
+- (nullable SDLStreamingMediaManager *)streamingMediaManager {
if (_streamingMediaManager == nil) {
if (self.displayCapabilities == nil) {
@throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"SDLStreamingMediaManager must be accessed only after a successful RegisterAppInterfaceResponse" userInfo:nil];
@@ -218,7 +194,7 @@ const int POLICIES_CORRELATION_ID = 65535;
}
}
-- (id<SDLSecurityType>)securityManagerForMake:(NSString *)make {
+- (nullable id<SDLSecurityType>)securityManagerForMake:(NSString *)make {
if ((make != nil) && (self.securityManagers[make] != nil)) {
Class securityManagerClass = self.securityManagers[make];
self.protocol.appId = self.appId;
@@ -389,7 +365,7 @@ const int POLICIES_CORRELATION_ID = 65535;
self.protocol.securityManager.appId = self.appId;
}
- if ([SDLGlobals globals].protocolVersion >= 4) {
+ if ([SDLGlobals sharedGlobals].protocolVersion >= 4) {
[self sendMobileHMIState];
// Send SDL updates to application state
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sendMobileHMIState) name:UIApplicationDidBecomeActiveNotification object:nil];
@@ -592,7 +568,7 @@ const int POLICIES_CORRELATION_ID = 65535;
*
* @return A parsed JSON dictionary, or nil if it couldn't be parsed
*/
-- (NSDictionary<NSString *, id> *)validateAndParseSystemRequest:(SDLOnSystemRequest *)request {
+- (nullable NSDictionary<NSString *, id> *)validateAndParseSystemRequest:(SDLOnSystemRequest *)request {
NSString *urlString = request.url;
SDLFileType fileType = request.fileType;
@@ -691,7 +667,7 @@ const int POLICIES_CORRELATION_ID = 65535;
}
}
-- (void)invokeMethodOnDelegates:(SEL)aSelector withObject:(id)object {
+- (void)invokeMethodOnDelegates:(SEL)aSelector withObject:(nullable id)object {
dispatch_async(dispatch_get_main_queue(), ^{
@autoreleasepool {
for (id<SDLProxyListener> listener in self.proxyListeners) {
@@ -777,7 +753,7 @@ const int POLICIES_CORRELATION_ID = 65535;
// Grab some bytes from the stream and send them in a SDLPutFile RPC Request
NSUInteger currentStreamOffset = [[stream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedIntegerValue];
- NSMutableData *buffer = [NSMutableData dataWithLength:[SDLGlobals globals].maxMTUSize];
+ NSMutableData *buffer = [NSMutableData dataWithLength:[SDLGlobals sharedGlobals].maxMTUSize];
NSUInteger nBytesRead = [(NSInputStream *)stream read:(uint8_t *)buffer.mutableBytes maxLength:buffer.length];
if (nBytesRead > 0) {
NSData *data = [buffer subdataWithRange:NSMakeRange(0, nBytesRead)];
@@ -812,3 +788,5 @@ const int POLICIES_CORRELATION_ID = 65535;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProxyFactory.h b/SmartDeviceLink/SDLProxyFactory.h
index f4aee3089..5d2212e58 100644
--- a/SmartDeviceLink/SDLProxyFactory.h
+++ b/SmartDeviceLink/SDLProxyFactory.h
@@ -7,8 +7,10 @@
@class SDLProxy;
+NS_ASSUME_NONNULL_BEGIN
+
__deprecated_msg("Use SDLManager instead")
- @interface SDLProxyFactory : NSObject {
+@interface SDLProxyFactory : NSObject {
}
+ (SDLProxy *)buildSDLProxyWithListener:(NSObject<SDLProxyListener> *)listener;
@@ -17,3 +19,5 @@ __deprecated_msg("Use SDLManager instead")
tcpIPAddress:(NSString *)ipaddress
tcpPort:(NSString *)port;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProxyFactory.m b/SmartDeviceLink/SDLProxyFactory.m
index b2320c641..8c187ce04 100644
--- a/SmartDeviceLink/SDLProxyFactory.m
+++ b/SmartDeviceLink/SDLProxyFactory.m
@@ -9,6 +9,7 @@
#import "SDLProxy.h"
#import "SDLTCPTransport.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLProxyFactory
@@ -34,4 +35,6 @@
return ret;
}
-@end \ No newline at end of file
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLProxyListener.h b/SmartDeviceLink/SDLProxyListener.h
index 9b6f460f4..2d1f6e96f 100644
--- a/SmartDeviceLink/SDLProxyListener.h
+++ b/SmartDeviceLink/SDLProxyListener.h
@@ -68,6 +68,7 @@
@class SDLUnsubscribeVehicleDataResponse;
@class SDLUnsubscribeWaypointsResponse;
+NS_ASSUME_NONNULL_BEGIN
@protocol SDLProxyListener <NSObject>
@@ -143,3 +144,5 @@
- (void)onUnsubscribeWayPointsResponse:(SDLUnsubscribeWaypointsResponse *)response;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPutFile.h b/SmartDeviceLink/SDLPutFile.h
index e838d186c..247228fbd 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, nonatomic) NSNumber<SDLBool> *persistentFile;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLBool> *systemFile;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *systemFile;
/**
* Offset in bytes for resuming partial data chunks.
*
* Integer, Optional, 0 - 100,000,000,000
*/
-@property (strong, nonatomic) NSNumber<SDLUInt> *offset;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSNumber<SDLUInt> *length;
+@property (nullable, strong, nonatomic) NSNumber<SDLUInt> *length;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPutFile.m b/SmartDeviceLink/SDLPutFile.m
index 2f237cfb8..dc420a59e 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/SDLPutFileResponse.h b/SmartDeviceLink/SDLPutFileResponse.h
index c12c928c3..dfa7a74a7 100644
--- a/SmartDeviceLink/SDLPutFileResponse.h
+++ b/SmartDeviceLink/SDLPutFileResponse.h
@@ -9,7 +9,12 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLPutFileResponse : SDLRPCResponse
@property (strong, nonatomic) NSNumber<SDLInt> *spaceAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLPutFileResponse.m b/SmartDeviceLink/SDLPutFileResponse.m
index d4d458c65..e392a2932 100644
--- a/SmartDeviceLink/SDLPutFileResponse.m
+++ b/SmartDeviceLink/SDLPutFileResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLPutFileResponse
- (instancetype)init {
@@ -27,3 +29,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCMessage.h b/SmartDeviceLink/SDLRPCMessage.h
index 07a45f341..3612d15c0 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, nonatomic) NSData *bulkData;
+@property (nullable, strong, nonatomic) NSData *bulkData;
@property (strong, nonatomic, readonly) NSString *name;
@property (strong, nonatomic, readonly) NSString *messageType;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCMessage.m b/SmartDeviceLink/SDLRPCMessage.m
index 028c99303..588d8c1a1 100644
--- a/SmartDeviceLink/SDLRPCMessage.m
+++ b/SmartDeviceLink/SDLRPCMessage.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCMessage
@synthesize messageType;
@@ -26,7 +28,7 @@
if (self = [super initWithDictionary:dict]) {
NSEnumerator *enumerator = [store keyEnumerator];
while (messageType = [enumerator nextObject]) {
- if ([messageType isEqualToString:SDLNameBulkData] == FALSE) {
+ if (![messageType isEqualToString:SDLNameBulkData]) {
break;
}
}
@@ -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 {
@@ -63,11 +65,6 @@
}
}
-- (void)dealloc {
- function = nil;
- parameters = nil;
-}
-
- (NSString *)name {
return [function objectForKey:SDLNameOperationName];
}
@@ -79,3 +76,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 0cc38454a..5794cb5ea 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, nonatomic) SDLRPCMessageType rpcType;
@property (assign, nonatomic) UInt32 functionID;
@property (assign, nonatomic) UInt32 correlationID;
-@property (strong, nonatomic) NSData *jsonData;
-@property (strong, nonatomic) NSData *binaryData;
+@property (nullable, strong, nonatomic) NSData *jsonData;
+@property (nullable, strong, nonatomic) 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 31a452bbd..b99449aef 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, nonatomic) NSNumber<SDLInt> *correlationID;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCRequest.m b/SmartDeviceLink/SDLRPCRequest.m
index 3ccdbc0c6..93b39751d 100644
--- a/SmartDeviceLink/SDLRPCRequest.m
+++ b/SmartDeviceLink/SDLRPCRequest.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLRPCRequest
- (NSNumber<SDLInt> *)correlationID {
@@ -21,3 +23,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCRequestFactory.h b/SmartDeviceLink/SDLRPCRequestFactory.h
new file mode 100644
index 000000000..30b2561f8
--- /dev/null
+++ b/SmartDeviceLink/SDLRPCRequestFactory.h
@@ -0,0 +1,233 @@
+// SDLRPCRequestFactory.h
+//
+
+#import <Foundation/Foundation.h>
+
+#import "SDLAppHMIType.h"
+#import "SDLAudioType.h"
+#import "SDLBitsPerSample.h"
+#import "SDLButtonName.h"
+#import "SDLFileType.h"
+#import "SDLGlobalProperty.h"
+#import "SDLImageType.h"
+#import "SDLInteractionMode.h"
+#import "SDLLanguage.h"
+#import "SDLNotificationConstants.h"
+#import "SDLSamplingRate.h"
+#import "SDLSoftButtonType.h"
+#import "SDLSystemAction.h"
+#import "SDLTextAlignment.h"
+#import "SDLUpdateMode.h"
+#import "SDLVRHelpItem.h"
+
+@class SDLAddCommand;
+@class SDLAddSubMenu;
+@class SDLAlert;
+@class SDLAlertManeuver;
+@class SDLChangeRegistration;
+@class SDLChoice;
+@class SDLCreateInteractionChoiceSet;
+@class SDLDeleteCommand;
+@class SDLDeleteFile;
+@class SDLDeleteInteractionChoiceSet;
+@class SDLDeleteSubMenu;
+@class SDLDialNumber;
+@class SDLEndAudioPassThru;
+@class SDLGetDTCs;
+@class SDLGetVehicleData;
+@class SDLImage;
+@class SDLListFiles;
+@class SDLPerformAudioPassThru;
+@class SDLPerformInteraction;
+@class SDLPutFile;
+@class SDLReadDID;
+@class SDLRegisterAppInterface;
+@class SDLResetGlobalProperties;
+@class SDLScrollableMessage;
+@class SDLSendLocation;
+@class SDLSetAppIcon;
+@class SDLSetDisplayLayout;
+@class SDLSetGlobalProperties;
+@class SDLSetMediaClockTimer;
+@class SDLShow;
+@class SDLShowConstantTBT;
+@class SDLSlider;
+@class SDLSoftButton;
+@class SDLSpeak;
+@class SDLSubscribeButton;
+@class SDLSubscribeVehicleData;
+@class SDLTTSChunk;
+@class SDLTurn;
+@class SDLUnregisterAppInterface;
+@class SDLUnsubscribeButton;
+@class SDLUnsubscribeVehicleData;
+@class SDLUpdateTurnList;
+
+NS_ASSUME_NONNULL_BEGIN
+
+__deprecated_msg("use class's initializers instead") @interface SDLRPCRequestFactory : NSObject {
+}
+
+//***** AddCommand *****
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName parentID:(nullable NSNumber<SDLInt> *)parentID position:(nullable NSNumber<SDLInt> *)position vrCommands:(nullable NSArray<NSString *> *)vrCommands iconValue:(nullable NSString *)iconValue iconType:(nullable SDLImageType)iconType correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAddCommand's buildAddCommandWithID:vrCommands:menuName:parentID:position:iconValue:iconType:handler: instead");
+;
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName vrCommands:(nullable NSArray<NSString *> *)vrCommands correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAddCommands's initWithId:vrCommands:menuName:handler: instead");
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID vrCommands:(nullable NSArray<NSString *> *)vrCommands correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use buildAddCommandWithID:vrCommands:handler: with SDLManager instead");
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName parentID:(nullable NSNumber<SDLInt> *)parentID position:(nullable NSNumber<SDLInt> *)position vrCommands:(nullable NSArray<NSString *> *)vrCommands iconValue:(nullable NSString *)iconValue iconType:(nullable SDLImageType)iconType handler:(SDLRPCNotificationHandler)handler __deprecated_msg("use SDLAddCommand's initWithId:vrCommands:menuName:parentId:position:iconValue:iconType:handler: instead");
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName vrCommands:(nullable NSArray<NSString *> *)vrCommands handler:(SDLRPCNotificationHandler)handler __deprecated_msg("use SDLAddCommand's initWithId:vrCommands:menuName:handler: instead");
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID vrCommands:(nullable NSArray<NSString *> *)vrCommands handler:(SDLRPCNotificationHandler)handler __deprecated_msg("use SDLAddCommand's initWithId:vrCommands:handler: instead");
+//*****
+
+
+//***** AddSubMenu *****
++ (SDLAddSubMenu *)buildAddSubMenuWithID:(NSNumber<SDLInt> *)menuID menuName:(NSString *)menuName position:(nullable NSNumber<SDLInt> *)position correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAddSubMenu's initWithId:menuName:position: instead");
+
++ (SDLAddSubMenu *)buildAddSubMenuWithID:(NSNumber<SDLInt> *)menuID menuName:(NSString *)menuName correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAddSubMenu's initWithId:menuName: instead");
+//*****
+
+
+//***** Alert *****
++ (SDLAlert *)buildAlertWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(nullable NSNumber<SDLBool> *)playTone duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithTTS:alertText1:alertText2:alertText3:playTone:duration: instead");
+
++ (SDLAlert *)buildAlertWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(nullable NSNumber<SDLBool> *)playTone duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithTTS:alertText1:alertText2:playTone:duration: instead");
+
++ (SDLAlert *)buildAlertWithTTS:(nullable NSString *)ttsText playTone:(nullable NSNumber<SDLBool> *)playTone correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithTTS:playTone:duration: instead");
+
+//***
++ (SDLAlert *)buildAlertWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(nullable NSNumber<SDLBool> *)playTone duration:(nullable NSNumber<SDLInt> *)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithTTSChunks:alertText1:alertText2:alertText3:playTone:duration:softButtons: instead");
+
++ (SDLAlert *)buildAlertWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(nullable NSNumber<SDLBool> *)playTone correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithTTSChunks:playTone: instead");
+
+//***
++ (SDLAlert *)buildAlertWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(nullable NSNumber<SDLInt> *)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithAlertText1:alertText2:alertText3:duration:softButtons: instead");
+
++ (SDLAlert *)buildAlertWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithAlertText1:alertText2:alertText3:duration: instead");
+
++ (SDLAlert *)buildAlertWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlert's initWithAlertText1:alertText2:duration: instead");
+//*****
+
++ (SDLAlertManeuver *)buildAlertManeuverwithTTSchunks:(NSMutableArray<SDLTTSChunk *> *)ttsChunks softButtons:(NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLAlertManeuver's initWithTTSChunks:softButtons: instead");
+
++ (SDLChangeRegistration *)buildChangeRegistrationWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLChangeRegistration's initWithLanguage:hmiDisplayLanguage: instead");
+
++ (SDLCreateInteractionChoiceSet *)buildCreateInteractionChoiceSetWithID:(NSNumber<SDLInt> *)interactionChoiceSetID choiceSet:(NSArray<SDLChoice *> *)choices correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLCreateInteractionChoiceSet's initWithId:choiceSet: instead");
+
++ (SDLDeleteCommand *)buildDeleteCommandWithID:(NSNumber<SDLInt> *)cmdID correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLDeleteCommand's initWithId: instead");
+
++ (SDLDeleteFile *)buildDeleteFileWithName:(NSString *)syncFileName correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLDeleteFile's initWithFileName: instead");
+
++ (SDLDialNumber *)buildDialNumberWithNumber:(NSString *)phoneNumber __deprecated_msg("use SDLDialNumber's initWithNumber: instead");
+
++ (SDLListFiles *)buildListFilesWithCorrelationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLListFiles's default initializer instead");
+
++ (SDLDeleteInteractionChoiceSet *)buildDeleteInteractionChoiceSetWithID:(NSNumber<SDLInt> *)interactionChoiceSetID correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLDeleteInteractionChoiceSet's initWithId: instead");
+
++ (SDLDeleteSubMenu *)buildDeleteSubMenuWithID:(NSNumber<SDLInt> *)menuID correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLDeleteSubMenu's initWithId: instead");
+
++ (SDLEndAudioPassThru *)buildEndAudioPassThruWithCorrelationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLEndAudioPassThru's default initializer instead");
+
++ (SDLGetDTCs *)buildGetDTCsWithECUName:(NSNumber<SDLInt> *)ecuName correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLGetDTCs's initWithECUName: instead");
+
++ (SDLGetVehicleData *)buildGetVehicleDataWithGPS:(NSNumber<SDLBool> *)gps speed:(NSNumber<SDLBool> *)speed rpm:(NSNumber<SDLBool> *)rpm fuelLevel:(NSNumber<SDLBool> *)fuelLevel fuelLevelState:(NSNumber<SDLBool> *)fuelLevelState instantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption externalTemperature:(NSNumber<SDLBool> *)externalTemperature vin:(NSNumber<SDLBool> *)vin prndl:(NSNumber<SDLBool> *)prndl tirePressure:(NSNumber<SDLBool> *)tirePressure odometer:(NSNumber<SDLBool> *)odometer beltStatus:(NSNumber<SDLBool> *)beltStatus bodyInformation:(NSNumber<SDLBool> *)bodyInformation deviceStatus:(NSNumber<SDLBool> *)deviceStatus driverBraking:(NSNumber<SDLBool> *)driverBraking wiperStatus:(NSNumber<SDLBool> *)wiperStatus headLampStatus:(NSNumber<SDLBool> *)headLampStatus engineTorque:(NSNumber<SDLBool> *)engineTorque accPedalPosition:(NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLGetVehicleData's initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:vin:wiperStatus: instead");
+
++ (SDLPerformAudioPassThru *)buildPerformAudioPassThruWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate maxDuration:(NSNumber<SDLInt> *)maxDuration bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType muteAudio:(NSNumber<SDLBool> *)muteAudio correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPerformAudioPassThru's initWithInitialPrompt:audioPassThruDisplayText1:audioPassThruDisplayText2:samplingRate:bitsPerSample:audioType:maxDuration:muteAudio: instead");
+
+
+//***** PerformInteraction *****
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialChunks:(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:(nullable NSNumber<SDLInt> *)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPerformInteraction's initWithInitialChunks:initialText:interactionChoiceSetIDList:helpChunks:timeoutChunks:interactionMode:timeout:vrHelp: instead");
+
+//***
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(nullable NSNumber<SDLInt> *)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPerformInteraction's initWithInitialPrompt:initialText:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:interactionMode:timeout:vrHelp: instead");
+
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(NSNumber<SDLInt> *)interactionChoiceSetID vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPerformInteraction's initWithInitialPrompt:initialText:interactionChoiceSetID:vrHelp: instead");
+
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(nullable NSNumber<SDLInt> *)timeout correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPerformInteraction's initWithInitialPrompt:initialText:interactionChoiceSetIDList:helpPrompt:timeoutPrompt:interactionMode:timeout: instead");
+
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(NSNumber<SDLInt> *)interactionChoiceSetID correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPerformInteraction's initWithInitialPrompt:initialText:interactionChoiceSetID: instead");
+//*****
+
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)fileName fileType:(SDLFileType)fileType persistentFile:(NSNumber<SDLBool> *)persistentFile correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLPutFile's initWithFileName:fileType: instead");
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)syncFileName fileType:(SDLFileType)fileType persisistentFile:(NSNumber<SDLBool> *)persistentFile correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use buildPutFileWithFileName:fileType:persistentFile:correlationID: instead");
+
++ (SDLReadDID *)buildReadDIDWithECUName:(NSNumber<SDLInt> *)ecuName didLocation:(NSArray<NSNumber<SDLInt> *> *)didLocation correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLReadDID's initWithECUName:didLocation: instead");
+
+//***** RegisterAppInterface *****
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName ttsName:(nullable NSMutableArray<SDLTTSChunk *> *)ttsName vrSynonyms:(nullable NSMutableArray<NSString *> *)vrSynonyms isMediaApp:(NSNumber<SDLBool> *)isMediaApp languageDesired:(SDLLanguage)languageDesired hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired appID:(NSString *)appID __deprecated_msg("use SDLRegisterAppInterface's initWithAppName:appId:languageDesired:isMediaApp:appType:shortAppName:ttsName:vrSynonyms:hmiDisplayLanguageDesired:resumeHash: instead");
+
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName isMediaApp:(NSNumber<SDLBool> *)isMediaApp languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID __deprecated_msg("use SDLRegisterAppInterface's initWithAppName:appId:lanaugeDesired:isMediaApp:appType:shortAppName: instead");
+
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName languageDesired:(SDLLanguage)laguageDesired appID:(NSString *)appID __deprecated_msg("use SDLRegisterAppInterface's initWithAppName:appId:lanaugeDesired: instead");
+//*****
+
++ (SDLResetGlobalProperties *)buildResetGlobalPropertiesWithProperties:(NSArray<SDLGlobalProperty> *)properties correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLResetGlobalProperties's initWithProperties: instead");
+
++ (SDLSendLocation *)buildSendLocationWithLongitude:(NSNumber<SDLFloat> *)longitude latitude:(NSNumber<SDLFloat> *)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image __deprecated_msg("use SDLSendLocation's initWithLongitude:latitude:locationName:locationDescription:address:phoneNumber:image: instead");
+
++ (SDLScrollableMessage *)buildScrollableMessage:(NSString *)scrollableMessageBody timeout:(NSNumber<SDLInt> *)timeout softButtons:(NSArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLScrollableMessage's initWithMessage:timeout:softButtons: instead");
+
++ (SDLSetAppIcon *)buildSetAppIconWithFileName:(NSString *)syncFileName correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSetAppIcon's initWithFileName: instead");
+
++ (SDLSetDisplayLayout *)buildSetDisplayLayout:(NSString *)displayLayout correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSetAppIcon's initWithLayout: instead");
+
+
+//***** SetGlobalProperties *****
++ (SDLSetGlobalProperties *)buildSetGlobalPropertiesWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText vrHelpTitle:(NSString *)vrHelpTitle vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSetGlobalProperties's initWithHelpText:timeoutText:vrHelpTitle:vrHelp: instead");
+
++ (SDLSetGlobalProperties *)buildSetGlobalPropertiesWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSetGlobalProperties's initWithHelpText:timeoutText: instead");
+//*****
+
+
+//***** SetMediaClockTimer *****
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithHours:(NSNumber<SDLInt> *)hours minutes:(NSNumber<SDLInt> *)minutes seconds:(NSNumber<SDLInt> *)seconds updateMode:(SDLUpdateMode)updateMode correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSetMediaClockTimer's initWithHours:minutes:seconds:updateMode: instead");
+
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithUpdateMode:(SDLUpdateMode)updateMode correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSetMediaClockTimer's initWithUpdateMode: instead");
+//*****
+
+
+//***** Show *****
++ (SDLShow *)buildShowWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 mainField3:(nullable NSString *)mainField3 mainField4:(nullable NSString *)mainField4 statusBar:(nullable NSString *)statusBar mediaClock:(nullable NSString *)mediaClock mediaTrack:(nullable NSString *)mediaTrack alignment:(nullable SDLTextAlignment)textAlignment graphic:(nullable SDLImage *)graphic softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons customPresets:(nullable NSArray<NSString *> *)customPresets correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLShow's initWithMainField1:mainField2:mainField3:mainField4:alignment:statusBar:mediaClock:mediaTrack:graphic:softButtons:customPresets: instead");
+
++ (SDLShow *)buildShowWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 statusBar:(nullable NSString *)statusBar mediaClock:(nullable NSString *)mediaClock mediaTrack:(nullable NSString *)mediaTrack alignment:(nullable SDLTextAlignment)textAlignment correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLShow's initWithMainField1:mainField2:alignment:statusBar:mediaClock:mediaTrack: instead");
+
++ (SDLShow *)buildShowWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 alignment:(nullable SDLTextAlignment)alignment correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLShow's initWithMainField1:mainField2:alignment: instead");
+//*****
+
+
+//***** Slider *****
++ (SDLSlider *)buildSliderDynamicFooterWithNumTicks:(NSNumber<SDLInt> *)numTicks position:(NSNumber<SDLInt> *)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSArray<NSString *> *)sliderFooter timeout:(NSNumber<SDLInt> *)timeout correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSlider's initWithNumTicks:position:sliderHeader:sliderFooter:timeout: instead");
+
++ (SDLSlider *)buildSliderStaticFooterWithNumTicks:(NSNumber<SDLInt> *)numTicks position:(NSNumber<SDLInt> *)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSString *)sliderFooter timeout:(NSNumber<SDLInt> *)timeout correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSlider's initWithNumTicks:position:sliderHeader:sliderFooters:timeout: instead");
+//*****
+
++ (SDLSoftButton *)buildSoftButtonWithType:(SDLSoftButtonType)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonID:(UInt16)buttonID systemAction:(SDLSystemAction)systemAction handler:(SDLRPCNotificationHandler)handler __deprecated_msg("use SDLSoftButton's initWithType:text:image:highlighted:buttonId:systemAction:handler: instead");
+
+//***** Speak *****
++ (SDLSpeak *)buildSpeakWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSpeak's initWithTTSChunks: instead");
+
+//***
++ (SDLSpeak *)buildSpeakWithTTS:(NSString *)ttsText correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSpeak's initWithTTS: instead");
+//*****
+
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use buildSubscribeButtonWithName:handler: with SDLManager instead");
+
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName handler:(SDLRPCNotificationHandler)handler __deprecated_msg("use SDLSubscribeButton's initWithButtonName:handler: instead");
+
++ (SDLSubscribeVehicleData *)buildSubscribeVehicleDataWithGPS:(NSNumber<SDLBool> *)gps speed:(NSNumber<SDLBool> *)speed rpm:(NSNumber<SDLBool> *)rpm fuelLevel:(NSNumber<SDLBool> *)fuelLevel fuelLevelState:(NSNumber<SDLBool> *)fuelLevelState instantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption externalTemperature:(NSNumber<SDLBool> *)externalTemperature prndl:(NSNumber<SDLBool> *)prndl tirePressure:(NSNumber<SDLBool> *)tirePressure odometer:(NSNumber<SDLBool> *)odometer beltStatus:(NSNumber<SDLBool> *)beltStatus bodyInformation:(NSNumber<SDLBool> *)bodyInformation deviceStatus:(NSNumber<SDLBool> *)deviceStatus driverBraking:(NSNumber<SDLBool> *)driverBraking wiperStatus:(NSNumber<SDLBool> *)wiperStatus headLampStatus:(NSNumber<SDLBool> *)headLampStatus engineTorque:(NSNumber<SDLBool> *)engineTorque accPedalPosition:(NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSubscribeVehicleData's initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus: instead");
+
++ (SDLShowConstantTBT *)buildShowConstantTBTWithString:(NSString *)navigationText1 navigationText2:(NSString *)navigationText2 eta:(NSString *)eta timeToDestination:(NSString *)timeToDestination totalDistance:(NSString *)totalDistance turnIcon:(SDLImage *)turnIcon nextTurnIcon:(SDLImage *)nextTurnIcon distanceToManeuver:(NSNumber<SDLFloat> *)distanceToManeuver distanceToManeuverScale:(NSNumber<SDLFloat> *)distanceToManeuverScale maneuverComplete:(NSNumber<SDLFloat> *)maneuverComplete softButtons:(NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLShowConstantTBT's initWithNavigationText1:navigationText2:eta:timeToDestination:totalDistance:turnIcon:nextTurnIcon:distanceToManeuver:distanceToManeuverScale:maneuverComplete:softButtons: instead");
+
++ (SDLUnregisterAppInterface *)buildUnregisterAppInterfaceWithCorrelationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLUnregisterAppInterface's default initializer instead");
+
++ (SDLUnsubscribeButton *)buildUnsubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLUnsubscribeButton's initWithButtonName: instead");
+
++ (SDLUnsubscribeVehicleData *)buildUnsubscribeVehicleDataWithGPS:(NSNumber<SDLBool> *)gps speed:(NSNumber<SDLBool> *)speed rpm:(NSNumber<SDLBool> *)rpm fuelLevel:(NSNumber<SDLBool> *)fuelLevel fuelLevelState:(NSNumber<SDLBool> *)fuelLevelState instantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption externalTemperature:(NSNumber<SDLBool> *)externalTemperature prndl:(NSNumber<SDLBool> *)prndl tirePressure:(NSNumber<SDLBool> *)tirePressure odometer:(NSNumber<SDLBool> *)odometer beltStatus:(NSNumber<SDLBool> *)beltStatus bodyInformation:(NSNumber<SDLBool> *)bodyInformation deviceStatus:(NSNumber<SDLBool> *)deviceStatus driverBraking:(NSNumber<SDLBool> *)driverBraking wiperStatus:(NSNumber<SDLBool> *)wiperStatus headLampStatus:(NSNumber<SDLBool> *)headLampStatus engineTorque:(NSNumber<SDLBool> *)engineTorque accPedalPosition:(NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLSubscribeVehicleData's initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus: instead");
+
++ (SDLUpdateTurnList *)buildUpdateTurnListWithTurnList:(NSMutableArray<SDLTurn *> *)turnList softButtons:(NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID __deprecated_msg("use SDLUpdateTurnList initWithTurnList:softButtons: instead");
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCRequestFactory.m b/SmartDeviceLink/SDLRPCRequestFactory.m
new file mode 100644
index 000000000..eae083a0e
--- /dev/null
+++ b/SmartDeviceLink/SDLRPCRequestFactory.m
@@ -0,0 +1,756 @@
+// SDLRPCRequestFactory.m
+//
+
+#import "SDLRPCRequestFactory.h"
+#import <CoreTelephony/CTCarrier.h>
+#import <CoreTelephony/CTTelephonyNetworkInfo.h>
+#import <UIKit/UIKit.h>
+
+#import "SDLAddCommand.h"
+#import "SDLAddSubMenu.h"
+#import "SDLAlert.h"
+#import "SDLAlertManeuver.h"
+#import "SDLAppHMIType.h"
+#import "SDLAppInfo.h"
+#import "SDLChangeRegistration.h"
+#import "SDLCreateInteractionChoiceSet.h"
+#import "SDLDebugTool.h"
+#import "SDLDeleteCommand.h"
+#import "SDLDeleteFile.h"
+#import "SDLDeleteInteractionChoiceSet.h"
+#import "SDLDeleteSubMenu.h"
+#import "SDLDeviceInfo.h"
+#import "SDLDialNumber.h"
+#import "SDLEndAudioPassThru.h"
+#import "SDLGetDTCs.h"
+#import "SDLGetVehicleData.h"
+#import "SDLImage.h"
+#import "SDLListFiles.h"
+#import "SDLMenuParams.h"
+#import "SDLPerformAudioPassThru.h"
+#import "SDLPerformInteraction.h"
+#import "SDLPutFile.h"
+#import "SDLReadDID.h"
+#import "SDLRegisterAppInterface.h"
+#import "SDLResetGlobalProperties.h"
+#import "SDLScrollableMessage.h"
+#import "SDLSendLocation.h"
+#import "SDLSetAppIcon.h"
+#import "SDLSetDisplayLayout.h"
+#import "SDLSetGlobalProperties.h"
+#import "SDLSetMediaClockTimer.h"
+#import "SDLShow.h"
+#import "SDLShowConstantTBT.h"
+#import "SDLSlider.h"
+#import "SDLSoftButton.h"
+#import "SDLSpeak.h"
+#import "SDLSpeechCapabilities.h"
+#import "SDLStartTime.h"
+#import "SDLSubscribeButton.h"
+#import "SDLSubscribeVehicleData.h"
+#import "SDLSyncMsgVersion.h"
+#import "SDLTTSChunk.h"
+#import "SDLTTSChunkFactory.h"
+#import "SDLUnregisterAppInterface.h"
+#import "SDLUnsubscribeButton.h"
+#import "SDLUnsubscribeVehicleData.h"
+#import "SDLUpdateTurnList.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+static NSString *const SDLBundleShortVersionStringKey = @"CFBundleShortVersionString";
+
+@implementation SDLRPCRequestFactory
+
+//***** AddCommand *****
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName parentID:(nullable NSNumber<SDLInt> *)parentID position:(nullable NSNumber<SDLInt> *)position vrCommands:(nullable NSArray<NSString *> *)vrCommands iconValue:(nullable NSString *)iconValue iconType:(nullable SDLImageType)iconType correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLAddCommand *msg = [[SDLAddCommand alloc] init];
+
+ msg.cmdID = cmdID;
+
+ if (menuName != nil) {
+ SDLMenuParams *menuParams = [[SDLMenuParams alloc] init];
+ menuParams.menuName = menuName;
+ menuParams.parentID = parentID;
+ menuParams.position = position;
+ msg.menuParams = menuParams;
+ }
+ msg.vrCommands = [vrCommands mutableCopy];
+
+ if (iconValue != nil && iconType != nil) {
+ SDLImage *icon = [[SDLImage alloc] init];
+ icon.value = iconValue;
+ icon.imageType = iconType;
+ msg.cmdIcon = icon;
+ }
+
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName parentID:(nullable NSNumber<SDLInt> *)parentID position:(nullable NSNumber<SDLInt> *)position vrCommands:(nullable NSArray<NSString *> *)vrCommands iconValue:(nullable NSString *)iconValue iconType:(nullable SDLImageType)iconType handler:(SDLRPCNotificationHandler)handler {
+ SDLAddCommand *msg = [[SDLAddCommand alloc] initWithHandler:handler];
+
+ msg.cmdID = cmdID;
+
+ if (menuName != nil) {
+ SDLMenuParams *menuParams = [[SDLMenuParams alloc] init];
+ menuParams.menuName = menuName;
+ menuParams.parentID = parentID;
+ menuParams.position = position;
+ msg.menuParams = menuParams;
+ }
+ msg.vrCommands = [vrCommands mutableCopy];
+
+ if (iconValue != nil && iconType != nil) {
+ SDLImage *icon = [[SDLImage alloc] init];
+ icon.value = iconValue;
+ icon.imageType = iconType;
+ msg.cmdIcon = icon;
+ }
+
+ return msg;
+}
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName vrCommands:(nullable NSArray<NSString *> *)vrCommands correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAddCommandWithID:cmdID menuName:menuName parentID:nil position:nil vrCommands:vrCommands iconValue:nil iconType:nil correlationID:correlationID];
+}
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID menuName:(nullable NSString *)menuName vrCommands:(nullable NSArray<NSString *> *)vrCommands handler:(SDLRPCNotificationHandler)handler {
+ return [SDLRPCRequestFactory buildAddCommandWithID:cmdID menuName:menuName parentID:nil position:nil vrCommands:vrCommands iconValue:nil iconType:nil handler:handler];
+}
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID vrCommands:(nullable NSArray<NSString *> *)vrCommands correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAddCommandWithID:cmdID menuName:nil vrCommands:vrCommands correlationID:correlationID];
+}
+
++ (SDLAddCommand *)buildAddCommandWithID:(NSNumber<SDLInt> *)cmdID vrCommands:(nullable NSArray<NSString *> *)vrCommands handler:(SDLRPCNotificationHandler)handler {
+ return [SDLRPCRequestFactory buildAddCommandWithID:cmdID menuName:nil vrCommands:vrCommands handler:handler];
+}
+//*****
+
+
+//***** AddSubMenu *****
++ (SDLAddSubMenu *)buildAddSubMenuWithID:(NSNumber<SDLInt> *)menuID menuName:(NSString *)menuName position:(nullable NSNumber<SDLInt> *)position correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLAddSubMenu *msg = [[SDLAddSubMenu alloc] init];
+ msg.correlationID = correlationID;
+ msg.menuID = menuID;
+ msg.menuName = menuName;
+ msg.position = position;
+ return msg;
+}
+
++ (SDLAddSubMenu *)buildAddSubMenuWithID:(NSNumber<SDLInt> *)menuID menuName:(NSString *)menuName correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAddSubMenuWithID:menuID menuName:menuName position:nil correlationID:correlationID];
+}
+//*****
+
+
+//***** Alert *****
++ (SDLAlert *)buildAlertWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(nullable NSNumber<SDLBool> *)playTone duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLTTSChunk *simpleChunk = [[SDLTTSChunk alloc] init];
+ simpleChunk.text = ttsText;
+ simpleChunk.type = SDLSpeechCapabilitiesText;
+ NSArray<SDLTTSChunk *> *ttsChunks = [NSArray arrayWithObject:simpleChunk];
+
+ return [SDLRPCRequestFactory buildAlertWithTTSChunks:ttsChunks alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:playTone duration:duration softButtons:nil correlationID:correlationID];
+}
+
++ (SDLAlert *)buildAlertWithTTS:(nullable NSString *)ttsText alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 playTone:(nullable NSNumber<SDLBool> *)playTone duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAlertWithTTS:ttsText alertText1:alertText1 alertText2:alertText2 alertText3:nil playTone:playTone duration:duration correlationID:correlationID];
+}
+
++ (SDLAlert *)buildAlertWithTTS:(nullable NSString *)ttsText playTone:(nullable NSNumber<SDLBool> *)playTone correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAlertWithTTS:ttsText alertText1:nil alertText2:nil alertText3:nil playTone:playTone duration:nil correlationID:correlationID];
+}
+
+//***
++ (SDLAlert *)buildAlertWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks alertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 playTone:(nullable NSNumber<SDLBool> *)playTone duration:(nullable NSNumber<SDLInt> *)duration softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLAlert *msg = [[SDLAlert alloc] init];
+ msg.correlationID = correlationID;
+ msg.alertText1 = alertText1;
+ msg.alertText2 = alertText2;
+ msg.alertText3 = alertText3;
+ msg.ttsChunks = [ttsChunks mutableCopy];
+ msg.playTone = playTone;
+ msg.duration = duration;
+ msg.softButtons = [softButtons mutableCopy];
+ return msg;
+}
+
++ (SDLAlert *)buildAlertWithTTSChunks:(nullable NSArray<SDLTTSChunk *> *)ttsChunks playTone:(nullable NSNumber<SDLBool> *)playTone correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAlertWithTTSChunks:ttsChunks alertText1:nil alertText2:nil alertText3:nil playTone:playTone duration:nil softButtons:nil correlationID:correlationID];
+}
+
+//***
++ (SDLAlert *)buildAlertWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(nullable NSNumber<SDLInt> *)duration softButtons:(nullable NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAlertWithTTSChunks:nil alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:nil duration:duration softButtons:softButtons correlationID:correlationID];
+}
+
++ (SDLAlert *)buildAlertWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 alertText3:(nullable NSString *)alertText3 duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAlertWithTTSChunks:nil alertText1:alertText1 alertText2:alertText2 alertText3:alertText3 playTone:nil duration:duration softButtons:nil correlationID:correlationID];
+}
+
++ (SDLAlert *)buildAlertWithAlertText1:(nullable NSString *)alertText1 alertText2:(nullable NSString *)alertText2 duration:(nullable NSNumber<SDLInt> *)duration correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildAlertWithTTSChunks:nil alertText1:alertText1 alertText2:alertText2 alertText3:nil playTone:nil duration:duration softButtons:nil correlationID:correlationID];
+}
+//*****
+
+
++ (SDLAlertManeuver *)buildAlertManeuverwithTTSchunks:(NSMutableArray<SDLTTSChunk *> *)ttsChunks softButtons:(NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLAlertManeuver *msg = [[SDLAlertManeuver alloc] init];
+ msg.ttsChunks = ttsChunks;
+ msg.softButtons = softButtons;
+ msg.correlationID = correlationID;
+ return msg;
+}
+
++ (SDLChangeRegistration *)buildChangeRegistrationWithLanguage:(SDLLanguage)language hmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLChangeRegistration *msg = [[SDLChangeRegistration alloc] init];
+ msg.language = language;
+ msg.hmiDisplayLanguage = hmiDisplayLanguage;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLCreateInteractionChoiceSet *)buildCreateInteractionChoiceSetWithID:(NSNumber<SDLInt> *)interactionChoiceSetID choiceSet:(NSArray<SDLChoice *> *)choices correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLCreateInteractionChoiceSet *msg = [[SDLCreateInteractionChoiceSet alloc] init];
+ msg.interactionChoiceSetID = interactionChoiceSetID;
+ msg.choiceSet = [choices mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLDeleteCommand *)buildDeleteCommandWithID:(NSNumber<SDLInt> *)cmdID correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLDeleteCommand *msg = [[SDLDeleteCommand alloc] init];
+ msg.cmdID = cmdID;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLDeleteFile *)buildDeleteFileWithName:(NSString *)syncFileName correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLDeleteFile *msg = [[SDLDeleteFile alloc] init];
+ msg.syncFileName = syncFileName;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLDialNumber *)buildDialNumberWithNumber:(NSString *)phoneNumber {
+ SDLDialNumber *msg = [[SDLDialNumber alloc] init];
+ msg.number = phoneNumber;
+
+ return msg;
+}
+
++ (SDLListFiles *)buildListFilesWithCorrelationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLListFiles *msg = [[SDLListFiles alloc] init];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLDeleteInteractionChoiceSet *)buildDeleteInteractionChoiceSetWithID:(NSNumber<SDLInt> *)interactionChoiceSetID correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLDeleteInteractionChoiceSet *msg = [[SDLDeleteInteractionChoiceSet alloc] init];
+ msg.interactionChoiceSetID = interactionChoiceSetID;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLDeleteSubMenu *)buildDeleteSubMenuWithID:(NSNumber<SDLInt> *)menuID correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLDeleteSubMenu *msg = [[SDLDeleteSubMenu alloc] init];
+ msg.menuID = menuID;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLEndAudioPassThru *)buildEndAudioPassThruWithCorrelationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLEndAudioPassThru *msg = [[SDLEndAudioPassThru alloc] init];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLGetDTCs *)buildGetDTCsWithECUName:(NSNumber<SDLInt> *)ecuName correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLGetDTCs *msg = [[SDLGetDTCs alloc] init];
+ msg.ecuName = ecuName;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLGetVehicleData *)buildGetVehicleDataWithGPS:(NSNumber<SDLBool> *)gps speed:(NSNumber<SDLBool> *)speed rpm:(NSNumber<SDLBool> *)rpm fuelLevel:(NSNumber<SDLBool> *)fuelLevel fuelLevelState:(NSNumber<SDLBool> *)fuelLevelState instantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption externalTemperature:(NSNumber<SDLBool> *)externalTemperature vin:(NSNumber<SDLBool> *)vin prndl:(NSNumber<SDLBool> *)prndl tirePressure:(NSNumber<SDLBool> *)tirePressure odometer:(NSNumber<SDLBool> *)odometer beltStatus:(NSNumber<SDLBool> *)beltStatus bodyInformation:(NSNumber<SDLBool> *)bodyInformation deviceStatus:(NSNumber<SDLBool> *)deviceStatus driverBraking:(NSNumber<SDLBool> *)driverBraking wiperStatus:(NSNumber<SDLBool> *)wiperStatus headLampStatus:(NSNumber<SDLBool> *)headLampStatus engineTorque:(NSNumber<SDLBool> *)engineTorque accPedalPosition:(NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLGetVehicleData *msg = [[SDLGetVehicleData alloc] init];
+ msg.gps = gps;
+ msg.speed = speed;
+ msg.rpm = rpm;
+ msg.fuelLevel = fuelLevel;
+ msg.fuelLevel_State = fuelLevelState;
+ msg.instantFuelConsumption = instantFuelConsumption;
+ msg.externalTemperature = externalTemperature;
+ msg.vin = vin;
+ msg.prndl = prndl;
+ msg.tirePressure = tirePressure;
+ msg.odometer = odometer;
+ msg.beltStatus = beltStatus;
+ msg.bodyInformation = bodyInformation;
+ msg.deviceStatus = deviceStatus;
+ msg.driverBraking = driverBraking;
+ msg.wiperStatus = wiperStatus;
+ msg.headLampStatus = headLampStatus;
+ msg.engineTorque = engineTorque;
+ msg.accPedalPosition = accPedalPosition;
+ msg.steeringWheelAngle = steeringWheelAngle;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLPerformAudioPassThru *)buildPerformAudioPassThruWithInitialPrompt:(NSString *)initialPrompt audioPassThruDisplayText1:(NSString *)audioPassThruDisplayText1 audioPassThruDisplayText2:(NSString *)audioPassThruDisplayText2 samplingRate:(SDLSamplingRate)samplingRate maxDuration:(NSNumber<SDLInt> *)maxDuration bitsPerSample:(SDLBitsPerSample)bitsPerSample audioType:(SDLAudioType)audioType muteAudio:(NSNumber<SDLBool> *)muteAudio correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ NSArray<SDLTTSChunk *> *initialChunks = [SDLTTSChunk textChunksFromString:initialPrompt];
+
+ SDLPerformAudioPassThru *msg = [[SDLPerformAudioPassThru alloc] init];
+ msg.initialPrompt = [initialChunks mutableCopy];
+ msg.audioPassThruDisplayText1 = audioPassThruDisplayText1;
+ msg.audioPassThruDisplayText2 = audioPassThruDisplayText2;
+ msg.samplingRate = samplingRate;
+ msg.maxDuration = maxDuration;
+ msg.bitsPerSample = bitsPerSample;
+ msg.audioType = audioType;
+ msg.muteAudio = muteAudio;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
+
+//***** PerformInteraction *****
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialChunks:(nullable NSArray<SDLTTSChunk *> *)initialChunks initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber *> *)interactionChoiceSetIDList helpChunks:(nullable NSArray<SDLTTSChunk *> *)helpChunks timeoutChunks:(nullable NSArray<SDLTTSChunk *> *)timeoutChunks interactionMode:(SDLInteractionMode)interactionMode timeout:(nullable NSNumber<SDLInt> *)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLPerformInteraction *msg = [[SDLPerformInteraction alloc] init];
+ msg.initialPrompt = [initialChunks mutableCopy];
+ msg.initialText = initialText;
+ msg.interactionChoiceSetIDList = [interactionChoiceSetIDList mutableCopy];
+ msg.helpPrompt = [helpChunks mutableCopy];
+ msg.timeoutPrompt = [timeoutChunks mutableCopy];
+ msg.interactionMode = interactionMode;
+ msg.timeout = timeout;
+ msg.vrHelp = [vrHelp mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
+//***
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(nullable NSNumber<SDLInt> *)timeout vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ NSArray<SDLTTSChunk *> *initialChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:initialPrompt];
+ NSArray<SDLTTSChunk *> *helpChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:helpPrompt];
+ NSArray<SDLTTSChunk *> *timeoutChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:timeoutPrompt];
+
+ return [SDLRPCRequestFactory buildPerformInteractionWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:helpChunks timeoutChunks:timeoutChunks interactionMode:interactionMode timeout:timeout vrHelp:vrHelp correlationID:correlationID];
+}
+
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(NSNumber<SDLInt> *)interactionChoiceSetID vrHelp:(nullable NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ NSArray<NSNumber *> *interactionChoiceSetIDList = [NSArray arrayWithObject:interactionChoiceSetID];
+ NSArray<SDLTTSChunk *> *initialChunks = [SDLTTSChunkFactory buildTTSChunksFromSimple:initialPrompt];
+
+ return [SDLRPCRequestFactory buildPerformInteractionWithInitialChunks:initialChunks initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpChunks:nil timeoutChunks:nil interactionMode:SDLInteractionModeBoth timeout:nil vrHelp:vrHelp correlationID:correlationID];
+}
+
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetIDList:(NSArray<NSNumber *> *)interactionChoiceSetIDList helpPrompt:(nullable NSString *)helpPrompt timeoutPrompt:(nullable NSString *)timeoutPrompt interactionMode:(SDLInteractionMode)interactionMode timeout:(nullable NSNumber<SDLInt> *)timeout correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildPerformInteractionWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetIDList:interactionChoiceSetIDList helpPrompt:helpPrompt timeoutPrompt:timeoutPrompt interactionMode:interactionMode timeout:timeout vrHelp:nil correlationID:correlationID];
+}
+
++ (SDLPerformInteraction *)buildPerformInteractionWithInitialPrompt:(nullable NSString *)initialPrompt initialText:(NSString *)initialText interactionChoiceSetID:(NSNumber<SDLInt> *)interactionChoiceSetID correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildPerformInteractionWithInitialPrompt:initialPrompt initialText:initialText interactionChoiceSetID:interactionChoiceSetID vrHelp:nil correlationID:correlationID];
+}
+//*****
+
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)fileName fileType:(SDLFileType)fileType persistentFile:(NSNumber<SDLBool> *)persistentFile correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLPutFile *msg = [[SDLPutFile alloc] init];
+ msg.syncFileName = fileName;
+
+ msg.fileType = fileType;
+ msg.persistentFile = persistentFile;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLPutFile *)buildPutFileWithFileName:(NSString *)syncFileName fileType:(SDLFileType)fileType persisistentFile:(NSNumber<SDLBool> *)persistentFile correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [self buildPutFileWithFileName:syncFileName fileType:fileType persistentFile:persistentFile correlationID:correlationID];
+}
+
++ (SDLReadDID *)buildReadDIDWithECUName:(NSNumber<SDLInt> *)ecuName didLocation:(NSArray<NSNumber *> *)didLocation correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLReadDID *msg = [[SDLReadDID alloc] init];
+ msg.ecuName = ecuName;
+ msg.didLocation = [didLocation mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
+//***** RegisterAppInterface *****
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName ttsName:(nullable NSArray<SDLTTSChunk *> *)ttsName vrSynonyms:(nullable NSArray<NSString *> *)vrSynonyms isMediaApp:(NSNumber<SDLFloat> *)isMediaApp languageDesired:(SDLLanguage)languageDesired hmiDisplayLanguageDesired:(SDLLanguage)hmiDisplayLanguageDesired appID:(NSString *)appID {
+ SDLRegisterAppInterface *msg = [[SDLRegisterAppInterface alloc] init];
+ SDLSyncMsgVersion *version = [[SDLSyncMsgVersion alloc] init];
+ version.majorVersion = [NSNumber numberWithInt:1];
+ version.minorVersion = [NSNumber numberWithInt:0];
+ msg.syncMsgVersion = version;
+ msg.appName = appName;
+ msg.ttsName = [ttsName mutableCopy];
+ msg.ngnMediaScreenAppName = appName;
+ msg.vrSynonyms = [vrSynonyms mutableCopy];
+ msg.isMediaApplication = isMediaApp;
+ msg.languageDesired = languageDesired;
+ msg.hmiDisplayLanguageDesired = hmiDisplayLanguageDesired;
+ msg.appID = appID;
+ msg.deviceInfo = [self sdl_buildDeviceInfo];
+ msg.correlationID = [NSNumber numberWithInt:1];
+ SDLAppInfo *appInfo = [self sdl_buildAppInfo];
+ appInfo.appDisplayName = appName;
+ msg.appInfo = appInfo;
+ return msg;
+}
+
++ (SDLDeviceInfo *)sdl_buildDeviceInfo {
+ SDLDeviceInfo *deviceInfo = [[SDLDeviceInfo alloc] init];
+ deviceInfo.hardware = [UIDevice currentDevice].model;
+ deviceInfo.os = [UIDevice currentDevice].systemName;
+ deviceInfo.osVersion = [UIDevice currentDevice].systemVersion;
+ CTTelephonyNetworkInfo *netinfo = [[CTTelephonyNetworkInfo alloc] init];
+ CTCarrier *carrier = netinfo.subscriberCellularProvider;
+ NSString *carrierName = carrier.carrierName;
+ deviceInfo.carrier = carrierName;
+
+ return deviceInfo;
+}
+
++ (SDLAppInfo *)sdl_buildAppInfo {
+ SDLAppInfo *appInfo = [[SDLAppInfo alloc] init];
+ NSBundle *mainBundle = [NSBundle mainBundle];
+ NSDictionary *bundleDictionary = mainBundle.infoDictionary;
+ appInfo.appVersion = bundleDictionary[SDLBundleShortVersionStringKey];
+ appInfo.appBundleID = mainBundle.bundleIdentifier;
+ return appInfo;
+}
+
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName isMediaApp:(NSNumber<SDLFloat> *)isMediaApp languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID {
+ NSMutableArray<NSString *> *syns = [NSMutableArray arrayWithObject:appName];
+ return [SDLRPCRequestFactory buildRegisterAppInterfaceWithAppName:appName ttsName:nil vrSynonyms:syns isMediaApp:isMediaApp languageDesired:languageDesired hmiDisplayLanguageDesired:languageDesired appID:appID];
+}
+
++ (SDLRegisterAppInterface *)buildRegisterAppInterfaceWithAppName:(NSString *)appName languageDesired:(SDLLanguage)languageDesired appID:(NSString *)appID {
+ return [SDLRPCRequestFactory buildRegisterAppInterfaceWithAppName:appName isMediaApp:@NO languageDesired:languageDesired appID:appID];
+}
+//*****
+
+
++ (SDLResetGlobalProperties *)buildResetGlobalPropertiesWithProperties:(NSArray<SDLGlobalProperty> *)properties correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLResetGlobalProperties *msg = [[SDLResetGlobalProperties alloc] init];
+ msg.properties = [properties mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLScrollableMessage *)buildScrollableMessage:(NSString *)scrollableMessageBody timeout:(NSNumber<SDLInt> *)timeout softButtons:(NSArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLScrollableMessage *msg = [[SDLScrollableMessage alloc] init];
+ msg.scrollableMessageBody = scrollableMessageBody;
+ msg.timeout = timeout;
+ msg.softButtons = [softButtons mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLSendLocation *)buildSendLocationWithLongitude:(NSNumber<SDLFloat> *)longitude latitude:(NSNumber<SDLFloat> *)latitude locationName:(NSString *)locationName locationDescription:(NSString *)locationDescription address:(NSArray<NSString *> *)address phoneNumber:(NSString *)phoneNumber image:(SDLImage *)image {
+ SDLSendLocation *msg = [[SDLSendLocation alloc] init];
+ msg.longitudeDegrees = longitude;
+ msg.latitudeDegrees = latitude;
+ msg.locationName = locationName;
+ msg.locationDescription = locationDescription;
+ msg.addressLines = address;
+ msg.phoneNumber = phoneNumber;
+ msg.locationImage = image;
+
+ return msg;
+}
+
++ (SDLSetAppIcon *)buildSetAppIconWithFileName:(NSString *)syncFileName correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSetAppIcon *msg = [[SDLSetAppIcon alloc] init];
+ msg.syncFileName = syncFileName;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLSetDisplayLayout *)buildSetDisplayLayout:(NSString *)displayLayout correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSetDisplayLayout *msg = [[SDLSetDisplayLayout alloc] init];
+ msg.displayLayout = displayLayout;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
+
+//***** SetGlobalProperties *****
++ (SDLSetGlobalProperties *)buildSetGlobalPropertiesWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText vrHelpTitle:(NSString *)vrHelpTitle vrHelp:(NSArray<SDLVRHelpItem *> *)vrHelp correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSetGlobalProperties *msg = [[SDLSetGlobalProperties alloc] init];
+ msg.helpPrompt = [SDLTTSChunk textChunksFromString:helpText];
+ msg.timeoutPrompt = [SDLTTSChunk textChunksFromString:timeoutText];
+ msg.vrHelpTitle = vrHelpTitle;
+ msg.vrHelp = [vrHelp mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLSetGlobalProperties *)buildSetGlobalPropertiesWithHelpText:(NSString *)helpText timeoutText:(NSString *)timeoutText correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSetGlobalProperties *msg = [[SDLSetGlobalProperties alloc] init];
+ msg.helpPrompt = [SDLTTSChunk textChunksFromString:helpText];
+ msg.timeoutPrompt = [SDLTTSChunk textChunksFromString:timeoutText];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+//*****
+
+
+//***** SetMediaClockTimer *****
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithHours:(NSNumber<SDLInt> *)hours minutes:(NSNumber<SDLInt> *)minutes seconds:(NSNumber<SDLInt> *)seconds updateMode:(SDLUpdateMode)updateMode correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSetMediaClockTimer *msg = [[SDLSetMediaClockTimer alloc] init];
+ SDLStartTime *startTime = [[SDLStartTime alloc] init];
+ startTime.hours = hours;
+ startTime.minutes = minutes;
+ startTime.seconds = seconds;
+ msg.startTime = startTime;
+ msg.updateMode = updateMode;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLSetMediaClockTimer *)buildSetMediaClockTimerWithUpdateMode:(SDLUpdateMode)updateMode correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSetMediaClockTimer *msg = [[SDLSetMediaClockTimer alloc] init];
+ msg.updateMode = updateMode;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+//*****
+
+
+//***** Show *****
++ (SDLShow *)buildShowWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 mainField3:(nullable NSString *)mainField3 mainField4:(nullable NSString *)mainField4 statusBar:(nullable NSString *)statusBar mediaClock:(nullable NSString *)mediaClock mediaTrack:(nullable NSString *)mediaTrack alignment:(nullable SDLTextAlignment)textAlignment graphic:(nullable SDLImage *)graphic softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons customPresets:(nullable NSArray<NSString *> *)customPresets correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLShow *msg = [[SDLShow alloc] init];
+ msg.correlationID = correlationID;
+ msg.mainField1 = mainField1;
+ msg.mainField2 = mainField2;
+ msg.mainField3 = mainField3;
+ msg.mainField4 = mainField4;
+ msg.statusBar = statusBar;
+ msg.mediaClock = mediaClock;
+ msg.mediaTrack = mediaTrack;
+ msg.alignment = textAlignment;
+ msg.graphic = graphic;
+ msg.softButtons = [softButtons mutableCopy];
+ msg.customPresets = [customPresets mutableCopy];
+
+ return msg;
+}
+
++ (SDLShow *)buildShowWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 statusBar:(nullable NSString *)statusBar mediaClock:(nullable NSString *)mediaClock mediaTrack:(nullable NSString *)mediaTrack alignment:(nullable SDLTextAlignment)textAlignment correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLShow *msg = [[SDLShow alloc] init];
+ msg.correlationID = correlationID;
+ msg.mainField1 = mainField1;
+ msg.mainField2 = mainField2;
+ msg.statusBar = statusBar;
+ msg.mediaClock = mediaClock;
+ msg.mediaTrack = mediaTrack;
+ msg.alignment = textAlignment;
+
+ return msg;
+}
+
++ (SDLShow *)buildShowWithMainField1:(nullable NSString *)mainField1 mainField2:(nullable NSString *)mainField2 alignment:(nullable SDLTextAlignment)alignment correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ return [SDLRPCRequestFactory buildShowWithMainField1:mainField1 mainField2:mainField2 statusBar:nil mediaClock:nil mediaTrack:nil alignment:alignment correlationID:correlationID];
+}
+
++ (SDLShowConstantTBT *)buildShowConstantTBTWithString:(NSString *)navigationText1 navigationText2:(NSString *)navigationText2 eta:(NSString *)eta timeToDestination:(NSString *)timeToDestination totalDistance:(NSString *)totalDistance turnIcon:(SDLImage *)turnIcon nextTurnIcon:(SDLImage *)nextTurnIcon distanceToManeuver:(NSNumber<SDLFloat> *)distanceToManeuver distanceToManeuverScale:(NSNumber<SDLFloat> *)distanceToManeuverScale maneuverComplete:(NSNumber<SDLBool> *)maneuverComplete softButtons:(NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLShowConstantTBT *msg = [[SDLShowConstantTBT alloc] init];
+ msg.navigationText1 = navigationText1;
+ msg.navigationText2 = navigationText2;
+ msg.eta = eta;
+ msg.timeToDestination = timeToDestination;
+ msg.totalDistance = totalDistance;
+ msg.turnIcon = turnIcon;
+ msg.nextTurnIcon = nextTurnIcon;
+ msg.distanceToManeuver = distanceToManeuver;
+ msg.distanceToManeuverScale = distanceToManeuverScale;
+ msg.maneuverComplete = maneuverComplete;
+ msg.softButtons = [softButtons mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+//*****
+
+
+//***** Slider *****
++ (SDLSlider *)buildSliderDynamicFooterWithNumTicks:(NSNumber<SDLInt> *)numTicks position:(NSNumber<SDLInt> *)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSArray<NSString *> *)sliderFooter timeout:(NSNumber<SDLInt> *)timeout correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSlider *msg = [[SDLSlider alloc] init];
+ msg.correlationID = correlationID;
+ msg.numTicks = numTicks;
+ msg.position = position;
+ msg.sliderHeader = sliderHeader;
+ msg.sliderFooter = [sliderFooter mutableCopy];
+ msg.timeout = timeout;
+
+ return msg;
+}
+
++ (SDLSlider *)buildSliderStaticFooterWithNumTicks:(NSNumber<SDLInt> *)numTicks position:(NSNumber<SDLInt> *)position sliderHeader:(NSString *)sliderHeader sliderFooter:(NSString *)sliderFooter timeout:(NSNumber<SDLInt> *)timeout correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ NSArray<NSString *> *sliderFooters = [NSArray arrayWithObject:sliderFooter];
+
+ // Populates array with the same footer value for each position
+ for (UInt32 i = 1; i < numTicks.unsignedIntegerValue; i++) {
+ sliderFooters = [sliderFooters arrayByAddingObject:sliderFooter];
+ }
+
+ return [SDLRPCRequestFactory buildSliderDynamicFooterWithNumTicks:numTicks position:position sliderHeader:sliderHeader sliderFooter:sliderFooters timeout:timeout correlationID:correlationID];
+}
+//*****
+
++ (SDLSoftButton *)buildSoftButtonWithType:(SDLSoftButtonType)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonID:(UInt16)buttonID systemAction:(SDLSystemAction)systemAction handler:(SDLRPCNotificationHandler)handler {
+ SDLSoftButton *button = [[SDLSoftButton alloc] initWithHandler:handler];
+ button.type = type;
+ button.text = text;
+ button.image = image;
+ button.isHighlighted = @(highlighted);
+ button.softButtonID = @(buttonID);
+ button.systemAction = systemAction;
+
+ return button;
+}
+
+
+//***** Speak *****
++ (SDLSpeak *)buildSpeakWithTTSChunks:(NSArray<SDLTTSChunk *> *)ttsChunks correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSpeak *msg = [[SDLSpeak alloc] init];
+ msg.correlationID = correlationID;
+ msg.ttsChunks = [ttsChunks mutableCopy];
+
+ return msg;
+}
+
+//***
++ (SDLSpeak *)buildSpeakWithTTS:(NSString *)ttsText correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLTTSChunk *simpleChunk = [[SDLTTSChunk alloc] init];
+ simpleChunk.text = ttsText;
+ simpleChunk.type = SDLSpeechCapabilitiesText;
+ NSArray<SDLTTSChunk *> *ttsChunks = [NSMutableArray arrayWithObject:simpleChunk];
+
+ return [SDLRPCRequestFactory buildSpeakWithTTSChunks:ttsChunks correlationID:correlationID];
+}
+//*****
+
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSubscribeButton *msg = [[SDLSubscribeButton alloc] init];
+ msg.buttonName = buttonName;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLSubscribeButton *)buildSubscribeButtonWithName:(SDLButtonName)buttonName handler:(SDLRPCNotificationHandler)handler {
+ SDLSubscribeButton *msg = [[SDLSubscribeButton alloc] initWithHandler:handler];
+ msg.buttonName = buttonName;
+
+ return msg;
+}
+
++ (SDLSubscribeVehicleData *)buildSubscribeVehicleDataWithGPS:(NSNumber<SDLBool> *)gps speed:(NSNumber<SDLBool> *)speed rpm:(NSNumber<SDLBool> *)rpm fuelLevel:(NSNumber<SDLBool> *)fuelLevel fuelLevelState:(NSNumber<SDLBool> *)fuelLevelState instantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption externalTemperature:(NSNumber<SDLBool> *)externalTemperature prndl:(NSNumber<SDLBool> *)prndl tirePressure:(NSNumber<SDLBool> *)tirePressure odometer:(NSNumber<SDLBool> *)odometer beltStatus:(NSNumber<SDLBool> *)beltStatus bodyInformation:(NSNumber<SDLBool> *)bodyInformation deviceStatus:(NSNumber<SDLBool> *)deviceStatus driverBraking:(NSNumber<SDLBool> *)driverBraking wiperStatus:(NSNumber<SDLBool> *)wiperStatus headLampStatus:(NSNumber<SDLBool> *)headLampStatus engineTorque:(NSNumber<SDLBool> *)engineTorque accPedalPosition:(NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLSubscribeVehicleData *msg = [[SDLSubscribeVehicleData alloc] init];
+ msg.gps = gps;
+ msg.speed = speed;
+ msg.rpm = rpm;
+ msg.fuelLevel = fuelLevel;
+ msg.fuelLevel_State = fuelLevelState;
+ msg.instantFuelConsumption = instantFuelConsumption;
+ msg.externalTemperature = externalTemperature;
+ msg.prndl = prndl;
+ msg.tirePressure = tirePressure;
+ msg.odometer = odometer;
+ msg.beltStatus = beltStatus;
+ msg.bodyInformation = bodyInformation;
+ msg.deviceStatus = deviceStatus;
+ msg.driverBraking = driverBraking;
+ msg.wiperStatus = wiperStatus;
+ msg.headLampStatus = headLampStatus;
+ msg.engineTorque = engineTorque;
+ msg.accPedalPosition = accPedalPosition;
+ msg.steeringWheelAngle = steeringWheelAngle;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLUnregisterAppInterface *)buildUnregisterAppInterfaceWithCorrelationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLUnregisterAppInterface *msg = [[SDLUnregisterAppInterface alloc] init];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLUnsubscribeButton *)buildUnsubscribeButtonWithName:(SDLButtonName)buttonName correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLUnsubscribeButton *msg = [[SDLUnsubscribeButton alloc] init];
+ msg.buttonName = buttonName;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLUnsubscribeVehicleData *)buildUnsubscribeVehicleDataWithGPS:(NSNumber<SDLBool> *)gps speed:(NSNumber<SDLBool> *)speed rpm:(NSNumber<SDLBool> *)rpm fuelLevel:(NSNumber<SDLBool> *)fuelLevel fuelLevelState:(NSNumber<SDLBool> *)fuelLevelState instantFuelConsumption:(NSNumber<SDLBool> *)instantFuelConsumption externalTemperature:(NSNumber<SDLBool> *)externalTemperature prndl:(NSNumber<SDLBool> *)prndl tirePressure:(NSNumber<SDLBool> *)tirePressure odometer:(NSNumber<SDLBool> *)odometer beltStatus:(NSNumber<SDLBool> *)beltStatus bodyInformation:(NSNumber<SDLBool> *)bodyInformation deviceStatus:(NSNumber<SDLBool> *)deviceStatus driverBraking:(NSNumber<SDLBool> *)driverBraking wiperStatus:(NSNumber<SDLBool> *)wiperStatus headLampStatus:(NSNumber<SDLBool> *)headLampStatus engineTorque:(NSNumber<SDLBool> *)engineTorque accPedalPosition:(NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(NSNumber<SDLBool> *)steeringWheelAngle correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLUnsubscribeVehicleData *msg = [[SDLUnsubscribeVehicleData alloc] init];
+ msg.gps = gps;
+ msg.speed = speed;
+ msg.rpm = rpm;
+ msg.fuelLevel = fuelLevel;
+ msg.fuelLevel_State = fuelLevelState;
+ msg.instantFuelConsumption = instantFuelConsumption;
+ msg.externalTemperature = externalTemperature;
+ msg.prndl = prndl;
+ msg.tirePressure = tirePressure;
+ msg.odometer = odometer;
+ msg.beltStatus = beltStatus;
+ msg.bodyInformation = bodyInformation;
+ msg.deviceStatus = deviceStatus;
+ msg.driverBraking = driverBraking;
+ msg.wiperStatus = wiperStatus;
+ msg.headLampStatus = headLampStatus;
+ msg.engineTorque = engineTorque;
+ msg.accPedalPosition = accPedalPosition;
+ msg.steeringWheelAngle = steeringWheelAngle;
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
++ (SDLUpdateTurnList *)buildUpdateTurnListWithTurnList:(NSMutableArray<SDLTurn *> *)turnList softButtons:(NSMutableArray<SDLSoftButton *> *)softButtons correlationID:(nullable NSNumber<SDLInt> *)correlationID {
+ SDLUpdateTurnList *msg = [[SDLUpdateTurnList alloc] init];
+ msg.turnList = [turnList mutableCopy];
+ msg.softButtons = [softButtons mutableCopy];
+ msg.correlationID = correlationID;
+
+ return msg;
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCResponse.h b/SmartDeviceLink/SDLRPCResponse.h
index d952c6229..270217e4a 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, nonatomic) NSNumber<SDLInt> *correlationID;
@property (strong, nonatomic) NSNumber<SDLBool> *success;
@property (strong, nonatomic) SDLResult resultCode;
-@property (strong, nonatomic) NSString *info;
+@property (nullable, strong, nonatomic) NSString *info;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCResponse.m b/SmartDeviceLink/SDLRPCResponse.m
index 10deae928..62bcb5e61 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 {
@@ -70,7 +72,7 @@
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 82d682f17..d275f694e 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<SDLUInt> *> *)didLocation;
@@ -40,3 +43,5 @@
@property (strong, nonatomic) 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/SDLReadDIDResponse.h b/SmartDeviceLink/SDLReadDIDResponse.h
index 4637c0058..7fcd0ed9c 100644
--- a/SmartDeviceLink/SDLReadDIDResponse.h
+++ b/SmartDeviceLink/SDLReadDIDResponse.h
@@ -11,8 +11,13 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLReadDIDResponse : SDLRPCResponse
-@property (strong, nonatomic) NSMutableArray<SDLDIDResult *> *didResult;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLDIDResult *> *didResult;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLReadDIDResponse.m b/SmartDeviceLink/SDLReadDIDResponse.m
index ff8aae51b..48651fff1 100644
--- a/SmartDeviceLink/SDLReadDIDResponse.m
+++ b/SmartDeviceLink/SDLReadDIDResponse.m
@@ -15,7 +15,7 @@
return self;
}
-- (void)setDidResult:(NSMutableArray<SDLDIDResult *> *)didResult {
+- (void)setDidResult:(nullable NSMutableArray<SDLDIDResult *> *)didResult {
if (didResult != nil) {
[parameters setObject:didResult forKey:SDLNameDIDResult];
} else {
@@ -23,7 +23,7 @@
}
}
-- (NSMutableArray<SDLDIDResult *> *)didResult {
+- (nullable NSMutableArray<SDLDIDResult *> *)didResult {
NSMutableArray<SDLDIDResult *> *array = [parameters objectForKey:SDLNameDIDResult];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLDIDResult.class]) {
return array;
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.h b/SmartDeviceLink/SDLRegisterAppInterface.h
index 921da23e3..a8b6fdc37 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, nonatomic) NSMutableArray<SDLTTSChunk *> *ttsName;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *ngnMediaScreenAppName;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<NSString *> *vrSynonyms;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<SDLAppHMIType> *appHMIType;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSString *hashID;
+@property (nullable, strong, nonatomic) NSString *hashID;
/**
* @abstract Information about the connecting device
*
* Optional
*/
-@property (strong, nonatomic) SDLDeviceInfo *deviceInfo;
+@property (nullable, strong, nonatomic) SDLDeviceInfo *deviceInfo;
/**
* @abstract ID used to validate app with policy table entries
@@ -218,6 +221,8 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLAppInfo *appInfo;
+@property (nullable, strong, nonatomic) SDLAppInfo *appInfo;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRegisterAppInterface.m b/SmartDeviceLink/SDLRegisterAppInterface.m
index 63ad8fcf2..8d01abe89 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;
}
@@ -72,11 +87,13 @@
- (SDLSyncMsgVersion *)syncMsgVersion {
NSObject *obj = [parameters objectForKey:SDLNameSyncMessageVersion];
- if (obj == nil || [obj isKindOfClass:SDLSyncMsgVersion.class]) {
- return (SDLSyncMsgVersion *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSyncMsgVersion alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSyncMsgVersion*)obj;
+
+
}
- (void)setAppName:(NSString *)appName {
@@ -91,7 +108,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 +116,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 +129,7 @@
}
}
-- (void)setNgnMediaScreenAppName:(NSString *)ngnMediaScreenAppName {
+- (void)setNgnMediaScreenAppName:(nullable NSString *)ngnMediaScreenAppName {
if (ngnMediaScreenAppName != nil) {
[parameters setObject:ngnMediaScreenAppName forKey:SDLNameNGNMediaScreenAppName];
} else {
@@ -120,11 +137,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 +149,7 @@
}
}
-- (NSMutableArray<NSString *> *)vrSynonyms {
+- (nullable NSMutableArray<NSString *> *)vrSynonyms {
return [parameters objectForKey:SDLNameVRSynonyms];
}
@@ -174,7 +191,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 +199,7 @@
}
}
-- (NSMutableArray<SDLAppHMIType> *)appHMIType {
+- (nullable NSMutableArray<SDLAppHMIType> *)appHMIType {
NSMutableArray<SDLAppHMIType> *array = [parameters objectForKey:SDLNameAppHMIType];
if ([array count] < 1) {
return array;
@@ -195,7 +212,7 @@
}
}
-- (void)setHashID:(NSString *)hashID {
+- (void)setHashID:(nullable NSString *)hashID {
if (hashID != nil) {
[parameters setObject:hashID forKey:SDLNameHashId];
} else {
@@ -203,11 +220,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,13 +232,13 @@
}
}
-- (SDLDeviceInfo *)deviceInfo {
+- (nullable SDLDeviceInfo *)deviceInfo {
NSObject *obj = [parameters objectForKey:SDLNameDeviceInfo];
- if (obj == nil || [obj isKindOfClass:SDLDeviceInfo.class]) {
- return (SDLDeviceInfo *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLDeviceInfo alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLDeviceInfo*)obj;
}
- (void)setAppID:(NSString *)appID {
@@ -236,7 +253,7 @@
return [parameters objectForKey:SDLNameAppId];
}
-- (void)setAppInfo:(SDLAppInfo *)appInfo {
+- (void)setAppInfo:(nullable SDLAppInfo *)appInfo {
if (appInfo != nil) {
[parameters setObject:appInfo forKey:SDLNameAppInfo];
} else {
@@ -244,13 +261,15 @@
}
}
-- (SDLAppInfo *)appInfo {
+- (nullable SDLAppInfo *)appInfo {
NSObject *obj = [parameters objectForKey:SDLNameAppInfo];
- if (obj == nil || [obj isKindOfClass:SDLAppInfo.class]) {
- return (SDLAppInfo *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLAppInfo alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLAppInfo*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
index 5de1c7dea..32dc5e40c 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
@@ -25,6 +25,9 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLRegisterAppInterfaceResponse : SDLRPCResponse
/**
@@ -32,7 +35,7 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLSyncMsgVersion *syncMsgVersion;
+@property (nullable, strong, nonatomic) SDLSyncMsgVersion *syncMsgVersion;
/**
* The currently active VR+TTS language on Sync.
@@ -41,7 +44,7 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLLanguage language;
+@property (nullable, strong, nonatomic) SDLLanguage language;
/**
* The currently active display language on Sync
@@ -51,21 +54,21 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLLanguage hmiDisplayLanguage;
+@property (nullable, strong, nonatomic) SDLLanguage hmiDisplayLanguage;
/**
* @see SDLDisplayCapabilities
*
* Optional
*/
-@property (strong, nonatomic) SDLDisplayCapabilities *displayCapabilities;
+@property (nullable, strong, nonatomic) SDLDisplayCapabilities *displayCapabilities;
/**
* @see SDLButtonCapabilities
*
* Optional, Array of length 1 - 100, of SDLButtonCapabilities
*/
-@property (strong, nonatomic) NSMutableArray<SDLButtonCapabilities *> *buttonCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLButtonCapabilities *> *buttonCapabilities;
/**
* If returned, the platform supports on-screen SoftButtons
@@ -74,7 +77,7 @@
*
* Optional, Array of length 1 - 100, of SDLSoftButtonCapabilities
*/
-@property (strong, nonatomic) NSMutableArray<SDLSoftButtonCapabilities *> *softButtonCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLSoftButtonCapabilities *> *softButtonCapabilities;
/**
* If returned, the platform supports custom on-screen Presets
@@ -83,42 +86,42 @@
*
* Optional
*/
-@property (strong, nonatomic) SDLPresetBankCapabilities *presetBankCapabilities;
+@property (nullable, strong, nonatomic) SDLPresetBankCapabilities *presetBankCapabilities;
/**
* @see SDLHMIZoneCapabilities
*
* Optional, Array of length 1 - 100, of SDLHMIZoneCapabilities
*/
-@property (strong, nonatomic) NSMutableArray<SDLHMIZoneCapabilities> *hmiZoneCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLHMIZoneCapabilities> *hmiZoneCapabilities;
/**
* @see SDLSpeechCapabilities
*
* Optional, Array of length 1 - 100, of SDLSpeechCapabilities
*/
-@property (strong, nonatomic) NSMutableArray<SDLSpeechCapabilities> *speechCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLSpeechCapabilities> *speechCapabilities;
/**
* @see SDLPrerecordedSpeech
*
* Optional, Array of length 1 - 100, of SDLPrerecordedSpeech
*/
-@property (strong, nonatomic) NSMutableArray<SDLPrerecordedSpeech> *prerecordedSpeech;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLPrerecordedSpeech> *prerecordedSpeech;
/**
* @see SDLVRCapabilities
*
* Optional, Array of length 1 - 100, of SDLVRCapabilities
*/
-@property (strong, nonatomic) NSMutableArray<SDLVRCapabilities> *vrCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLVRCapabilities> *vrCapabilities;
/**
* @see SDLAudioPassThruCapabilities
*
* Optional, Array of length 1 - 100, of SDLAudioPassThruCapabilities
*/
-@property (strong, nonatomic) NSMutableArray<SDLAudioPassThruCapabilities *> *audioPassThruCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLAudioPassThruCapabilities *> *audioPassThruCapabilities;
/**
* Specifies the vehicle's type
@@ -127,35 +130,37 @@
*
* Optional, Array of length 1 - 100, of SDLVehicleType
*/
-@property (strong, nonatomic) SDLVehicleType *vehicleType;
+@property (nullable, strong, nonatomic) SDLVehicleType *vehicleType;
/**
* Specifies the white-list of supported diagnostic modes (0x00-0xFF) capable for DiagnosticMessage requests. If a mode outside this list is requested, it will be rejected.
*
* Optional, Array of length 1 - 100, Integer 0 - 255
*/
-@property (strong, nonatomic) NSMutableArray<NSNumber<SDLInt> *> *supportedDiagModes;
+@property (nullable, strong, nonatomic) NSMutableArray<NSNumber<SDLInt> *> *supportedDiagModes;
/**
* @see SDLHMICapabilities
*
* Optional
*/
-@property (strong, nonatomic) SDLHMICapabilities *hmiCapabilities;
+@property (nullable, strong, nonatomic) SDLHMICapabilities *hmiCapabilities;
/**
* The SmartDeviceLink version
*
* Optional, String max length 100
*/
-@property (strong, nonatomic) NSString *sdlVersion;
+@property (nullable, strong, nonatomic) NSString *sdlVersion;
/**
* The software version of the system that implements the SmartDeviceLink core
*
* Optional, String max length 100
*/
-@property (strong, nonatomic) NSString *systemSoftwareVersion;
+@property (nullable, strong, nonatomic) NSString *systemSoftwareVersion;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
index fb65628ca..e6f928edb 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
@@ -22,7 +22,7 @@
return self;
}
-- (void)setSyncMsgVersion:(SDLSyncMsgVersion *)syncMsgVersion {
+- (void)setSyncMsgVersion:(nullable SDLSyncMsgVersion *)syncMsgVersion {
if (syncMsgVersion != nil) {
[parameters setObject:syncMsgVersion forKey:SDLNameSyncMessageVersion];
} else {
@@ -30,16 +30,16 @@
}
}
-- (SDLSyncMsgVersion *)syncMsgVersion {
+- (nullable SDLSyncMsgVersion *)syncMsgVersion {
NSObject *obj = [parameters objectForKey:SDLNameSyncMessageVersion];
- if (obj == nil || [obj isKindOfClass:SDLSyncMsgVersion.class]) {
- return (SDLSyncMsgVersion *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSyncMsgVersion alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSyncMsgVersion*)obj;
}
-- (void)setLanguage:(SDLLanguage)language {
+- (void)setLanguage:(nullable SDLLanguage)language {
if (language != nil) {
[parameters setObject:language forKey:SDLNameLanguage];
} else {
@@ -47,12 +47,12 @@
}
}
-- (SDLLanguage)language {
+- (nullable SDLLanguage)language {
NSObject *obj = [parameters objectForKey:SDLNameLanguage];
return (SDLLanguage)obj;
}
-- (void)setHmiDisplayLanguage:(SDLLanguage)hmiDisplayLanguage {
+- (void)setHmiDisplayLanguage:(nullable SDLLanguage)hmiDisplayLanguage {
if (hmiDisplayLanguage != nil) {
[parameters setObject:hmiDisplayLanguage forKey:SDLNameHMIDisplayLanguage];
} else {
@@ -60,12 +60,12 @@
}
}
-- (SDLLanguage)hmiDisplayLanguage {
+- (nullable SDLLanguage)hmiDisplayLanguage {
NSObject *obj = [parameters objectForKey:SDLNameHMIDisplayLanguage];
return (SDLLanguage)obj;
}
-- (void)setDisplayCapabilities:(SDLDisplayCapabilities *)displayCapabilities {
+- (void)setDisplayCapabilities:(nullable SDLDisplayCapabilities *)displayCapabilities {
if (displayCapabilities != nil) {
[parameters setObject:displayCapabilities forKey:SDLNameDisplayCapabilities];
} else {
@@ -73,16 +73,16 @@
}
}
-- (SDLDisplayCapabilities *)displayCapabilities {
+- (nullable SDLDisplayCapabilities *)displayCapabilities {
NSObject *obj = [parameters objectForKey:SDLNameDisplayCapabilities];
- if (obj == nil || [obj isKindOfClass:SDLDisplayCapabilities.class]) {
- return (SDLDisplayCapabilities *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLDisplayCapabilities alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLDisplayCapabilities*)obj;
}
-- (void)setButtonCapabilities:(NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
+- (void)setButtonCapabilities:(nullable NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
if (buttonCapabilities != nil) {
[parameters setObject:buttonCapabilities forKey:SDLNameButtonCapabilities];
} else {
@@ -90,7 +90,7 @@
}
}
-- (NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
+- (nullable NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
NSMutableArray<SDLButtonCapabilities *> *array = [parameters objectForKey:SDLNameButtonCapabilities];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLButtonCapabilities.class]) {
return array;
@@ -103,7 +103,7 @@
}
}
-- (void)setSoftButtonCapabilities:(NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
+- (void)setSoftButtonCapabilities:(nullable NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
if (softButtonCapabilities != nil) {
[parameters setObject:softButtonCapabilities forKey:SDLNameSoftButtonCapabilities];
} else {
@@ -111,7 +111,7 @@
}
}
-- (NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
+- (nullable NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
NSMutableArray<SDLSoftButtonCapabilities *> *array = [parameters objectForKey:SDLNameSoftButtonCapabilities];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButtonCapabilities.class]) {
return array;
@@ -124,7 +124,7 @@
}
}
-- (void)setPresetBankCapabilities:(SDLPresetBankCapabilities *)presetBankCapabilities {
+- (void)setPresetBankCapabilities:(nullable SDLPresetBankCapabilities *)presetBankCapabilities {
if (presetBankCapabilities != nil) {
[parameters setObject:presetBankCapabilities forKey:SDLNamePresetBankCapabilities];
} else {
@@ -132,16 +132,16 @@
}
}
-- (SDLPresetBankCapabilities *)presetBankCapabilities {
+- (nullable SDLPresetBankCapabilities *)presetBankCapabilities {
NSObject *obj = [parameters objectForKey:SDLNamePresetBankCapabilities];
- if (obj == nil || [obj isKindOfClass:SDLPresetBankCapabilities.class]) {
- return (SDLPresetBankCapabilities *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLPresetBankCapabilities alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLPresetBankCapabilities*)obj;
}
-- (void)setHmiZoneCapabilities:(NSMutableArray<SDLHMIZoneCapabilities> *)hmiZoneCapabilities {
+- (void)setHmiZoneCapabilities:(nullable NSMutableArray<SDLHMIZoneCapabilities> *)hmiZoneCapabilities {
if (hmiZoneCapabilities != nil) {
[parameters setObject:hmiZoneCapabilities forKey:SDLNameHMIZoneCapabilities];
} else {
@@ -149,7 +149,7 @@
}
}
-- (NSMutableArray<SDLHMIZoneCapabilities> *)hmiZoneCapabilities {
+- (nullable NSMutableArray<SDLHMIZoneCapabilities> *)hmiZoneCapabilities {
NSMutableArray<SDLHMIZoneCapabilities> *array = [parameters objectForKey:SDLNameHMIZoneCapabilities];
if ([array count] < 1) {
return array;
@@ -162,7 +162,7 @@
}
}
-- (void)setSpeechCapabilities:(NSMutableArray<SDLSpeechCapabilities> *)speechCapabilities {
+- (void)setSpeechCapabilities:(nullable NSMutableArray<SDLSpeechCapabilities> *)speechCapabilities {
if (speechCapabilities != nil) {
[parameters setObject:speechCapabilities forKey:SDLNameSpeechCapabilities];
} else {
@@ -170,7 +170,7 @@
}
}
-- (NSMutableArray<SDLSpeechCapabilities> *)speechCapabilities {
+- (nullable NSMutableArray<SDLSpeechCapabilities> *)speechCapabilities {
NSMutableArray<SDLSpeechCapabilities> *array = [parameters objectForKey:SDLNameSpeechCapabilities];
if ([array count] < 1) {
return array;
@@ -183,7 +183,7 @@
}
}
-- (void)setPrerecordedSpeech:(NSMutableArray<SDLPrerecordedSpeech> *)prerecordedSpeech {
+- (void)setPrerecordedSpeech:(nullable NSMutableArray<SDLPrerecordedSpeech> *)prerecordedSpeech {
if (prerecordedSpeech != nil) {
[parameters setObject:prerecordedSpeech forKey:SDLNamePrerecordedSpeech];
} else {
@@ -191,7 +191,7 @@
}
}
-- (NSMutableArray<SDLPrerecordedSpeech> *)prerecordedSpeech {
+- (nullable NSMutableArray<SDLPrerecordedSpeech> *)prerecordedSpeech {
NSMutableArray<SDLPrerecordedSpeech> *array = [parameters objectForKey:SDLNamePrerecordedSpeech];
if ([array count] < 1) {
return array;
@@ -204,7 +204,7 @@
}
}
-- (void)setVrCapabilities:(NSMutableArray<SDLVRCapabilities> *)vrCapabilities {
+- (void)setVrCapabilities:(nullable NSMutableArray<SDLVRCapabilities> *)vrCapabilities {
if (vrCapabilities != nil) {
[parameters setObject:vrCapabilities forKey:SDLNameVRCapabilities];
} else {
@@ -212,7 +212,7 @@
}
}
-- (NSMutableArray<SDLVRCapabilities> *)vrCapabilities {
+- (nullable NSMutableArray<SDLVRCapabilities> *)vrCapabilities {
NSMutableArray<SDLVRCapabilities> *array = [parameters objectForKey:SDLNameVRCapabilities];
if ([array count] < 1) {
return array;
@@ -225,7 +225,7 @@
}
}
-- (void)setAudioPassThruCapabilities:(NSMutableArray<SDLAudioPassThruCapabilities *> *)audioPassThruCapabilities {
+- (void)setAudioPassThruCapabilities:(nullable NSMutableArray<SDLAudioPassThruCapabilities *> *)audioPassThruCapabilities {
if (audioPassThruCapabilities != nil) {
[parameters setObject:audioPassThruCapabilities forKey:SDLNameAudioPassThruCapabilities];
} else {
@@ -233,7 +233,7 @@
}
}
-- (NSMutableArray<SDLAudioPassThruCapabilities *> *)audioPassThruCapabilities {
+- (nullable NSMutableArray<SDLAudioPassThruCapabilities *> *)audioPassThruCapabilities {
NSMutableArray<SDLAudioPassThruCapabilities *> *array = [parameters objectForKey:SDLNameAudioPassThruCapabilities];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLAudioPassThruCapabilities.class]) {
return array;
@@ -246,7 +246,7 @@
}
}
-- (void)setVehicleType:(SDLVehicleType *)vehicleType {
+- (void)setVehicleType:(nullable SDLVehicleType *)vehicleType {
if (vehicleType != nil) {
[parameters setObject:vehicleType forKey:SDLNameVehicleType];
} else {
@@ -254,16 +254,16 @@
}
}
-- (SDLVehicleType *)vehicleType {
+- (nullable SDLVehicleType *)vehicleType {
NSObject *obj = [parameters objectForKey:SDLNameVehicleType];
- if (obj == nil || [obj isKindOfClass:SDLVehicleType.class]) {
- return (SDLVehicleType *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleType alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleType*)obj;
}
-- (void)setSupportedDiagModes:(NSMutableArray<NSNumber<SDLInt> *> *)supportedDiagModes {
+- (void)setSupportedDiagModes:(nullable NSMutableArray<NSNumber<SDLInt> *> *)supportedDiagModes {
if (supportedDiagModes != nil) {
[parameters setObject:supportedDiagModes forKey:SDLNameSupportedDiagnosticModes];
} else {
@@ -271,11 +271,11 @@
}
}
-- (NSMutableArray<NSNumber<SDLInt> *> *)supportedDiagModes {
+- (nullable NSMutableArray<NSNumber<SDLInt> *> *)supportedDiagModes {
return [parameters objectForKey:SDLNameSupportedDiagnosticModes];
}
-- (void)setHmiCapabilities:(SDLHMICapabilities *)hmiCapabilities {
+- (void)setHmiCapabilities:(nullable SDLHMICapabilities *)hmiCapabilities {
if (hmiCapabilities != nil) {
[parameters setObject:hmiCapabilities forKey:SDLNameHMICapabilities];
} else {
@@ -283,16 +283,16 @@
}
}
-- (SDLHMICapabilities *)hmiCapabilities {
+- (nullable SDLHMICapabilities *)hmiCapabilities {
NSObject *obj = [parameters objectForKey:SDLNameHMICapabilities];
- if (obj == nil || [obj isKindOfClass:[SDLHMICapabilities class]]) {
- return (SDLHMICapabilities *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLHMICapabilities alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLHMICapabilities*)obj;
}
-- (void)setSdlVersion:(NSString *)sdlVersion {
+- (void)setSdlVersion:(nullable NSString *)sdlVersion {
if (sdlVersion != nil) {
parameters[SDLNameSDLVersion] = sdlVersion;
} else {
@@ -300,11 +300,11 @@
}
}
-- (NSString *)sdlVersion {
+- (nullable NSString *)sdlVersion {
return parameters[SDLNameSDLVersion];
}
-- (void)setSystemSoftwareVersion:(NSString *)systemSoftwareVersion {
+- (void)setSystemSoftwareVersion:(nullable NSString *)systemSoftwareVersion {
if (systemSoftwareVersion != nil) {
parameters[SDLNameSystemSoftwareVersion] = systemSoftwareVersion;
} else {
@@ -312,7 +312,7 @@
}
}
-- (NSString *)systemSoftwareVersion {
+- (nullable NSString *)systemSoftwareVersion {
return parameters[SDLNameSystemSoftwareVersion];
}
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 44052afc8..7c842e5c1 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, nonatomic) 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/SDLResetGlobalPropertiesResponse.h b/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h
index eda1b2628..23a043cd6 100644
--- a/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h
+++ b/SmartDeviceLink/SDLResetGlobalPropertiesResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLResetGlobalPropertiesResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m b/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m
index 0ae8c079d..30b85e13a 100644
--- a/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m
+++ b/SmartDeviceLink/SDLResetGlobalPropertiesResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLResetGlobalPropertiesResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScreenParams.h b/SmartDeviceLink/SDLScreenParams.h
index 2263ec179..23c7a16a6 100644
--- a/SmartDeviceLink/SDLScreenParams.h
+++ b/SmartDeviceLink/SDLScreenParams.h
@@ -6,10 +6,13 @@
@class SDLImageResolution;
@class SDLTouchEventCapabilities;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLScreenParams : SDLRPCStruct
@property (strong, nonatomic) SDLImageResolution *resolution;
-@property (strong, nonatomic) SDLTouchEventCapabilities *touchEventAvailable;
+@property (nullable, strong, nonatomic) SDLTouchEventCapabilities *touchEventAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScreenParams.m b/SmartDeviceLink/SDLScreenParams.m
index 01e966435..22a425472 100644
--- a/SmartDeviceLink/SDLScreenParams.m
+++ b/SmartDeviceLink/SDLScreenParams.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLTouchEventCapabilities.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLScreenParams
- (void)setResolution:(SDLImageResolution *)resolution {
@@ -19,14 +21,14 @@
- (SDLImageResolution *)resolution {
NSObject *obj = [store objectForKey:SDLNameResolution];
- if (obj == nil || [obj isKindOfClass:SDLImageResolution.class]) {
- return (SDLImageResolution *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImageResolution alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImageResolution*)obj;
}
-- (void)setTouchEventAvailable:(SDLTouchEventCapabilities *)touchEventAvailable {
+- (void)setTouchEventAvailable:(nullable SDLTouchEventCapabilities *)touchEventAvailable {
if (touchEventAvailable != nil) {
[store setObject:touchEventAvailable forKey:SDLNameTouchEventAvailable];
} else {
@@ -34,13 +36,15 @@
}
}
-- (SDLTouchEventCapabilities *)touchEventAvailable {
+- (nullable SDLTouchEventCapabilities *)touchEventAvailable {
NSObject *obj = [store objectForKey:SDLNameTouchEventAvailable];
- if (obj == nil || [obj isKindOfClass:SDLTouchEventCapabilities.class]) {
- return (SDLTouchEventCapabilities *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLTouchEventCapabilities alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLTouchEventCapabilities*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLScrollableMessage.h b/SmartDeviceLink/SDLScrollableMessage.h
index 2c2f75d22..87ed0be98 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, nonatomic) NSNumber<SDLInt> *timeout;
+@property (nullable, strong, nonatomic) 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, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (nullable, strong, nonatomic) 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/SDLScrollableMessageResponse.h b/SmartDeviceLink/SDLScrollableMessageResponse.h
index 516415468..4f6d17a8a 100644
--- a/SmartDeviceLink/SDLScrollableMessageResponse.h
+++ b/SmartDeviceLink/SDLScrollableMessageResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLScrollableMessageResponse : SDLRPCResponse
@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..a4814166c 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,16 +123,16 @@
}
}
-- (SDLImage *)locationImage {
+- (nullable SDLImage *)locationImage {
id obj = parameters[SDLNameLocationImage];
- if (obj == nil || [obj isKindOfClass:[SDLImage class]]) {
- return (SDLImage *)obj;
- } else {
- return [[SDLImage alloc] initWithDictionary:obj];
+ if ([obj isKindOfClass:NSDictionary.class]) {
+ return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
-- (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,16 +152,16 @@
}
}
-- (SDLDateTime *)timeStamp {
+- (nullable SDLDateTime *)timeStamp {
id obj = parameters[SDLNameLocationTimeStamp];
- if (obj == nil || [obj isKindOfClass:[SDLDateTime class]]) {
- return (SDLDateTime *)obj;
- } else {
- return [[SDLDateTime alloc] initWithDictionary:obj];
+ if ([obj isKindOfClass:NSDictionary.class]) {
+ return [[SDLDateTime alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLDateTime*)obj;
}
-- (void)setAddress:(SDLOasisAddress *)address {
+- (void)setAddress:(nullable SDLOasisAddress *)address {
if (address != nil) {
parameters[SDLNameAddress] = address;
} else {
@@ -168,13 +169,15 @@
}
}
-- (SDLOasisAddress *)address {
+- (nullable SDLOasisAddress *)address {
id obj = parameters[SDLNameAddress];
- if (obj == nil || [obj isKindOfClass:[SDLOasisAddress class]]) {
- return (SDLOasisAddress *)obj;
- } else {
- return [[SDLOasisAddress alloc] initWithDictionary:obj];
+ if ([obj isKindOfClass:NSDictionary.class]) {
+ return [[SDLOasisAddress alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLOasisAddress*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSendLocationResponse.h b/SmartDeviceLink/SDLSendLocationResponse.h
index 35fc2eca1..8059bc1b2 100644
--- a/SmartDeviceLink/SDLSendLocationResponse.h
+++ b/SmartDeviceLink/SDLSendLocationResponse.h
@@ -4,6 +4,10 @@
#import "SDLRPCResponse.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSendLocationResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSendLocationResponse.m b/SmartDeviceLink/SDLSendLocationResponse.m
index 08e47b71f..db339e753 100644
--- a/SmartDeviceLink/SDLSendLocationResponse.m
+++ b/SmartDeviceLink/SDLSendLocationResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSendLocationResponse
- (instancetype)init {
@@ -18,3 +20,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetAppIcon.h b/SmartDeviceLink/SDLSetAppIcon.h
index 4712e0844..2b99843c6 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, nonatomic) NSString *syncFileName;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetAppIconResponse.h b/SmartDeviceLink/SDLSetAppIconResponse.h
index 28c818782..ba189dc4d 100644
--- a/SmartDeviceLink/SDLSetAppIconResponse.h
+++ b/SmartDeviceLink/SDLSetAppIconResponse.h
@@ -7,6 +7,11 @@
/** SDLSetAppIconResponse is sent, when SDLSetAppIcon has been called.
* Since<b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetAppIconResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetAppIconResponse.m b/SmartDeviceLink/SDLSetAppIconResponse.m
index 9469b3b99..c5126ee30 100644
--- a/SmartDeviceLink/SDLSetAppIconResponse.m
+++ b/SmartDeviceLink/SDLSetAppIconResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSetAppIconResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetDisplayLayout.h b/SmartDeviceLink/SDLSetDisplayLayout.h
index 5ad46e98d..c2097d804 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, nonatomic) 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/SDLSetDisplayLayoutResponse.h b/SmartDeviceLink/SDLSetDisplayLayoutResponse.h
index b1f955c97..edacb17ed 100644
--- a/SmartDeviceLink/SDLSetDisplayLayoutResponse.h
+++ b/SmartDeviceLink/SDLSetDisplayLayoutResponse.h
@@ -13,11 +13,16 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetDisplayLayoutResponse : SDLRPCResponse
-@property (strong, nonatomic) SDLDisplayCapabilities *displayCapabilities;
-@property (strong, nonatomic) NSMutableArray<SDLButtonCapabilities *> *buttonCapabilities;
-@property (strong, nonatomic) NSMutableArray<SDLSoftButtonCapabilities *> *softButtonCapabilities;
-@property (strong, nonatomic) SDLPresetBankCapabilities *presetBankCapabilities;
+@property (nullable, strong, nonatomic) SDLDisplayCapabilities *displayCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLButtonCapabilities *> *buttonCapabilities;
+@property (nullable, strong, nonatomic) NSMutableArray<SDLSoftButtonCapabilities *> *softButtonCapabilities;
+@property (nullable, strong, nonatomic) SDLPresetBankCapabilities *presetBankCapabilities;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetDisplayLayoutResponse.m b/SmartDeviceLink/SDLSetDisplayLayoutResponse.m
index fe5d5c6ba..c5c790415 100644
--- a/SmartDeviceLink/SDLSetDisplayLayoutResponse.m
+++ b/SmartDeviceLink/SDLSetDisplayLayoutResponse.m
@@ -18,7 +18,7 @@
return self;
}
-- (void)setDisplayCapabilities:(SDLDisplayCapabilities *)displayCapabilities {
+- (void)setDisplayCapabilities:(nullable SDLDisplayCapabilities *)displayCapabilities {
if (displayCapabilities != nil) {
[parameters setObject:displayCapabilities forKey:SDLNameDisplayCapabilities];
} else {
@@ -26,16 +26,16 @@
}
}
-- (SDLDisplayCapabilities *)displayCapabilities {
+- (nullable SDLDisplayCapabilities *)displayCapabilities {
NSObject *obj = [parameters objectForKey:SDLNameDisplayCapabilities];
- if (obj == nil || [obj isKindOfClass:SDLDisplayCapabilities.class]) {
- return (SDLDisplayCapabilities *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLDisplayCapabilities alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLDisplayCapabilities*)obj;
}
-- (void)setButtonCapabilities:(NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
+- (void)setButtonCapabilities:(nullable NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
if (buttonCapabilities != nil) {
[parameters setObject:buttonCapabilities forKey:SDLNameButtonCapabilities];
} else {
@@ -43,7 +43,7 @@
}
}
-- (NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
+- (nullable NSMutableArray<SDLButtonCapabilities *> *)buttonCapabilities {
NSMutableArray<SDLButtonCapabilities *> *array = [parameters objectForKey:SDLNameButtonCapabilities];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLButtonCapabilities.class]) {
return array;
@@ -56,7 +56,7 @@
}
}
-- (void)setSoftButtonCapabilities:(NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
+- (void)setSoftButtonCapabilities:(nullable NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
if (softButtonCapabilities != nil) {
[parameters setObject:softButtonCapabilities forKey:SDLNameSoftButtonCapabilities];
} else {
@@ -64,7 +64,7 @@
}
}
-- (NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
+- (nullable NSMutableArray<SDLSoftButtonCapabilities *> *)softButtonCapabilities {
NSMutableArray<SDLSoftButtonCapabilities *> *array = [parameters objectForKey:SDLNameSoftButtonCapabilities];
if ([array count] < 1 || [[array objectAtIndex:0] isKindOfClass:SDLSoftButtonCapabilities.class]) {
return array;
@@ -77,7 +77,7 @@
}
}
-- (void)setPresetBankCapabilities:(SDLPresetBankCapabilities *)presetBankCapabilities {
+- (void)setPresetBankCapabilities:(nullable SDLPresetBankCapabilities *)presetBankCapabilities {
if (presetBankCapabilities != nil) {
[parameters setObject:presetBankCapabilities forKey:SDLNamePresetBankCapabilities];
} else {
@@ -85,13 +85,13 @@
}
}
-- (SDLPresetBankCapabilities *)presetBankCapabilities {
+- (nullable SDLPresetBankCapabilities *)presetBankCapabilities {
NSObject *obj = [parameters objectForKey:SDLNamePresetBankCapabilities];
- if (obj == nil || [obj isKindOfClass:SDLPresetBankCapabilities.class]) {
- return (SDLPresetBankCapabilities *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLPresetBankCapabilities alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLPresetBankCapabilities*)obj;
}
@end
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.h b/SmartDeviceLink/SDLSetGlobalProperties.h
index 5640834f8..95c803bae 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, nonatomic) NSMutableArray<SDLTTSChunk *> *helpPrompt;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSMutableArray<SDLTTSChunk *> *timeoutPrompt;
+@property (strong, nonatomic, nullable) NSMutableArray<SDLTTSChunk *> *timeoutPrompt;
/**
* @abstract Sets a voice recognition Help Title
*
@@ -62,7 +65,7 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong, nonatomic) NSString *vrHelpTitle;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSMutableArray<SDLVRHelpItem *> *vrHelp;
-@property (strong, nonatomic) NSString *menuTitle;
-@property (strong, nonatomic) SDLImage *menuIcon;
-@property (strong, nonatomic) SDLKeyboardProperties *keyboardProperties;
+@property (strong, nonatomic, nullable) NSMutableArray<SDLVRHelpItem *> *vrHelp;
+@property (strong, nonatomic, nullable) NSString *menuTitle;
+@property (strong, nonatomic, nullable) SDLImage *menuIcon;
+@property (strong, nonatomic, nullable) SDLKeyboardProperties *keyboardProperties;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetGlobalProperties.m b/SmartDeviceLink/SDLSetGlobalProperties.m
index 5e141c7aa..7df4f19d6 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,16 +141,16 @@
}
}
-- (SDLImage *)menuIcon {
+- (nullable SDLImage *)menuIcon {
NSObject *obj = [parameters objectForKey:SDLNameMenuIcon];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
-- (void)setKeyboardProperties:(SDLKeyboardProperties *)keyboardProperties {
+- (void)setKeyboardProperties:(nullable SDLKeyboardProperties *)keyboardProperties {
if (keyboardProperties != nil) {
[parameters setObject:keyboardProperties forKey:SDLNameKeyboardProperties];
} else {
@@ -157,13 +158,15 @@
}
}
-- (SDLKeyboardProperties *)keyboardProperties {
+- (nullable SDLKeyboardProperties *)keyboardProperties {
NSObject *obj = [parameters objectForKey:SDLNameKeyboardProperties];
- if (obj == nil || [obj isKindOfClass:SDLKeyboardProperties.class]) {
- return (SDLKeyboardProperties *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLKeyboardProperties alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLKeyboardProperties*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h b/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h
index a5dd82139..f41991d53 100644
--- a/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h
+++ b/SmartDeviceLink/SDLSetGlobalPropertiesResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetGlobalPropertiesResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m b/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m
index 4b56322ac..3ae2e6591 100644
--- a/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m
+++ b/SmartDeviceLink/SDLSetGlobalPropertiesResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSetGlobalPropertiesResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetMediaClockTimer.h b/SmartDeviceLink/SDLSetMediaClockTimer.h
index da6242309..f561299f5 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:(UInt8)hours minutes:(UInt8)minutes seconds:(UInt8)seconds;
@@ -35,13 +38,13 @@
* <li>Will be ignored for PAUSE/RESUME and CLEAR</li>
* </ul>
*/
-@property (strong, nonatomic) SDLStartTime *startTime;
+@property (strong, nonatomic, nullable) 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, nonatomic) SDLStartTime *endTime;
+@property (strong, nonatomic, nullable) SDLStartTime *endTime;
/**
* @abstract The media clock/timer update mode (COUNTUP/COUNTDOWN/PAUSE/RESUME)
*
@@ -58,3 +61,5 @@
@property (strong, nonatomic) SDLUpdateMode updateMode;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetMediaClockTimer.m b/SmartDeviceLink/SDLSetMediaClockTimer.m
index 85a1c04cd..d35be05cd 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,16 +48,16 @@
}
}
-- (SDLStartTime *)startTime {
+- (nullable SDLStartTime *)startTime {
NSObject *obj = [parameters objectForKey:SDLNameStartTime];
- if (obj == nil || [obj isKindOfClass:SDLStartTime.class]) {
- return (SDLStartTime *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLStartTime alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLStartTime*)obj;
}
-- (void)setEndTime:(SDLStartTime *)endTime {
+- (void)setEndTime:(nullable SDLStartTime *)endTime {
if (endTime != nil) {
[parameters setObject:endTime forKey:SDLNameEndTime];
} else {
@@ -63,13 +65,13 @@
}
}
-- (SDLStartTime *)endTime {
+- (nullable SDLStartTime *)endTime {
NSObject *obj = [parameters objectForKey:SDLNameEndTime];
- if (obj == nil || [obj isKindOfClass:SDLStartTime.class]) {
- return (SDLStartTime *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLStartTime alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLStartTime*)obj;
}
- (void)setUpdateMode:(SDLUpdateMode)updateMode {
@@ -86,3 +88,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetMediaClockTimerResponse.h b/SmartDeviceLink/SDLSetMediaClockTimerResponse.h
index d1adbda4d..54a599821 100644
--- a/SmartDeviceLink/SDLSetMediaClockTimerResponse.h
+++ b/SmartDeviceLink/SDLSetMediaClockTimerResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSetMediaClockTimerResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSetMediaClockTimerResponse.m b/SmartDeviceLink/SDLSetMediaClockTimerResponse.m
index 899fc4926..b976ba119 100644
--- a/SmartDeviceLink/SDLSetMediaClockTimerResponse.m
+++ b/SmartDeviceLink/SDLSetMediaClockTimerResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSetMediaClockTimerResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShow.h b/SmartDeviceLink/SDLShow.h
index 51b277299..fb6c16411 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, nonatomic) NSString *mainField1;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSString *mainField2;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSString *mainField3;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSString *mainField4;
+@property (strong, nonatomic, nullable) 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, nonatomic) SDLTextAlignment alignment;
+@property (strong, nonatomic, nullable) SDLTextAlignment alignment;
/**
* @abstract Text in the Status Bar
*
@@ -146,7 +148,7 @@
* parameter is ignored</li>
* </ul>
*/
-@property (strong, nonatomic) NSString *statusBar;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSString *mediaClock;
+@property (strong, nonatomic, nullable) 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, nonatomic) NSString *mediaTrack;
+@property (strong, nonatomic, nullable) 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, nonatomic) SDLImage *graphic;
+@property (strong, nonatomic, nullable) 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, nonatomic) SDLImage *secondaryGraphic;
+@property (strong, nonatomic, nullable) SDLImage *secondaryGraphic;
/**
* @abstract The the Soft buttons defined by the App
*
@@ -213,7 +215,7 @@
*
* @since SmartDeviceLink 2.0
*/
-@property (strong, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (strong, nonatomic, nullable) NSMutableArray<SDLSoftButton *> *softButtons;
/**
* @abstract The Custom Presets defined by the App
*
@@ -227,6 +229,8 @@
* </ul>
* @since SmartDeviceLink 2.0
*/
-@property (strong, nonatomic) NSMutableArray<NSString *> *customPresets;
+@property (strong, nonatomic, nullable) NSMutableArray<NSString *> *customPresets;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShow.m b/SmartDeviceLink/SDLShow.m
index 2cb85de01..875d70481 100644
--- a/SmartDeviceLink/SDLShow.m
+++ b/SmartDeviceLink/SDLShow.m
@@ -157,11 +157,11 @@
- (SDLImage *)graphic {
NSObject *obj = [parameters objectForKey:SDLNameGraphic];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
- (void)setSecondaryGraphic:(SDLImage *)secondaryGraphic {
@@ -174,11 +174,11 @@
- (SDLImage *)secondaryGraphic {
NSObject *obj = [parameters objectForKey:SDLNameSecondaryGraphic];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
- (void)setSoftButtons:(NSMutableArray<SDLSoftButton *> *)softButtons {
diff --git a/SmartDeviceLink/SDLShowConstantTBT.h b/SmartDeviceLink/SDLShowConstantTBT.h
index e4c2e9033..90604befa 100644
--- a/SmartDeviceLink/SDLShowConstantTBT.h
+++ b/SmartDeviceLink/SDLShowConstantTBT.h
@@ -12,20 +12,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:(double)distanceToManeuver distanceToManeuverScale:(double)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:(double)distanceToManeuver distanceToManeuverScale:(double)distanceToManeuverScale maneuverComplete:(BOOL)maneuverComplete softButtons:(nullable NSArray<SDLSoftButton *> *)softButtons;
-@property (strong, nonatomic) NSString *navigationText1;
-@property (strong, nonatomic) NSString *navigationText2;
-@property (strong, nonatomic) NSString *eta;
-@property (strong, nonatomic) NSString *timeToDestination;
-@property (strong, nonatomic) NSString *totalDistance;
-@property (strong, nonatomic) SDLImage *turnIcon;
-@property (strong, nonatomic) SDLImage *nextTurnIcon;
-@property (strong, nonatomic) NSNumber<SDLFloat> *distanceToManeuver;
-@property (strong, nonatomic) NSNumber<SDLFloat> *distanceToManeuverScale;
-@property (strong, nonatomic) NSNumber<SDLBool> *maneuverComplete;
-@property (strong, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (strong, nonatomic, nullable) NSString *navigationText1;
+@property (strong, nonatomic, nullable) NSString *navigationText2;
+@property (strong, nonatomic, nullable) NSString *eta;
+@property (strong, nonatomic, nullable) NSString *timeToDestination;
+@property (strong, nonatomic, nullable) NSString *totalDistance;
+@property (strong, nonatomic, nullable) SDLImage *turnIcon;
+@property (strong, nonatomic, nullable) SDLImage *nextTurnIcon;
+@property (strong, nonatomic, nullable) NSNumber<SDLFloat> *distanceToManeuver;
+@property (strong, nonatomic, nullable) NSNumber<SDLFloat> *distanceToManeuverScale;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *maneuverComplete;
+@property (strong, nonatomic, nullable) NSMutableArray<SDLSoftButton *> *softButtons;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShowConstantTBT.m b/SmartDeviceLink/SDLShowConstantTBT.m
index 093666d6f..c32fb0d1b 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:(double)distanceToManeuver distanceToManeuverScale:(double)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:(double)distanceToManeuver distanceToManeuverScale:(double)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,16 +107,16 @@
}
}
-- (SDLImage *)turnIcon {
+- (nullable SDLImage *)turnIcon {
NSObject *obj = [parameters objectForKey:SDLNameTurnIcon];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
-- (void)setNextTurnIcon:(SDLImage *)nextTurnIcon {
+- (void)setNextTurnIcon:(nullable SDLImage *)nextTurnIcon {
if (nextTurnIcon != nil) {
[parameters setObject:nextTurnIcon forKey:SDLNameNextTurnIcon];
} else {
@@ -122,16 +124,16 @@
}
}
-- (SDLImage *)nextTurnIcon {
+- (nullable SDLImage *)nextTurnIcon {
NSObject *obj = [parameters objectForKey:SDLNameNextTurnIcon];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
-- (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/SDLShowConstantTBTResponse.h b/SmartDeviceLink/SDLShowConstantTBTResponse.h
index 8af3a9f23..b6c196734 100644
--- a/SmartDeviceLink/SDLShowConstantTBTResponse.h
+++ b/SmartDeviceLink/SDLShowConstantTBTResponse.h
@@ -7,6 +7,11 @@
/** SDLShowConstantTBTResponse is sent, when SDLShowConstantTBT has been called.
* Since<b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLShowConstantTBTResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShowConstantTBTResponse.m b/SmartDeviceLink/SDLShowConstantTBTResponse.m
index ee0d4f36e..0327f0420 100644
--- a/SmartDeviceLink/SDLShowConstantTBTResponse.m
+++ b/SmartDeviceLink/SDLShowConstantTBTResponse.m
@@ -5,6 +5,8 @@
#import "SDLShowConstantTBTResponse.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLShowConstantTBTResponse
- (instancetype)init {
@@ -14,3 +16,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShowResponse.h b/SmartDeviceLink/SDLShowResponse.h
index 1963390ec..0cb87e942 100644
--- a/SmartDeviceLink/SDLShowResponse.h
+++ b/SmartDeviceLink/SDLShowResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLShowResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLShowResponse.m b/SmartDeviceLink/SDLShowResponse.m
index 40912b163..75a5819aa 100644
--- a/SmartDeviceLink/SDLShowResponse.m
+++ b/SmartDeviceLink/SDLShowResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLShowResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSingleTireStatus.h b/SmartDeviceLink/SDLSingleTireStatus.h
index a585fcfba..da8e71077 100644
--- a/SmartDeviceLink/SDLSingleTireStatus.h
+++ b/SmartDeviceLink/SDLSingleTireStatus.h
@@ -10,6 +10,9 @@
*
* @since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSingleTireStatus : SDLRPCStruct
/**
@@ -18,3 +21,5 @@
@property (strong, nonatomic) SDLComponentVolumeStatus status;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSlider.h b/SmartDeviceLink/SDLSlider.h
index 1c84593be..31a312bd7 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, nonatomic) NSMutableArray<NSString *> *sliderFooter;
+@property (strong, nonatomic, nullable) NSMutableArray<NSString *> *sliderFooter;
/**
* @abstract An App defined timeout
@@ -64,6 +67,8 @@
*
* Optional, Integer, 1000 - 65535
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *timeout;
+@property (strong, nonatomic, nullable) 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/SDLSliderResponse.h b/SmartDeviceLink/SDLSliderResponse.h
index 2b41fd333..1dd4232b4 100644
--- a/SmartDeviceLink/SDLSliderResponse.h
+++ b/SmartDeviceLink/SDLSliderResponse.h
@@ -9,11 +9,16 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSliderResponse : SDLRPCResponse
/**
* @abstract The selected position of the slider.
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *sliderPosition;
+@property (strong, nonatomic, nullable) NSNumber<SDLInt> *sliderPosition;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSliderResponse.m b/SmartDeviceLink/SDLSliderResponse.m
index 9d5872393..aa53544d7 100644
--- a/SmartDeviceLink/SDLSliderResponse.m
+++ b/SmartDeviceLink/SDLSliderResponse.m
@@ -14,7 +14,7 @@
return self;
}
-- (void)setSliderPosition:(NSNumber<SDLInt> *)sliderPosition {
+- (void)setSliderPosition:(nullable NSNumber<SDLInt> *)sliderPosition {
if (sliderPosition != nil) {
[parameters setObject:sliderPosition forKey:SDLNameSliderPosition];
} else {
@@ -22,7 +22,7 @@
}
}
-- (NSNumber<SDLInt> *)sliderPosition {
+- (nullable NSNumber<SDLInt> *)sliderPosition {
return [parameters objectForKey:SDLNameSliderPosition];
}
diff --git a/SmartDeviceLink/SDLSoftButton.h b/SmartDeviceLink/SDLSoftButton.h
index b89839d84..a5cc9d7a4 100644
--- a/SmartDeviceLink/SDLSoftButton.h
+++ b/SmartDeviceLink/SDLSoftButton.h
@@ -10,20 +10,23 @@
@class SDLImage;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler>
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler;
-- (instancetype)initWithType:(SDLSoftButtonType)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(SDLSystemAction)systemAction handler:(SDLRPCNotificationHandler)handler;
+- (instancetype)initWithType:(SDLSoftButtonType)type text:(nullable NSString *)text image:(nullable SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(nullable SDLSystemAction)systemAction handler:(nullable SDLRPCNotificationHandler)handler;
@property (copy, nonatomic) SDLRPCNotificationHandler handler;
@property (strong, nonatomic) SDLSoftButtonType type;
-@property (strong, nonatomic) NSString *text;
-@property (strong, nonatomic) SDLImage *image;
-@property (strong, nonatomic) NSNumber<SDLBool> *isHighlighted;
+@property (strong, nonatomic, nullable) NSString *text;
+@property (strong, nonatomic, nullable) SDLImage *image;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *isHighlighted;
@property (strong, nonatomic) NSNumber<SDLInt> *softButtonID;
-@property (strong, nonatomic) SDLSystemAction systemAction;
+@property (strong, nonatomic, nullable) SDLSystemAction systemAction;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSoftButton.m b/SmartDeviceLink/SDLSoftButton.m
index 248b07d8e..47af67dae 100644
--- a/SmartDeviceLink/SDLSoftButton.m
+++ b/SmartDeviceLink/SDLSoftButton.m
@@ -6,10 +6,11 @@
#import "SDLImage.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLSoftButton
-- (instancetype)initWithHandler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithHandler:(nullable SDLRPCNotificationHandler)handler {
self = [self init];
if (!self) {
return nil;
@@ -20,7 +21,7 @@
return self;
}
-- (instancetype)initWithType:(SDLSoftButtonType)type text:(NSString *)text image:(SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(SDLSystemAction)systemAction handler:(SDLRPCNotificationHandler)handler {
+- (instancetype)initWithType:(SDLSoftButtonType)type text:(nullable NSString *)text image:(nullable SDLImage *)image highlighted:(BOOL)highlighted buttonId:(UInt16)buttonId systemAction:(nullable SDLSystemAction)systemAction handler:(nullable SDLRPCNotificationHandler)handler {
self = [self initWithHandler:handler];
if (!self) {
return nil;
@@ -50,7 +51,7 @@
return (SDLSoftButtonType)obj;
}
-- (void)setText:(NSString *)text {
+- (void)setText:(nullable NSString *)text {
if (text != nil) {
[store setObject:text forKey:SDLNameText];
} else {
@@ -58,11 +59,11 @@
}
}
-- (NSString *)text {
+- (nullable NSString *)text {
return [store objectForKey:SDLNameText];
}
-- (void)setImage:(SDLImage *)image {
+- (void)setImage:(nullable SDLImage *)image {
if (image != nil) {
[store setObject:image forKey:SDLNameImage];
} else {
@@ -70,16 +71,16 @@
}
}
-- (SDLImage *)image {
+- (nullable SDLImage *)image {
NSObject *obj = [store objectForKey:SDLNameImage];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
-- (void)setIsHighlighted:(NSNumber<SDLBool> *)isHighlighted {
+- (void)setIsHighlighted:(nullable NSNumber<SDLBool> *)isHighlighted {
if (isHighlighted != nil) {
[store setObject:isHighlighted forKey:SDLNameIsHighlighted];
} else {
@@ -87,7 +88,7 @@
}
}
-- (NSNumber<SDLBool> *)isHighlighted {
+- (nullable NSNumber<SDLBool> *)isHighlighted {
return [store objectForKey:SDLNameIsHighlighted];
}
@@ -103,7 +104,7 @@
return [store objectForKey:SDLNameSoftButtonId];
}
-- (void)setSystemAction:(SDLSystemAction)systemAction {
+- (void)setSystemAction:(nullable SDLSystemAction)systemAction {
if (systemAction != nil) {
[store setObject:systemAction forKey:SDLNameSystemAction];
} else {
@@ -111,9 +112,11 @@
}
}
-- (SDLSystemAction)systemAction {
+- (nullable SDLSystemAction)systemAction {
NSObject *obj = [store objectForKey:SDLNameSystemAction];
return (SDLSystemAction)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSoftButtonCapabilities.h b/SmartDeviceLink/SDLSoftButtonCapabilities.h
index dfa524e87..c06cd026f 100644
--- a/SmartDeviceLink/SDLSoftButtonCapabilities.h
+++ b/SmartDeviceLink/SDLSoftButtonCapabilities.h
@@ -9,6 +9,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSoftButtonCapabilities : SDLRPCStruct
/**
@@ -46,3 +49,5 @@
@property (strong, nonatomic) NSNumber<SDLBool> *imageSupported;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSoftButtonCapabilities.m b/SmartDeviceLink/SDLSoftButtonCapabilities.m
index ed2171b1f..4dbc7ca2e 100644
--- a/SmartDeviceLink/SDLSoftButtonCapabilities.m
+++ b/SmartDeviceLink/SDLSoftButtonCapabilities.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSoftButtonCapabilities
- (void)setShortPressAvailable:(NSNumber<SDLBool> *)shortPressAvailable {
@@ -57,3 +59,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSpeak.h b/SmartDeviceLink/SDLSpeak.h
index 64550400f..528c3f133 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, nonatomic) NSMutableArray<SDLTTSChunk *> *ttsChunks;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSpeak.m b/SmartDeviceLink/SDLSpeak.m
index 858bfb27e..8236eb611 100644
--- a/SmartDeviceLink/SDLSpeak.m
+++ b/SmartDeviceLink/SDLSpeak.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLTTSChunk.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSpeak
- (instancetype)init {
@@ -53,3 +55,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSpeakResponse.h b/SmartDeviceLink/SDLSpeakResponse.h
index c241e7d37..8e4c44261 100644
--- a/SmartDeviceLink/SDLSpeakResponse.h
+++ b/SmartDeviceLink/SDLSpeakResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSpeakResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSpeakResponse.m b/SmartDeviceLink/SDLSpeakResponse.m
index fd9899636..d61fa37a3 100644
--- a/SmartDeviceLink/SDLSpeakResponse.m
+++ b/SmartDeviceLink/SDLSpeakResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSpeakResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLStartTime.h b/SmartDeviceLink/SDLStartTime.h
index cd6fb379e..5fbc0e987 100644
--- a/SmartDeviceLink/SDLStartTime.h
+++ b/SmartDeviceLink/SDLStartTime.h
@@ -9,6 +9,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLStartTime : SDLRPCStruct
- (instancetype)initWithHours:(UInt8)hours minutes:(UInt8)minutes seconds:(UInt8)seconds;
@@ -37,3 +40,5 @@
@property (strong, nonatomic) NSNumber<SDLInt> *seconds;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLStartTime.m b/SmartDeviceLink/SDLStartTime.m
index a8d9b304b..8071ad7ff 100644
--- a/SmartDeviceLink/SDLStartTime.m
+++ b/SmartDeviceLink/SDLStartTime.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLStartTime
- (instancetype)initWithHours:(UInt8)hours minutes:(UInt8)minutes seconds:(UInt8)seconds {
@@ -58,3 +60,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLStreamDelegate.h b/SmartDeviceLink/SDLStreamDelegate.h
index fdd8bfbac..f6b0115ad 100644
--- a/SmartDeviceLink/SDLStreamDelegate.h
+++ b/SmartDeviceLink/SDLStreamDelegate.h
@@ -3,6 +3,8 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
// Convenience typedefs
typedef void (^SDLStreamOpenHandler)(NSStream *stream);
typedef void (^SDLStreamHasBytesHandler)(NSInputStream *istream);
@@ -13,10 +15,12 @@ typedef void (^SDLStreamEndHandler)(NSStream *stream);
@interface SDLStreamDelegate : NSObject <NSStreamDelegate>
-@property (nonatomic, copy) SDLStreamOpenHandler streamOpenHandler;
-@property (nonatomic, copy) SDLStreamHasBytesHandler streamHasBytesHandler;
-@property (nonatomic, copy) SDLStreamHasSpaceHandler streamHasSpaceHandler;
-@property (nonatomic, copy) SDLStreamErrorHandler streamErrorHandler;
-@property (nonatomic, copy) SDLStreamEndHandler streamEndHandler;
+@property (nullable, nonatomic, copy) SDLStreamOpenHandler streamOpenHandler;
+@property (nullable, nonatomic, copy) SDLStreamHasBytesHandler streamHasBytesHandler;
+@property (nullable, nonatomic, copy) SDLStreamHasSpaceHandler streamHasSpaceHandler;
+@property (nullable, nonatomic, copy) SDLStreamErrorHandler streamErrorHandler;
+@property (nullable, nonatomic, copy) SDLStreamEndHandler streamEndHandler;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLStreamDelegate.m b/SmartDeviceLink/SDLStreamDelegate.m
index 6c2db6c34..1e60fb3f5 100644
--- a/SmartDeviceLink/SDLStreamDelegate.m
+++ b/SmartDeviceLink/SDLStreamDelegate.m
@@ -5,6 +5,8 @@
#import "SDLStreamDelegate.h"
#import "SDLDebugTool.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLStreamDelegate () {
dispatch_queue_t _input_stream_queue;
}
@@ -90,3 +92,5 @@ SDLStreamEndHandler defaultStreamEndHandler = ^(NSStream *stream) {
};
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeButton.h b/SmartDeviceLink/SDLSubscribeButton.h
index be25357a5..6b3465636 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, nonatomic) 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/SDLSubscribeButtonResponse.h b/SmartDeviceLink/SDLSubscribeButtonResponse.h
index bf9c22604..74a6fad0b 100644
--- a/SmartDeviceLink/SDLSubscribeButtonResponse.h
+++ b/SmartDeviceLink/SDLSubscribeButtonResponse.h
@@ -9,6 +9,11 @@
*
* Since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeButtonResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeButtonResponse.m b/SmartDeviceLink/SDLSubscribeButtonResponse.m
index 80a9b3a85..ca14f3861 100644
--- a/SmartDeviceLink/SDLSubscribeButtonResponse.m
+++ b/SmartDeviceLink/SDLSubscribeButtonResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSubscribeButtonResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.h b/SmartDeviceLink/SDLSubscribeVehicleData.h
index 81aea1508..4e0411d43 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, nonatomic) NSNumber<SDLBool> *gps;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gps;
/**
* @abstract A boolean value. If true, subscribes speed data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *speed;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *speed;
/**
* @abstract A boolean value. If true, subscribes rpm data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *rpm;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *rpm;
/**
* @abstract A boolean value. If true, subscribes FuelLevel data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel;
/**
* @abstract A boolean value. If true, subscribes fuelLevel_State data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *fuelLevel_State;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State;
/**
* @abstract A boolean value. If true, subscribes instantFuelConsumption data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *instantFuelConsumption;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *instantFuelConsumption;
/**
* @abstract A boolean value. If true, subscribes externalTemperature data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *externalTemperature;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
* @abstract A boolean value. If true, subscribes Currently selected gear data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *prndl;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;
/**
* @abstract A boolean value. If true, subscribes tire pressure status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *tirePressure;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *tirePressure;
/**
* @abstract A boolean value. If true, subscribes odometer data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *odometer;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *odometer;
/**
* @abstract A boolean value. If true, subscribes belt Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *beltStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *beltStatus;
/**
* @abstract A boolean value. If true, subscribes body Information data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *bodyInformation;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *bodyInformation;
/**
* @abstract A boolean value. If true, subscribes device Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *deviceStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *deviceStatus;
/**
* @abstract A boolean value. If true, subscribes driver Braking data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *driverBraking;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *driverBraking;
/**
* @abstract A boolean value. If true, subscribes wiper Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *wiperStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *wiperStatus;
/**
* @abstract A boolean value. If true, subscribes Head Lamp Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *headLampStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *headLampStatus;
/**
* @abstract A boolean value. If true, subscribes Engine Torque data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *engineTorque;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *engineTorque;
/**
* @abstract A boolean value. If true, means the accPedalPosition data has been
* subscribed.
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *accPedalPosition;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *accPedalPosition;
/**
* @abstract A boolean value. If true, means the steeringWheelAngle data has been
* subscribed.
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *steeringWheelAngle;
-@property (strong, nonatomic) NSNumber<SDLBool> *eCallInfo;
-@property (strong, nonatomic) NSNumber<SDLBool> *airbagStatus;
-@property (strong, nonatomic) NSNumber<SDLBool> *emergencyEvent;
-@property (strong, nonatomic) NSNumber<SDLBool> *clusterModeStatus;
-@property (strong, nonatomic) NSNumber<SDLBool> *myKey;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *steeringWheelAngle;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *eCallInfo;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *airbagStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *emergencyEvent;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *clusterModeStatus;
+@property (strong, nonatomic, nullable) 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/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
index eaa852d56..ede67c21c 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
@@ -11,106 +11,109 @@
*
* Since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeVehicleDataResponse : SDLRPCResponse
/**
* @abstract A SDLVehicleDataResult* value. See GPSData.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *gps;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *gps;
/**
* @abstract A SDLVehicleDataResult* value. The vehicle speed in kilometers per hour.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *speed;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *speed;
/**
* @abstract A SDLVehicleDataResult* value. The number of revolutions per minute of the engine.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *rpm;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *rpm;
/**
* @abstract A SDLVehicleDataResult* value. The fuel level in the tank (percentage)
*/
-@property (strong, nonatomic) SDLVehicleDataResult *fuelLevel;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel;
/**
* @abstract A SDLVehicleDataResult* value. The fuel level state.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *fuelLevel_State;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel_State;
/**
* @abstract A SDLVehicleDataResult* value. The instantaneous fuel consumption in microlitres.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *instantFuelConsumption;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *instantFuelConsumption;
/**
* @abstract A SDLVehicleDataResult* value. The external temperature in degrees celsius.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *externalTemperature;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
* @abstract A SDLVehicleDataResult* value. See PRNDL.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *prndl;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl;
/**
* @abstract A SDLVehicleDataResult* value. See TireStatus.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *tirePressure;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *tirePressure;
/**
* @abstract A SDLVehicleDataResult* value. Odometer in km.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *odometer;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *odometer;
/**
* @abstract A SDLVehicleDataResult* value. The status of the seat belts.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *beltStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *beltStatus;
/**
* @abstract A SDLVehicleDataResult* value. The body information including power modes.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *bodyInformation;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *bodyInformation;
/**
* @abstract A SDLVehicleDataResult* value. The device status including signal and battery strength.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *deviceStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *deviceStatus;
/**
* @abstract A SDLVehicleDataResult* value. The status of the brake pedal.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *driverBraking;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *driverBraking;
/**
* @abstract A SDLVehicleDataResult* value. The status of the wipers.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *wiperStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *wiperStatus;
/**
* @abstract A SDLVehicleDataResult* value. Status of the head lamps.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *headLampStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *headLampStatus;
/**
* @abstract A SDLVehicleDataResult* value. Torque value for engine (in Nm) on non-diesel variants.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *engineTorque;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *engineTorque;
/**
* @abstract A SDLVehicleDataResult* value. Accelerator pedal position (percentage depressed)
*/
-@property (strong, nonatomic) SDLVehicleDataResult *accPedalPosition;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *accPedalPosition;
/**
* @abstract A SDLVehicleDataResult* value. Current angle of the steering wheel (in deg)
*/
-@property (strong, nonatomic) SDLVehicleDataResult *steeringWheelAngle;
-@property (strong, nonatomic) SDLVehicleDataResult *eCallInfo;
-@property (strong, nonatomic) SDLVehicleDataResult *airbagStatus;
-@property (strong, nonatomic) SDLVehicleDataResult *emergencyEvent;
-@property (strong, nonatomic) SDLVehicleDataResult *clusterModes;
-@property (strong, nonatomic) SDLVehicleDataResult *myKey;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *steeringWheelAngle;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *eCallInfo;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *airbagStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *emergencyEvent;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *clusterModes;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *myKey;
@end
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
index c251fb60f..554dc7738 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLVehicleDataResult.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSubscribeVehicleDataResponse
- (instancetype)init {
@@ -15,7 +17,7 @@
return self;
}
-- (void)setGps:(SDLVehicleDataResult *)gps {
+- (void)setGps:(nullable SDLVehicleDataResult *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -23,16 +25,16 @@
}
}
-- (SDLVehicleDataResult *)gps {
+- (nullable SDLVehicleDataResult *)gps {
NSObject *obj = [parameters objectForKey:SDLNameGPS];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setSpeed:(SDLVehicleDataResult *)speed {
+- (void)setSpeed:(nullable SDLVehicleDataResult *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -40,16 +42,16 @@
}
}
-- (SDLVehicleDataResult *)speed {
+- (nullable SDLVehicleDataResult *)speed {
NSObject *obj = [parameters objectForKey:SDLNameSpeed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setRpm:(SDLVehicleDataResult *)rpm {
+- (void)setRpm:(nullable SDLVehicleDataResult *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -57,16 +59,16 @@
}
}
-- (SDLVehicleDataResult *)rpm {
+- (nullable SDLVehicleDataResult *)rpm {
NSObject *obj = [parameters objectForKey:SDLNameRPM];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setFuelLevel:(SDLVehicleDataResult *)fuelLevel {
+- (void)setFuelLevel:(nullable SDLVehicleDataResult *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -74,16 +76,16 @@
}
}
-- (SDLVehicleDataResult *)fuelLevel {
+- (nullable SDLVehicleDataResult *)fuelLevel {
NSObject *obj = [parameters objectForKey:SDLNameFuelLevel];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setFuelLevel_State:(SDLVehicleDataResult *)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable SDLVehicleDataResult *)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -91,16 +93,16 @@
}
}
-- (SDLVehicleDataResult *)fuelLevel_State {
+- (nullable SDLVehicleDataResult *)fuelLevel_State {
NSObject *obj = [parameters objectForKey:SDLNameFuelLevelState];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setInstantFuelConsumption:(SDLVehicleDataResult *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -108,16 +110,16 @@
}
}
-- (SDLVehicleDataResult *)instantFuelConsumption {
+- (nullable SDLVehicleDataResult *)instantFuelConsumption {
NSObject *obj = [parameters objectForKey:SDLNameInstantFuelConsumption];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setExternalTemperature:(SDLVehicleDataResult *)externalTemperature {
+- (void)setExternalTemperature:(nullable SDLVehicleDataResult *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -125,16 +127,16 @@
}
}
-- (SDLVehicleDataResult *)externalTemperature {
+- (nullable SDLVehicleDataResult *)externalTemperature {
NSObject *obj = [parameters objectForKey:SDLNameExternalTemperature];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setPrndl:(SDLVehicleDataResult *)prndl {
+- (void)setPrndl:(nullable SDLVehicleDataResult *)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -142,16 +144,16 @@
}
}
-- (SDLVehicleDataResult *)prndl {
+- (nullable SDLVehicleDataResult *)prndl {
NSObject *obj = [parameters objectForKey:SDLNamePRNDL];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setTirePressure:(SDLVehicleDataResult *)tirePressure {
+- (void)setTirePressure:(nullable SDLVehicleDataResult *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -159,16 +161,16 @@
}
}
-- (SDLVehicleDataResult *)tirePressure {
+- (nullable SDLVehicleDataResult *)tirePressure {
NSObject *obj = [parameters objectForKey:SDLNameTirePressure];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setOdometer:(SDLVehicleDataResult *)odometer {
+- (void)setOdometer:(nullable SDLVehicleDataResult *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -176,16 +178,16 @@
}
}
-- (SDLVehicleDataResult *)odometer {
+- (nullable SDLVehicleDataResult *)odometer {
NSObject *obj = [parameters objectForKey:SDLNameOdometer];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setBeltStatus:(SDLVehicleDataResult *)beltStatus {
+- (void)setBeltStatus:(nullable SDLVehicleDataResult *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -193,16 +195,16 @@
}
}
-- (SDLVehicleDataResult *)beltStatus {
+- (nullable SDLVehicleDataResult *)beltStatus {
NSObject *obj = [parameters objectForKey:SDLNameBeltStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setBodyInformation:(SDLVehicleDataResult *)bodyInformation {
+- (void)setBodyInformation:(nullable SDLVehicleDataResult *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -210,16 +212,16 @@
}
}
-- (SDLVehicleDataResult *)bodyInformation {
+- (nullable SDLVehicleDataResult *)bodyInformation {
NSObject *obj = [parameters objectForKey:SDLNameBodyInformation];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setDeviceStatus:(SDLVehicleDataResult *)deviceStatus {
+- (void)setDeviceStatus:(nullable SDLVehicleDataResult *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -227,16 +229,16 @@
}
}
-- (SDLVehicleDataResult *)deviceStatus {
+- (nullable SDLVehicleDataResult *)deviceStatus {
NSObject *obj = [parameters objectForKey:SDLNameDeviceStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setDriverBraking:(SDLVehicleDataResult *)driverBraking {
+- (void)setDriverBraking:(nullable SDLVehicleDataResult *)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -244,16 +246,16 @@
}
}
-- (SDLVehicleDataResult *)driverBraking {
+- (nullable SDLVehicleDataResult *)driverBraking {
NSObject *obj = [parameters objectForKey:SDLNameDriverBraking];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setWiperStatus:(SDLVehicleDataResult *)wiperStatus {
+- (void)setWiperStatus:(nullable SDLVehicleDataResult *)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -261,16 +263,16 @@
}
}
-- (SDLVehicleDataResult *)wiperStatus {
+- (nullable SDLVehicleDataResult *)wiperStatus {
NSObject *obj = [parameters objectForKey:SDLNameWiperStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setHeadLampStatus:(SDLVehicleDataResult *)headLampStatus {
+- (void)setHeadLampStatus:(nullable SDLVehicleDataResult *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -278,16 +280,16 @@
}
}
-- (SDLVehicleDataResult *)headLampStatus {
+- (nullable SDLVehicleDataResult *)headLampStatus {
NSObject *obj = [parameters objectForKey:SDLNameHeadLampStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setEngineTorque:(SDLVehicleDataResult *)engineTorque {
+- (void)setEngineTorque:(nullable SDLVehicleDataResult *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -295,16 +297,16 @@
}
}
-- (SDLVehicleDataResult *)engineTorque {
+- (nullable SDLVehicleDataResult *)engineTorque {
NSObject *obj = [parameters objectForKey:SDLNameEngineTorque];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setAccPedalPosition:(SDLVehicleDataResult *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -312,16 +314,16 @@
}
}
-- (SDLVehicleDataResult *)accPedalPosition {
+- (nullable SDLVehicleDataResult *)accPedalPosition {
NSObject *obj = [parameters objectForKey:SDLNameAccelerationPedalPosition];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setSteeringWheelAngle:(SDLVehicleDataResult *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -329,16 +331,16 @@
}
}
-- (SDLVehicleDataResult *)steeringWheelAngle {
+- (nullable SDLVehicleDataResult *)steeringWheelAngle {
NSObject *obj = [parameters objectForKey:SDLNameSteeringWheelAngle];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setECallInfo:(SDLVehicleDataResult *)eCallInfo {
+- (void)setECallInfo:(nullable SDLVehicleDataResult *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -346,16 +348,16 @@
}
}
-- (SDLVehicleDataResult *)eCallInfo {
+- (nullable SDLVehicleDataResult *)eCallInfo {
NSObject *obj = [parameters objectForKey:SDLNameECallInfo];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setAirbagStatus:(SDLVehicleDataResult *)airbagStatus {
+- (void)setAirbagStatus:(nullable SDLVehicleDataResult *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -363,16 +365,16 @@
}
}
-- (SDLVehicleDataResult *)airbagStatus {
+- (nullable SDLVehicleDataResult *)airbagStatus {
NSObject *obj = [parameters objectForKey:SDLNameAirbagStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setEmergencyEvent:(SDLVehicleDataResult *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -380,16 +382,16 @@
}
}
-- (SDLVehicleDataResult *)emergencyEvent {
+- (nullable SDLVehicleDataResult *)emergencyEvent {
NSObject *obj = [parameters objectForKey:SDLNameEmergencyEvent];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setClusterModes:(SDLVehicleDataResult *)clusterModes {
+- (void)setClusterModes:(nullable SDLVehicleDataResult *)clusterModes {
if (clusterModes != nil) {
[parameters setObject:clusterModes forKey:SDLNameClusterModes];
} else {
@@ -397,16 +399,16 @@
}
}
-- (SDLVehicleDataResult *)clusterModes {
+- (nullable SDLVehicleDataResult *)clusterModes {
NSObject *obj = [parameters objectForKey:SDLNameClusterModes];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setMyKey:(SDLVehicleDataResult *)myKey {
+- (void)setMyKey:(nullable SDLVehicleDataResult *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -414,13 +416,15 @@
}
}
-- (SDLVehicleDataResult *)myKey {
+- (nullable SDLVehicleDataResult *)myKey {
NSObject *obj = [parameters objectForKey:SDLNameMyKey];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeWaypoints.h b/SmartDeviceLink/SDLSubscribeWaypoints.h
index fb04caf97..fc5860f25 100644
--- a/SmartDeviceLink/SDLSubscribeWaypoints.h
+++ b/SmartDeviceLink/SDLSubscribeWaypoints.h
@@ -10,10 +10,19 @@
* @see SDLUnsubscribeWaypoints
*
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeWayPoints : SDLRPCRequest
@end
+NS_ASSUME_NONNULL_END
+
+NS_ASSUME_NONNULL_BEGIN
+
__deprecated_msg("Use SDLSubscribeWayPoints instead")
- @interface SDLSubscribeWaypoints : SDLSubscribeWayPoints
- @end
+@interface SDLSubscribeWaypoints : SDLSubscribeWayPoints
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeWaypoints.m b/SmartDeviceLink/SDLSubscribeWaypoints.m
index 377c92c8b..d3fff74af 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 {
@@ -14,6 +16,12 @@
@end
+NS_ASSUME_NONNULL_END
+
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSubscribeWaypoints
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeWaypointsResponse.h b/SmartDeviceLink/SDLSubscribeWaypointsResponse.h
index cd13c2af6..e70700974 100644
--- a/SmartDeviceLink/SDLSubscribeWaypointsResponse.h
+++ b/SmartDeviceLink/SDLSubscribeWaypointsResponse.h
@@ -3,10 +3,14 @@
#import "SDLRPCResponse.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSubscribeWayPointsResponse : SDLRPCResponse
@end
__deprecated_msg("Use SDLSubscribeWayPointsResponse instead")
- @interface SDLSubscribeWaypointsResponse : SDLSubscribeWayPointsResponse
- @end
+@interface SDLSubscribeWaypointsResponse : SDLSubscribeWayPointsResponse
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSyncMsgVersion.h b/SmartDeviceLink/SDLSyncMsgVersion.h
index 899e86193..7f94afdbf 100644
--- a/SmartDeviceLink/SDLSyncMsgVersion.h
+++ b/SmartDeviceLink/SDLSyncMsgVersion.h
@@ -9,6 +9,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSyncMsgVersion : SDLRPCStruct
// TODO: (Alex M.)[2016-12-1] Change from NSInteger to UInt8
@@ -28,3 +31,5 @@
@property (strong, nonatomic) NSNumber<SDLInt> *minorVersion;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSyncMsgVersion.m b/SmartDeviceLink/SDLSyncMsgVersion.m
index 2ea09ecb1..5bf3fd2a8 100644
--- a/SmartDeviceLink/SDLSyncMsgVersion.m
+++ b/SmartDeviceLink/SDLSyncMsgVersion.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSyncMsgVersion
- (instancetype)initWithMajorVersion:(NSInteger)majorVersion minorVersion:(NSInteger)minorVersion {
@@ -48,3 +50,5 @@
return [NSString stringWithFormat:@"%@.%@", self.majorVersion, self.minorVersion];
}
@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/SDLSyncPDataResponse.h b/SmartDeviceLink/SDLSyncPDataResponse.h
index be1905ba1..ae3034a46 100644
--- a/SmartDeviceLink/SDLSyncPDataResponse.h
+++ b/SmartDeviceLink/SDLSyncPDataResponse.h
@@ -4,6 +4,10 @@
#import "SDLRPCResponse.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSyncPDataResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSyncPDataResponse.m b/SmartDeviceLink/SDLSyncPDataResponse.m
index 95dbbf905..f6faea873 100644
--- a/SmartDeviceLink/SDLSyncPDataResponse.m
+++ b/SmartDeviceLink/SDLSyncPDataResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSyncPDataResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemRequest.h b/SmartDeviceLink/SDLSystemRequest.h
index 6bc6bf58e..a39b1f712 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, nonatomic) SDLRequestType requestType;
-@property (strong, nonatomic) NSString *fileName;
+@property (strong, nonatomic, nullable) 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/SDLSystemRequestResponse.h b/SmartDeviceLink/SDLSystemRequestResponse.h
index 805962d3c..306ad48ea 100644
--- a/SmartDeviceLink/SDLSystemRequestResponse.h
+++ b/SmartDeviceLink/SDLSystemRequestResponse.h
@@ -7,6 +7,11 @@
/** SDLSystemRequestResponse is sent, when SDLSystemRequest has been called.
* Since<b>SmartDeviceLink 3.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLSystemRequestResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSystemRequestResponse.m b/SmartDeviceLink/SDLSystemRequestResponse.m
index 8d12fe6a8..25154c3ab 100644
--- a/SmartDeviceLink/SDLSystemRequestResponse.m
+++ b/SmartDeviceLink/SDLSystemRequestResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLSystemRequestResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTCPTransport.h b/SmartDeviceLink/SDLTCPTransport.h
index d407d03a2..ed8da7e41 100644
--- a/SmartDeviceLink/SDLTCPTransport.h
+++ b/SmartDeviceLink/SDLTCPTransport.h
@@ -3,11 +3,15 @@
#import "SDLAbstractTransport.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTCPTransport : SDLAbstractTransport {
- CFSocketRef socket;
+ _Nullable CFSocketRef socket;
}
@property (strong, nonatomic) NSString *hostName;
@property (strong, nonatomic) NSString *portNumber;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink/SDLTCPTransport.m
index cf46578cb..e1f59aae7 100644
--- a/SmartDeviceLink/SDLTCPTransport.m
+++ b/SmartDeviceLink/SDLTCPTransport.m
@@ -15,13 +15,13 @@
#import <sys/wait.h>
#import <unistd.h>
+NS_ASSUME_NONNULL_BEGIN
// C function forward declarations.
int call_socket(const char *hostname, const char *port);
static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info);
@interface SDLTCPTransport () {
- BOOL _alreadyDestructed;
dispatch_queue_t _sendQueue;
}
@@ -32,7 +32,6 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
- (instancetype)init {
if (self = [super init]) {
- _alreadyDestructed = NO;
_sendQueue = dispatch_queue_create("com.sdl.transport.tcp.transmit", DISPATCH_QUEUE_SERIAL);
[SDLDebugTool logInfo:@"SDLTCPTransport Init"
withType:SDLDebugType_Transport_iAP
@@ -43,6 +42,9 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
return self;
}
+- (void)dealloc {
+ [self disconnect];
+}
- (void)connect {
[SDLDebugTool logInfo:@"TCP Transport attempt connect" withType:SDLDebugType_Transport_TCP];
@@ -87,30 +89,16 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
});
}
-- (void)destructObjects {
+- (void)disconnect {
[SDLDebugTool logInfo:@"SDLTCPTransport invalidate and dispose"];
-
- if (!_alreadyDestructed) {
- _alreadyDestructed = YES;
- if (socket != nil) {
- CFSocketInvalidate(socket);
- CFRelease(socket);
- }
+
+ if (socket != nil) {
+ CFSocketInvalidate(socket);
+ CFRelease(socket);
+ socket = nil;
}
}
-- (void)disconnect {
- [self dispose];
-}
-
-- (void)dispose {
- [self destructObjects];
-}
-
-- (void)dealloc {
- [self destructObjects];
-}
-
@end
// C functions
@@ -179,3 +167,5 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef
[SDLDebugTool logInfo:logMessage withType:SDLDebugType_Transport_TCP toOutput:SDLDebugOutput_DeviceConsole];
}
}
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTTSChunk.h b/SmartDeviceLink/SDLTTSChunk.h
index 3ad294e8d..ad7690ef0 100644
--- a/SmartDeviceLink/SDLTTSChunk.h
+++ b/SmartDeviceLink/SDLTTSChunk.h
@@ -36,6 +36,9 @@
*
* @since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTTSChunk : SDLRPCStruct
- (instancetype)initWithText:(NSString *)text type:(SDLSpeechCapabilities)type;
@@ -66,3 +69,5 @@
@property (strong, nonatomic) SDLSpeechCapabilities type;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTTSChunk.m b/SmartDeviceLink/SDLTTSChunk.m
index f9324d807..2cc70652d 100644
--- a/SmartDeviceLink/SDLTTSChunk.m
+++ b/SmartDeviceLink/SDLTTSChunk.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLTTSChunk
- (instancetype)initWithText:(NSString *)text type:(SDLSpeechCapabilities)type {
@@ -39,7 +41,7 @@
return [self sdl_chunksFromString:nil type:SDLSpeechCapabilitiesSilence];
}
-+ (NSMutableArray<SDLTTSChunk *> *)sdl_chunksFromString:(NSString *)string type:(SDLSpeechCapabilities)type {
++ (nullable NSMutableArray<SDLTTSChunk *> *)sdl_chunksFromString:(nullable NSString *)string type:(SDLSpeechCapabilities)type {
if (string.length == 0) {
return nil;
}
@@ -73,3 +75,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTTSChunkFactory.h b/SmartDeviceLink/SDLTTSChunkFactory.h
new file mode 100644
index 000000000..0a0801e32
--- /dev/null
+++ b/SmartDeviceLink/SDLTTSChunkFactory.h
@@ -0,0 +1,19 @@
+// SDLTTSChunkFactory.h
+//
+
+#import <Foundation/Foundation.h>
+
+#import "SDLSpeechCapabilities.h"
+
+@class SDLTTSChunk;
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface SDLTTSChunkFactory : NSObject
+
++ (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities)type __deprecated_msg("use SDLTTSChunk's initWithText:type: instead");
++ (NSMutableArray<SDLTTSChunk *> *)buildTTSChunksFromSimple:(NSString *)simple __deprecated_msg("use SDLTTSChunk's textChunksFromString: instead");
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTTSChunkFactory.m b/SmartDeviceLink/SDLTTSChunkFactory.m
new file mode 100644
index 000000000..e14bf4833
--- /dev/null
+++ b/SmartDeviceLink/SDLTTSChunkFactory.m
@@ -0,0 +1,24 @@
+// SDLTTSChunkFactory.m
+//
+
+#import "SDLTTSChunkFactory.h"
+
+#import "SDLTTSChunk.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLTTSChunkFactory
+
++ (SDLTTSChunk *)buildTTSChunkForString:(NSString *)text type:(SDLSpeechCapabilities)type {
+ SDLTTSChunk *ret = [[SDLTTSChunk alloc] initWithText:text type:type];
+
+ return ret;
+}
+
++ (NSMutableArray<SDLTTSChunk *> *)buildTTSChunksFromSimple:(NSString *)simple {
+ return [NSMutableArray arrayWithObject:[SDLTTSChunkFactory buildTTSChunkForString:simple type:SDLSpeechCapabilitiesText]];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTextField.h b/SmartDeviceLink/SDLTextField.h
index 8b2cec18b..2546b2cf1 100644
--- a/SmartDeviceLink/SDLTextField.h
+++ b/SmartDeviceLink/SDLTextField.h
@@ -56,6 +56,9 @@
*
* @since SDL 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTextField : SDLRPCStruct
/**
@@ -91,3 +94,5 @@
@property (strong, nonatomic) NSNumber<SDLInt> *rows;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTextField.m b/SmartDeviceLink/SDLTextField.m
index 21d2bca7c..a54a32828 100644
--- a/SmartDeviceLink/SDLTextField.m
+++ b/SmartDeviceLink/SDLTextField.m
@@ -7,6 +7,7 @@
#import "SDLNames.h"
#import "SDLTextFieldName.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLTextField
@@ -61,3 +62,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTimer.h b/SmartDeviceLink/SDLTimer.h
index 3af2e12d9..0382b7f67 100644
--- a/SmartDeviceLink/SDLTimer.h
+++ b/SmartDeviceLink/SDLTimer.h
@@ -4,10 +4,12 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTimer : NSObject
-@property (copy, nonatomic) void (^elapsedBlock)(void);
-@property (copy, nonatomic) void (^canceledBlock)(void);
+@property (copy, nonatomic, nullable) void (^elapsedBlock)(void);
+@property (copy, nonatomic, nullable) void (^canceledBlock)(void);
@property (assign, nonatomic) float duration;
- (instancetype)init;
@@ -17,3 +19,5 @@
- (void)cancel;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTimer.m b/SmartDeviceLink/SDLTimer.m
index 6058e1b39..f689ce0c7 100644
--- a/SmartDeviceLink/SDLTimer.m
+++ b/SmartDeviceLink/SDLTimer.m
@@ -4,10 +4,11 @@
#import "SDLTimer.h"
+NS_ASSUME_NONNULL_BEGIN
@interface SDLTimer ()
-@property (strong, nonatomic) NSTimer *timer;
+@property (strong, nonatomic, nullable) NSTimer *timer;
@property (assign, nonatomic) BOOL timerRunning;
@property (assign, nonatomic) BOOL repeat;
@end
@@ -37,6 +38,10 @@
return self;
}
+- (void)dealloc {
+ [self cancel];
+}
+
- (void)start {
if (self.duration > 0) {
[self stopAndDestroyTimer];
@@ -72,8 +77,6 @@
}
}
-- (void)dealloc {
- [self cancel];
-}
-
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTireStatus.h b/SmartDeviceLink/SDLTireStatus.h
index 151066640..51e3a9db0 100644
--- a/SmartDeviceLink/SDLTireStatus.h
+++ b/SmartDeviceLink/SDLTireStatus.h
@@ -3,9 +3,12 @@
#import "SDLRPCMessage.h"
-@class SDLSingleTireStatus;
#import "SDLWarningLightStatus.h"
+@class SDLSingleTireStatus;
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTireStatus : SDLRPCStruct
@property (strong, nonatomic) SDLWarningLightStatus pressureTelltale;
@@ -17,3 +20,5 @@
@property (strong, nonatomic) SDLSingleTireStatus *innerRightRear;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTireStatus.m b/SmartDeviceLink/SDLTireStatus.m
index 495c0d3d3..cdfa75548 100644
--- a/SmartDeviceLink/SDLTireStatus.m
+++ b/SmartDeviceLink/SDLTireStatus.m
@@ -5,7 +5,8 @@
#import "SDLNames.h"
#import "SDLSingleTireStatus.h"
-#import "SDLWarningLightStatus.h"
+
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLTireStatus
@@ -32,11 +33,12 @@
- (SDLSingleTireStatus *)leftFront {
NSObject *obj = [store objectForKey:SDLNameLeftFront];
- if (obj == nil || [obj isKindOfClass:SDLSingleTireStatus.class]) {
- return (SDLSingleTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSingleTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSingleTireStatus*)obj;
+
}
- (void)setRightFront:(SDLSingleTireStatus *)rightFront {
@@ -49,11 +51,11 @@
- (SDLSingleTireStatus *)rightFront {
NSObject *obj = [store objectForKey:SDLNameRightFront];
- if (obj == nil || [obj isKindOfClass:SDLSingleTireStatus.class]) {
- return (SDLSingleTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSingleTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSingleTireStatus*)obj;
}
- (void)setLeftRear:(SDLSingleTireStatus *)leftRear {
@@ -66,11 +68,11 @@
- (SDLSingleTireStatus *)leftRear {
NSObject *obj = [store objectForKey:SDLNameLeftRear];
- if (obj == nil || [obj isKindOfClass:SDLSingleTireStatus.class]) {
- return (SDLSingleTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSingleTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSingleTireStatus*)obj;
}
- (void)setRightRear:(SDLSingleTireStatus *)rightRear {
@@ -83,11 +85,11 @@
- (SDLSingleTireStatus *)rightRear {
NSObject *obj = [store objectForKey:SDLNameRightRear];
- if (obj == nil || [obj isKindOfClass:SDLSingleTireStatus.class]) {
- return (SDLSingleTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSingleTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSingleTireStatus*)obj;
}
- (void)setInnerLeftRear:(SDLSingleTireStatus *)innerLeftRear {
@@ -100,11 +102,11 @@
- (SDLSingleTireStatus *)innerLeftRear {
NSObject *obj = [store objectForKey:SDLNameInnerLeftRear];
- if (obj == nil || [obj isKindOfClass:SDLSingleTireStatus.class]) {
- return (SDLSingleTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSingleTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSingleTireStatus*)obj;
}
- (void)setInnerRightRear:(SDLSingleTireStatus *)innerRightRear {
@@ -117,11 +119,13 @@
- (SDLSingleTireStatus *)innerRightRear {
NSObject *obj = [store objectForKey:SDLNameInnerRightRear];
- if (obj == nil || [obj isKindOfClass:SDLSingleTireStatus.class]) {
- return (SDLSingleTireStatus *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLSingleTireStatus alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLSingleTireStatus*)obj;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchCoord.h b/SmartDeviceLink/SDLTouchCoord.h
index 0a3a4482a..156511585 100644
--- a/SmartDeviceLink/SDLTouchCoord.h
+++ b/SmartDeviceLink/SDLTouchCoord.h
@@ -4,9 +4,13 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTouchCoord : SDLRPCStruct
@property (strong, nonatomic) NSNumber<SDLFloat> *x;
@property (strong, nonatomic) NSNumber<SDLFloat> *y;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchCoord.m b/SmartDeviceLink/SDLTouchCoord.m
index 40a842140..247794737 100644
--- a/SmartDeviceLink/SDLTouchCoord.m
+++ b/SmartDeviceLink/SDLTouchCoord.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLTouchCoord
- (void)setX:(NSNumber<SDLFloat> *)x {
@@ -33,3 +35,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchEvent.h b/SmartDeviceLink/SDLTouchEvent.h
index dec37ea9c..353b0a625 100644
--- a/SmartDeviceLink/SDLTouchEvent.h
+++ b/SmartDeviceLink/SDLTouchEvent.h
@@ -6,6 +6,8 @@
@class SDLTouchCoord;
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTouchEvent : SDLRPCStruct
/**
@@ -36,3 +38,5 @@
@property (strong, nonatomic) NSMutableArray<SDLTouchCoord *> *coord;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchEvent.m b/SmartDeviceLink/SDLTouchEvent.m
index 632bc6994..db8062311 100644
--- a/SmartDeviceLink/SDLTouchEvent.m
+++ b/SmartDeviceLink/SDLTouchEvent.m
@@ -7,6 +7,8 @@
#import "SDLNames.h"
#import "SDLTouchCoord.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLTouchEvent
- (void)setTouchEventId:(NSNumber<SDLInt> *)touchEventId {
@@ -55,3 +57,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchEventCapabilities.h b/SmartDeviceLink/SDLTouchEventCapabilities.h
index 829eb7743..87bb68bf4 100644
--- a/SmartDeviceLink/SDLTouchEventCapabilities.h
+++ b/SmartDeviceLink/SDLTouchEventCapabilities.h
@@ -4,6 +4,8 @@
#import "SDLRPCMessage.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLTouchEventCapabilities : SDLRPCStruct
@property (strong, nonatomic) NSNumber<SDLBool> *pressAvailable;
@@ -11,3 +13,5 @@
@property (strong, nonatomic) NSNumber<SDLBool> *doublePressAvailable;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTouchEventCapabilities.m b/SmartDeviceLink/SDLTouchEventCapabilities.m
index 1f307ede6..894e78c79 100644
--- a/SmartDeviceLink/SDLTouchEventCapabilities.m
+++ b/SmartDeviceLink/SDLTouchEventCapabilities.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLTouchEventCapabilities
- (void)setPressAvailable:(NSNumber<SDLBool> *)pressAvailable {
@@ -45,3 +47,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTransportDelegate.h b/SmartDeviceLink/SDLTransportDelegate.h
index 4f4abe33f..78d3d77c4 100644
--- a/SmartDeviceLink/SDLTransportDelegate.h
+++ b/SmartDeviceLink/SDLTransportDelegate.h
@@ -1,10 +1,14 @@
// SDLTransportDelegate.h
//
+NS_ASSUME_NONNULL_BEGIN
+
@protocol SDLTransportDelegate <NSObject>
- (void)onTransportConnected;
- (void)onTransportDisconnected;
- (void)onDataReceived:(NSData *)receivedData;
-@end \ No newline at end of file
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTurn.h b/SmartDeviceLink/SDLTurn.h
index eb2111854..f895d07eb 100644
--- a/SmartDeviceLink/SDLTurn.h
+++ b/SmartDeviceLink/SDLTurn.h
@@ -5,12 +5,15 @@
@class SDLImage;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLTurn : SDLRPCStruct
-- (instancetype)initWithNavigationText:(NSString *)navigationText turnIcon:(SDLImage *)icon;
+- (instancetype)initWithNavigationText:(nullable NSString *)navigationText turnIcon:(nullable SDLImage *)icon;
-@property (strong, nonatomic) NSString *navigationText;
-@property (strong, nonatomic) SDLImage *turnIcon;
+@property (strong, nonatomic, nullable) NSString *navigationText;
+@property (strong, nonatomic, nullable) SDLImage *turnIcon;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLTurn.m b/SmartDeviceLink/SDLTurn.m
index c02a71a04..cd4dd78e4 100644
--- a/SmartDeviceLink/SDLTurn.m
+++ b/SmartDeviceLink/SDLTurn.m
@@ -6,10 +6,11 @@
#import "SDLImage.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLTurn
-- (instancetype)initWithNavigationText:(NSString *)navigationText turnIcon:(SDLImage *)icon {
+- (instancetype)initWithNavigationText:(nullable NSString *)navigationText turnIcon:(nullable SDLImage *)icon {
self = [self init];
if (!self) {
return nil;
@@ -21,7 +22,7 @@
return self;
}
-- (void)setNavigationText:(NSString *)navigationText {
+- (void)setNavigationText:(nullable NSString *)navigationText {
if (navigationText != nil) {
[store setObject:navigationText forKey:SDLNameNavigationText];
} else {
@@ -29,11 +30,11 @@
}
}
-- (NSString *)navigationText {
+- (nullable NSString *)navigationText {
return [store objectForKey:SDLNameNavigationText];
}
-- (void)setTurnIcon:(SDLImage *)turnIcon {
+- (void)setTurnIcon:(nullable SDLImage *)turnIcon {
if (turnIcon != nil) {
[store setObject:turnIcon forKey:SDLNameTurnIcon];
} else {
@@ -41,13 +42,15 @@
}
}
-- (SDLImage *)turnIcon {
+- (nullable SDLImage *)turnIcon {
NSObject *obj = [store objectForKey:SDLNameTurnIcon];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
@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/SDLUnregisterAppInterfaceResponse.h b/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h
index 1c6420f8e..c7088fc3e 100644
--- a/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h
+++ b/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.h
@@ -9,6 +9,11 @@
*
* @since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnregisterAppInterfaceResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m b/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m
index ca1b8953c..dcc9d39bf 100644
--- a/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m
+++ b/SmartDeviceLink/SDLUnregisterAppInterfaceResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnregisterAppInterfaceResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeButton.h b/SmartDeviceLink/SDLUnsubscribeButton.h
index 2be6fc823..edfa5ae20 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, nonatomic) 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/SDLUnsubscribeButtonResponse.h b/SmartDeviceLink/SDLUnsubscribeButtonResponse.h
index 8dc43fad7..941cea512 100644
--- a/SmartDeviceLink/SDLUnsubscribeButtonResponse.h
+++ b/SmartDeviceLink/SDLUnsubscribeButtonResponse.h
@@ -9,6 +9,11 @@
*
* @since SmartDeviceLink 1.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeButtonResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeButtonResponse.m b/SmartDeviceLink/SDLUnsubscribeButtonResponse.m
index 2f45d790e..d85f149cb 100644
--- a/SmartDeviceLink/SDLUnsubscribeButtonResponse.m
+++ b/SmartDeviceLink/SDLUnsubscribeButtonResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnsubscribeButtonResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
index c8f028c6b..fc7938075 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, nonatomic) NSNumber<SDLBool> *gps;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *gps;
/**
* @abstract A boolean value. If true, unsubscribes speed data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *speed;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *speed;
/**
* @abstract A boolean value. If true, unsubscribe data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *rpm;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *rpm;
/**
* @abstract A boolean value. If true, unsubscribes FuelLevel data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *fuelLevel;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel;
/**
* @abstract A boolean value. If true, unsubscribes fuelLevel_State data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *fuelLevel_State;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel_State;
/**
* @abstract A boolean value. If true, unsubscribes instantFuelConsumption data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *instantFuelConsumption;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *instantFuelConsumption;
/**
* @abstract A boolean value. If true, unsubscribes externalTemperature data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *externalTemperature;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
* @abstract A boolean value. If true, unsubscribes Currently selected gear data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *prndl;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;
/**
* @abstract A boolean value. If true, unsubscribes tire pressure status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *tirePressure;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *tirePressure;
/**
* @abstract A boolean value. If true, unsubscribes odometer data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *odometer;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *odometer;
/**
* @abstract A boolean value. If true, unsubscribes belt Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *beltStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *beltStatus;
/**
* @abstract A boolean value. If true, unsubscribes body Information data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *bodyInformation;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *bodyInformation;
/**
* @abstract A boolean value. If true, unsubscribes device Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *deviceStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *deviceStatus;
/**
* @abstract A boolean value. If true, unsubscribes driver Braking data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *driverBraking;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *driverBraking;
/**
* @abstract A boolean value. If true, unsubscribes wiper Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *wiperStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *wiperStatus;
/**
* @abstract A boolean value. If true, unsubscribes Head Lamp Status data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *headLampStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *headLampStatus;
/**
* @abstract A boolean value. If true, unsubscribes Engine Torque data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *engineTorque;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *engineTorque;
/**
* @abstract A boolean value. If true, unsubscribes accPedalPosition data
*/
-@property (strong, nonatomic) NSNumber<SDLBool> *accPedalPosition;
-@property (strong, nonatomic) NSNumber<SDLBool> *steeringWheelAngle;
-@property (strong, nonatomic) NSNumber<SDLBool> *eCallInfo;
-@property (strong, nonatomic) NSNumber<SDLBool> *airbagStatus;
-@property (strong, nonatomic) NSNumber<SDLBool> *emergencyEvent;
-@property (strong, nonatomic) NSNumber<SDLBool> *clusterModeStatus;
-@property (strong, nonatomic) NSNumber<SDLBool> *myKey;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *accPedalPosition;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *steeringWheelAngle;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *eCallInfo;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *airbagStatus;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *emergencyEvent;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *clusterModeStatus;
+@property (strong, nonatomic, nullable) 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/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
index 9a6c3f4a0..edc6f1ec9 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
@@ -11,106 +11,111 @@
*
* @since SmartDeviceLink 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeVehicleDataResponse : SDLRPCResponse
/**
* @abstract A SDLVehicleDataResult* value. See GPSData.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *gps;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *gps;
/**
* @abstract A SDLVehicleDataResult* value. The vehicle speed in kilometers per hour.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *speed;
+@property (strong, nonatomic, nullableSDLVehicleDataResult *speed;
/**
* @abstract A SDLVehicleDataResult* value. The number of revolutions per minute of the engine.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *rpm;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *rpm;
/**
* @abstract A SDLVehicleDataResult* value. The fuel level in the tank (percentage)
*/
-@property (strong, nonatomic) SDLVehicleDataResult *fuelLevel;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel;
/**
* @abstract A SDLVehicleDataResult* value. The fuel level state.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *fuelLevel_State;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *fuelLevel_State;
/**
* @abstract A SDLVehicleDataResult* value. The instantaneous fuel consumption in microlitres.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *instantFuelConsumption;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *instantFuelConsumption;
/**
* @abstract A SDLVehicleDataResult* value. The external temperature in degrees celsius.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *externalTemperature;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
* @abstract A SDLVehicleDataResult* value. See PRNDL.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *prndl;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl;
/**
* @abstract A SDLVehicleDataResult* value. See TireStatus.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *tirePressure;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *tirePressure;
/**
* @abstract A SDLVehicleDataResult* value. Odometer in km.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *odometer;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *odometer;
/**
* @abstract A SDLVehicleDataResult* value. The status of the seat belts.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *beltStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *beltStatus;
/**
* @abstract A SDLVehicleDataResult* value. The body information including power modes.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *bodyInformation;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *bodyInformation;
/**
* @abstract A SDLVehicleDataResult* value. The device status including signal and battery strength.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *deviceStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *deviceStatus;
/**
* @abstract A SDLVehicleDataResult* value. The status of the brake pedal.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *driverBraking;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *driverBraking;
/**
* @abstract A SDLVehicleDataResult* value. The status of the wipers.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *wiperStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *wiperStatus;
/**
* @abstract A SDLVehicleDataResult* value. Status of the head lamps.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *headLampStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *headLampStatus;
/**
* @abstract A SDLVehicleDataResult* value. Torque value for engine (in Nm) on non-diesel variants.
*/
-@property (strong, nonatomic) SDLVehicleDataResult *engineTorque;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *engineTorque;
/**
* @abstract A SDLVehicleDataResult* value. Accelerator pedal position (percentage depressed)
*/
-@property (strong, nonatomic) SDLVehicleDataResult *accPedalPosition;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *accPedalPosition;
/**
* @abstract A SDLVehicleDataResult* value. Current angle of the steering wheel (in deg)
*/
-@property (strong, nonatomic) SDLVehicleDataResult *steeringWheelAngle;
-@property (strong, nonatomic) SDLVehicleDataResult *eCallInfo;
-@property (strong, nonatomic) SDLVehicleDataResult *airbagStatus;
-@property (strong, nonatomic) SDLVehicleDataResult *emergencyEvent;
-@property (strong, nonatomic) SDLVehicleDataResult *clusterModes;
-@property (strong, nonatomic) SDLVehicleDataResult *myKey;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *steeringWheelAngle;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *eCallInfo;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *airbagStatus;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *emergencyEvent;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *clusterModes;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *myKey;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
index 5fd117563..fee065709 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
@@ -15,7 +15,7 @@
return self;
}
-- (void)setGps:(SDLVehicleDataResult *)gps {
+- (void)setGps:(nullable SDLVehicleDataResult *)gps {
if (gps != nil) {
[parameters setObject:gps forKey:SDLNameGPS];
} else {
@@ -23,16 +23,16 @@
}
}
-- (SDLVehicleDataResult *)gps {
+- (nullable SDLVehicleDataResult *)gps {
NSObject *obj = [parameters objectForKey:SDLNameGPS];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setSpeed:(SDLVehicleDataResult *)speed {
+- (void)setSpeed:(nullable SDLVehicleDataResult *)speed {
if (speed != nil) {
[parameters setObject:speed forKey:SDLNameSpeed];
} else {
@@ -40,16 +40,16 @@
}
}
-- (SDLVehicleDataResult *)speed {
+- (nullable SDLVehicleDataResult *)speed {
NSObject *obj = [parameters objectForKey:SDLNameSpeed];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setRpm:(SDLVehicleDataResult *)rpm {
+- (void)setRpm:(nullable SDLVehicleDataResult *)rpm {
if (rpm != nil) {
[parameters setObject:rpm forKey:SDLNameRPM];
} else {
@@ -57,16 +57,16 @@
}
}
-- (SDLVehicleDataResult *)rpm {
+- (nullable SDLVehicleDataResult *)rpm {
NSObject *obj = [parameters objectForKey:SDLNameRPM];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setFuelLevel:(SDLVehicleDataResult *)fuelLevel {
+- (void)setFuelLevel:(nullable SDLVehicleDataResult *)fuelLevel {
if (fuelLevel != nil) {
[parameters setObject:fuelLevel forKey:SDLNameFuelLevel];
} else {
@@ -74,16 +74,16 @@
}
}
-- (SDLVehicleDataResult *)fuelLevel {
+- (nullable SDLVehicleDataResult *)fuelLevel {
NSObject *obj = [parameters objectForKey:SDLNameFuelLevel];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setFuelLevel_State:(SDLVehicleDataResult *)fuelLevel_State {
+- (void)setFuelLevel_State:(nullable SDLVehicleDataResult *)fuelLevel_State {
if (fuelLevel_State != nil) {
[parameters setObject:fuelLevel_State forKey:SDLNameFuelLevelState];
} else {
@@ -91,16 +91,16 @@
}
}
-- (SDLVehicleDataResult *)fuelLevel_State {
+- (nullable SDLVehicleDataResult *)fuelLevel_State {
NSObject *obj = [parameters objectForKey:SDLNameFuelLevelState];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setInstantFuelConsumption:(SDLVehicleDataResult *)instantFuelConsumption {
+- (void)setInstantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption {
if (instantFuelConsumption != nil) {
[parameters setObject:instantFuelConsumption forKey:SDLNameInstantFuelConsumption];
} else {
@@ -108,16 +108,16 @@
}
}
-- (SDLVehicleDataResult *)instantFuelConsumption {
+- (nullable SDLVehicleDataResult *)instantFuelConsumption {
NSObject *obj = [parameters objectForKey:SDLNameInstantFuelConsumption];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setExternalTemperature:(SDLVehicleDataResult *)externalTemperature {
+- (void)setExternalTemperature:(nullable SDLVehicleDataResult *)externalTemperature {
if (externalTemperature != nil) {
[parameters setObject:externalTemperature forKey:SDLNameExternalTemperature];
} else {
@@ -125,16 +125,16 @@
}
}
-- (SDLVehicleDataResult *)externalTemperature {
+- (nullable SDLVehicleDataResult *)externalTemperature {
NSObject *obj = [parameters objectForKey:SDLNameExternalTemperature];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setPrndl:(SDLVehicleDataResult *)prndl {
+- (void)setPrndl:(nullable SDLVehicleDataResult *)prndl {
if (prndl != nil) {
[parameters setObject:prndl forKey:SDLNamePRNDL];
} else {
@@ -142,16 +142,16 @@
}
}
-- (SDLVehicleDataResult *)prndl {
+- (nullable SDLVehicleDataResult *)prndl {
NSObject *obj = [parameters objectForKey:SDLNamePRNDL];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setTirePressure:(SDLVehicleDataResult *)tirePressure {
+- (void)setTirePressure:(nullable SDLVehicleDataResult *)tirePressure {
if (tirePressure != nil) {
[parameters setObject:tirePressure forKey:SDLNameTirePressure];
} else {
@@ -159,16 +159,16 @@
}
}
-- (SDLVehicleDataResult *)tirePressure {
+- (nullable SDLVehicleDataResult *)tirePressure {
NSObject *obj = [parameters objectForKey:SDLNameTirePressure];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setOdometer:(SDLVehicleDataResult *)odometer {
+- (void)setOdometer:(nullable SDLVehicleDataResult *)odometer {
if (odometer != nil) {
[parameters setObject:odometer forKey:SDLNameOdometer];
} else {
@@ -176,16 +176,16 @@
}
}
-- (SDLVehicleDataResult *)odometer {
+- (nullable SDLVehicleDataResult *)odometer {
NSObject *obj = [parameters objectForKey:SDLNameOdometer];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setBeltStatus:(SDLVehicleDataResult *)beltStatus {
+- (void)setBeltStatus:(nullable SDLVehicleDataResult *)beltStatus {
if (beltStatus != nil) {
[parameters setObject:beltStatus forKey:SDLNameBeltStatus];
} else {
@@ -193,16 +193,16 @@
}
}
-- (SDLVehicleDataResult *)beltStatus {
+- (nullable SDLVehicleDataResult *)beltStatus {
NSObject *obj = [parameters objectForKey:SDLNameBeltStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setBodyInformation:(SDLVehicleDataResult *)bodyInformation {
+- (void)setBodyInformation:(nullable SDLVehicleDataResult *)bodyInformation {
if (bodyInformation != nil) {
[parameters setObject:bodyInformation forKey:SDLNameBodyInformation];
} else {
@@ -210,16 +210,16 @@
}
}
-- (SDLVehicleDataResult *)bodyInformation {
+- (nullable SDLVehicleDataResult *)bodyInformation {
NSObject *obj = [parameters objectForKey:SDLNameBodyInformation];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setDeviceStatus:(SDLVehicleDataResult *)deviceStatus {
+- (void)setDeviceStatus:(nullable SDLVehicleDataResult *)deviceStatus {
if (deviceStatus != nil) {
[parameters setObject:deviceStatus forKey:SDLNameDeviceStatus];
} else {
@@ -227,16 +227,16 @@
}
}
-- (SDLVehicleDataResult *)deviceStatus {
+- (nullable SDLVehicleDataResult *)deviceStatus {
NSObject *obj = [parameters objectForKey:SDLNameDeviceStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setDriverBraking:(SDLVehicleDataResult *)driverBraking {
+- (void)setDriverBraking:(nullable SDLVehicleDataResult *)driverBraking {
if (driverBraking != nil) {
[parameters setObject:driverBraking forKey:SDLNameDriverBraking];
} else {
@@ -244,16 +244,16 @@
}
}
-- (SDLVehicleDataResult *)driverBraking {
+- (nullable SDLVehicleDataResult *)driverBraking {
NSObject *obj = [parameters objectForKey:SDLNameDriverBraking];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setWiperStatus:(SDLVehicleDataResult *)wiperStatus {
+- (void)setWiperStatus:(nullable SDLVehicleDataResult *)wiperStatus {
if (wiperStatus != nil) {
[parameters setObject:wiperStatus forKey:SDLNameWiperStatus];
} else {
@@ -261,16 +261,16 @@
}
}
-- (SDLVehicleDataResult *)wiperStatus {
+- (nullable SDLVehicleDataResult *)wiperStatus {
NSObject *obj = [parameters objectForKey:SDLNameWiperStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setHeadLampStatus:(SDLVehicleDataResult *)headLampStatus {
+- (void)setHeadLampStatus:(nullable SDLVehicleDataResult *)headLampStatus {
if (headLampStatus != nil) {
[parameters setObject:headLampStatus forKey:SDLNameHeadLampStatus];
} else {
@@ -278,16 +278,16 @@
}
}
-- (SDLVehicleDataResult *)headLampStatus {
+- (nullable SDLVehicleDataResult *)headLampStatus {
NSObject *obj = [parameters objectForKey:SDLNameHeadLampStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setEngineTorque:(SDLVehicleDataResult *)engineTorque {
+- (void)setEngineTorque:(nullable SDLVehicleDataResult *)engineTorque {
if (engineTorque != nil) {
[parameters setObject:engineTorque forKey:SDLNameEngineTorque];
} else {
@@ -295,16 +295,16 @@
}
}
-- (SDLVehicleDataResult *)engineTorque {
+- (nullable SDLVehicleDataResult *)engineTorque {
NSObject *obj = [parameters objectForKey:SDLNameEngineTorque];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setAccPedalPosition:(SDLVehicleDataResult *)accPedalPosition {
+- (void)setAccPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition {
if (accPedalPosition != nil) {
[parameters setObject:accPedalPosition forKey:SDLNameAccelerationPedalPosition];
} else {
@@ -312,16 +312,16 @@
}
}
-- (SDLVehicleDataResult *)accPedalPosition {
+- (nullable SDLVehicleDataResult *)accPedalPosition {
NSObject *obj = [parameters objectForKey:SDLNameAccelerationPedalPosition];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setSteeringWheelAngle:(SDLVehicleDataResult *)steeringWheelAngle {
+- (void)setSteeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle {
if (steeringWheelAngle != nil) {
[parameters setObject:steeringWheelAngle forKey:SDLNameSteeringWheelAngle];
} else {
@@ -329,16 +329,16 @@
}
}
-- (SDLVehicleDataResult *)steeringWheelAngle {
+- (nullable SDLVehicleDataResult *)steeringWheelAngle {
NSObject *obj = [parameters objectForKey:SDLNameSteeringWheelAngle];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setECallInfo:(SDLVehicleDataResult *)eCallInfo {
+- (void)setECallInfo:(nullable SDLVehicleDataResult *)eCallInfo {
if (eCallInfo != nil) {
[parameters setObject:eCallInfo forKey:SDLNameECallInfo];
} else {
@@ -346,16 +346,16 @@
}
}
-- (SDLVehicleDataResult *)eCallInfo {
+- (nullable SDLVehicleDataResult *)eCallInfo {
NSObject *obj = [parameters objectForKey:SDLNameECallInfo];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setAirbagStatus:(SDLVehicleDataResult *)airbagStatus {
+- (void)setAirbagStatus:(nullable SDLVehicleDataResult *)airbagStatus {
if (airbagStatus != nil) {
[parameters setObject:airbagStatus forKey:SDLNameAirbagStatus];
} else {
@@ -363,16 +363,16 @@
}
}
-- (SDLVehicleDataResult *)airbagStatus {
+- (nullable SDLVehicleDataResult *)airbagStatus {
NSObject *obj = [parameters objectForKey:SDLNameAirbagStatus];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setEmergencyEvent:(SDLVehicleDataResult *)emergencyEvent {
+- (void)setEmergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent {
if (emergencyEvent != nil) {
[parameters setObject:emergencyEvent forKey:SDLNameEmergencyEvent];
} else {
@@ -380,16 +380,16 @@
}
}
-- (SDLVehicleDataResult *)emergencyEvent {
+- (nullable SDLVehicleDataResult *)emergencyEvent {
NSObject *obj = [parameters objectForKey:SDLNameEmergencyEvent];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setClusterModes:(SDLVehicleDataResult *)clusterModes {
+- (void)setClusterModes:(nullable SDLVehicleDataResult *)clusterModes {
if (clusterModes != nil) {
[parameters setObject:clusterModes forKey:SDLNameClusterModes];
} else {
@@ -397,16 +397,16 @@
}
}
-- (SDLVehicleDataResult *)clusterModes {
+- (nullable SDLVehicleDataResult *)clusterModes {
NSObject *obj = [parameters objectForKey:SDLNameClusterModes];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
-- (void)setMyKey:(SDLVehicleDataResult *)myKey {
+- (void)setMyKey:(nullable SDLVehicleDataResult *)myKey {
if (myKey != nil) {
[parameters setObject:myKey forKey:SDLNameMyKey];
} else {
@@ -414,13 +414,13 @@
}
}
-- (SDLVehicleDataResult *)myKey {
+- (nullable SDLVehicleDataResult *)myKey {
NSObject *obj = [parameters objectForKey:SDLNameMyKey];
- if (obj == nil || [obj isKindOfClass:SDLVehicleDataResult.class]) {
- return (SDLVehicleDataResult *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLVehicleDataResult alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLVehicleDataResult*)obj;
}
@end
diff --git a/SmartDeviceLink/SDLUnsubscribeWaypoints.h b/SmartDeviceLink/SDLUnsubscribeWaypoints.h
index d5e477ad7..e76db6580 100644
--- a/SmartDeviceLink/SDLUnsubscribeWaypoints.h
+++ b/SmartDeviceLink/SDLUnsubscribeWaypoints.h
@@ -3,10 +3,18 @@
#import "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeWayPoints : SDLRPCRequest
@end
+NS_ASSUME_NONNULL_END
+
+NS_ASSUME_NONNULL_BEGIN
+
__deprecated_msg("Use SDLUnsubscribeWayPoints instead")
- @interface SDLUnsubscribeWaypoints : SDLUnsubscribeWayPoints
- @end
+@interface SDLUnsubscribeWaypoints : SDLUnsubscribeWayPoints
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeWaypoints.m b/SmartDeviceLink/SDLUnsubscribeWaypoints.m
index a60ec04ab..b4b2278bc 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 {
@@ -14,6 +16,12 @@
@end
+NS_ASSUME_NONNULL_END
+
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnsubscribeWaypoints
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.h b/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.h
index 11a9e7961..f6c981b52 100644
--- a/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.h
+++ b/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.h
@@ -3,10 +3,14 @@
#import "SDLRPCResponse.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUnsubscribeWayPointsResponse : SDLRPCResponse
@end
__deprecated_msg("Use SDLUnsubscribeWayPointsResponse instead")
- @interface SDLUnsubscribeWaypointsResponse : SDLUnsubscribeWayPointsResponse
- @end
+@interface SDLUnsubscribeWaypointsResponse : SDLUnsubscribeWayPointsResponse
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.m b/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.m
index 63e232900..3488500b8 100644
--- a/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.m
+++ b/SmartDeviceLink/SDLUnsubscribeWaypointsResponse.m
@@ -4,6 +4,8 @@
#import "SDLUnsubscribeWaypointsResponse.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUnsubscribeWayPointsResponse
- (instancetype)init {
@@ -17,3 +19,5 @@
@implementation SDLUnsubscribeWaypointsResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUpdateTurnList.h b/SmartDeviceLink/SDLUpdateTurnList.h
index e2e8d6b52..63a3473aa 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, nonatomic) NSMutableArray<SDLTurn *> *turnList;
+@property (strong, nonatomic, nullable) NSMutableArray<SDLTurn *> *turnList;
/**
* Required, SDLSoftButton, 0 - 1 Entries
*/
-@property (strong, nonatomic) NSMutableArray<SDLSoftButton *> *softButtons;
+@property (strong, nonatomic, nullable) 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
diff --git a/SmartDeviceLink/SDLUpdateTurnListResponse.h b/SmartDeviceLink/SDLUpdateTurnListResponse.h
index ab2d87231..31ba28df5 100644
--- a/SmartDeviceLink/SDLUpdateTurnListResponse.h
+++ b/SmartDeviceLink/SDLUpdateTurnListResponse.h
@@ -7,6 +7,11 @@
/** SDLUpdateTurnListResponse is sent, when SDLUpdateTurnList has been called.
* Since<b>SmartDeviceLink 2.0</b>
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLUpdateTurnListResponse : SDLRPCResponse
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUpdateTurnListResponse.m b/SmartDeviceLink/SDLUpdateTurnListResponse.m
index 681e9c38c..95047fd66 100644
--- a/SmartDeviceLink/SDLUpdateTurnListResponse.m
+++ b/SmartDeviceLink/SDLUpdateTurnListResponse.m
@@ -6,6 +6,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLUpdateTurnListResponse
- (instancetype)init {
@@ -15,3 +17,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLUploadFileOperation.m b/SmartDeviceLink/SDLUploadFileOperation.m
index 313ece825..aaba69fc0 100644
--- a/SmartDeviceLink/SDLUploadFileOperation.m
+++ b/SmartDeviceLink/SDLUploadFileOperation.m
@@ -52,7 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)start {
[super start];
- [self sdl_sendPutFiles:[self.class sdl_splitFile:self.fileWrapper.file mtuSize:[SDLGlobals globals].maxMTUSize] withCompletion:self.fileWrapper.completionHandler];
+ [self sdl_sendPutFiles:[self.class sdl_splitFile:self.fileWrapper.file mtuSize:[SDLGlobals sharedGlobals].maxMTUSize] withCompletion:self.fileWrapper.completionHandler];
}
- (void)sdl_sendPutFiles:(NSArray<SDLPutFile *> *)putFiles withCompletion:(SDLFileManagerUploadCompletionHandler)completion {
diff --git a/SmartDeviceLink/SDLV1ProtocolHeader.h b/SmartDeviceLink/SDLV1ProtocolHeader.h
index b7fa454f2..ecd5e258e 100644
--- a/SmartDeviceLink/SDLV1ProtocolHeader.h
+++ b/SmartDeviceLink/SDLV1ProtocolHeader.h
@@ -4,6 +4,8 @@
#import "SDLProtocolHeader.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLV1ProtocolHeader : SDLProtocolHeader
- (instancetype)init;
@@ -12,3 +14,5 @@
- (NSString *)description;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLV1ProtocolHeader.m b/SmartDeviceLink/SDLV1ProtocolHeader.m
index d716c0c98..1de39fb29 100644
--- a/SmartDeviceLink/SDLV1ProtocolHeader.m
+++ b/SmartDeviceLink/SDLV1ProtocolHeader.m
@@ -6,6 +6,8 @@
const int V1PROTOCOL_HEADERSIZE = 8;
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLV1ProtocolHeader
- (instancetype)init {
@@ -39,7 +41,7 @@ const int V1PROTOCOL_HEADERSIZE = 8;
return dataOut;
}
-- (id)copyWithZone:(NSZone *)zone {
+- (id)copyWithZone:(nullable NSZone *)zone {
SDLV1ProtocolHeader *newHeader = [[SDLV1ProtocolHeader allocWithZone:zone] init];
newHeader.encrypted = self.encrypted;
newHeader.frameType = self.frameType;
@@ -82,3 +84,5 @@ const int V1PROTOCOL_HEADERSIZE = 8;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLV1ProtocolMessage.h b/SmartDeviceLink/SDLV1ProtocolMessage.h
index fb39fdf44..71903a5d0 100644
--- a/SmartDeviceLink/SDLV1ProtocolMessage.h
+++ b/SmartDeviceLink/SDLV1ProtocolMessage.h
@@ -5,10 +5,13 @@
@class SDLProtocolHeader;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLV1ProtocolMessage : SDLProtocolMessage
-- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload;
-- (NSDictionary<NSString *, id> *)rpcDictionary;
+- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload;
+- (nullable NSDictionary<NSString *, id> *)rpcDictionary;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLV1ProtocolMessage.m b/SmartDeviceLink/SDLV1ProtocolMessage.m
index 049e9ff7c..89ef946b9 100644
--- a/SmartDeviceLink/SDLV1ProtocolMessage.m
+++ b/SmartDeviceLink/SDLV1ProtocolMessage.m
@@ -5,9 +5,11 @@
#import "SDLDebugTool.h"
#import "SDLProtocolHeader.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLV1ProtocolMessage
-- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload {
+- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload {
if (self = [self init]) {
self.header = header;
self.payload = payload;
@@ -15,7 +17,7 @@
return self;
}
-- (NSDictionary<NSString *, id> *)rpcDictionary {
+- (nullable NSDictionary<NSString *, id> *)rpcDictionary {
if (self.payload.length == 0) {
return nil;
}
@@ -31,3 +33,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLV2ProtocolHeader.h b/SmartDeviceLink/SDLV2ProtocolHeader.h
index 1969818fc..bb93768bb 100644
--- a/SmartDeviceLink/SDLV2ProtocolHeader.h
+++ b/SmartDeviceLink/SDLV2ProtocolHeader.h
@@ -4,6 +4,8 @@
#import "SDLProtocolHeader.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLV2ProtocolHeader : SDLProtocolHeader
@property (assign, nonatomic) UInt32 messageID;
@@ -15,3 +17,5 @@
- (NSString *)description;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLV2ProtocolMessage.h b/SmartDeviceLink/SDLV2ProtocolMessage.h
index 2cb6136ca..0c1cc065a 100644
--- a/SmartDeviceLink/SDLV2ProtocolMessage.h
+++ b/SmartDeviceLink/SDLV2ProtocolMessage.h
@@ -6,10 +6,13 @@
@class SDLProtocolHeader;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLV2ProtocolMessage : SDLProtocolMessage
-- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload;
-- (NSDictionary<NSString *, id> *)rpcDictionary;
+- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload;
+- (nullable NSDictionary<NSString *, id> *)rpcDictionary;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLV2ProtocolMessage.m b/SmartDeviceLink/SDLV2ProtocolMessage.m
index 84b3ec9be..8fb60f0e1 100644
--- a/SmartDeviceLink/SDLV2ProtocolMessage.m
+++ b/SmartDeviceLink/SDLV2ProtocolMessage.m
@@ -7,10 +7,11 @@
#import "SDLProtocolHeader.h"
#import "SDLRPCPayload.h"
+NS_ASSUME_NONNULL_BEGIN
@implementation SDLV2ProtocolMessage
-- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(NSData *)payload {
+- (instancetype)initWithHeader:(SDLProtocolHeader *)header andPayload:(nullable NSData *)payload {
if (self = [self init]) {
self.header = header;
self.payload = payload;
@@ -19,7 +20,7 @@
}
// Convert RPC payload to dictionary (for consumption by RPC layer)
-- (NSDictionary<NSString *, id> *)rpcDictionary {
+- (nullable NSDictionary<NSString *, id> *)rpcDictionary {
// Only applicable to RPCs
if ((self.header.serviceType != SDLServiceType_RPC) && (self.header.serviceType != SDLServiceType_BulkData)) {
return nil;
@@ -60,3 +61,5 @@
return rpcMessageAsDictionary;
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLVehicleDataResult.h b/SmartDeviceLink/SDLVehicleDataResult.h
index c7dd1f624..d0bbf59cb 100644
--- a/SmartDeviceLink/SDLVehicleDataResult.h
+++ b/SmartDeviceLink/SDLVehicleDataResult.h
@@ -6,9 +6,13 @@
#import "SDLVehicleDataType.h"
#import "SDLVehicleDataResultCode.h"
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLVehicleDataResult : SDLRPCStruct
@property (strong, nonatomic) SDLVehicleDataType dataType;
@property (strong, nonatomic) SDLVehicleDataResultCode resultCode;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLVehicleDataResult.m b/SmartDeviceLink/SDLVehicleDataResult.m
index 80d81fc32..4fc333b97 100644
--- a/SmartDeviceLink/SDLVehicleDataResult.m
+++ b/SmartDeviceLink/SDLVehicleDataResult.m
@@ -5,6 +5,8 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLVehicleDataResult
- (void)setDataType:(SDLVehicleDataType)dataType {
@@ -34,3 +36,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLVehicleType.h b/SmartDeviceLink/SDLVehicleType.h
index 9201966a9..4d7164bb4 100644
--- a/SmartDeviceLink/SDLVehicleType.h
+++ b/SmartDeviceLink/SDLVehicleType.h
@@ -9,6 +9,9 @@
*
* @since SDL 2.0
*/
+
+NS_ASSUME_NONNULL_BEGIN
+
@interface SDLVehicleType : SDLRPCStruct
/**
@@ -18,7 +21,7 @@
*
* Optional, Max String length 500 chars
*/
-@property (strong, nonatomic) NSString *make;
+@property (strong, nonatomic, nullable) NSString *make;
/**
* @abstract The model of the vehicle
@@ -27,7 +30,7 @@
*
* Optional, Max String length 500 chars
*/
-@property (strong, nonatomic) NSString *model;
+@property (strong, nonatomic, nullable) NSString *model;
/**
* @abstract The model year of the vehicle
@@ -36,7 +39,7 @@
*
* Optional, Max String length 500 chars
*/
-@property (strong, nonatomic) NSString *modelYear;
+@property (strong, nonatomic, nullable) NSString *modelYear;
/**
* @abstract The trim of the vehicle
@@ -45,6 +48,8 @@
*
* Optional, Max String length 500 chars
*/
-@property (strong, nonatomic) NSString *trim;
+@property (strong, nonatomic, nullable) NSString *trim;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLVehicleType.m b/SmartDeviceLink/SDLVehicleType.m
index aec889c34..c02a7e8f4 100644
--- a/SmartDeviceLink/SDLVehicleType.m
+++ b/SmartDeviceLink/SDLVehicleType.m
@@ -6,9 +6,11 @@
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLVehicleType
-- (void)setMake:(NSString *)make {
+- (void)setMake:(nullable NSString *)make {
if (make != nil) {
[store setObject:make forKey:SDLNameMake];
} else {
@@ -16,11 +18,11 @@
}
}
-- (NSString *)make {
+- (nullable NSString *)make {
return [store objectForKey:SDLNameMake];
}
-- (void)setModel:(NSString *)model {
+- (void)setModel:(nullable NSString *)model {
if (model != nil) {
[store setObject:model forKey:SDLNameModel];
} else {
@@ -28,11 +30,11 @@
}
}
-- (NSString *)model {
+- (nullable NSString *)model {
return [store objectForKey:SDLNameModel];
}
-- (void)setModelYear:(NSString *)modelYear {
+- (void)setModelYear:(nullable NSString *)modelYear {
if (modelYear != nil) {
[store setObject:modelYear forKey:SDLNameModelYear];
} else {
@@ -40,11 +42,11 @@
}
}
-- (NSString *)modelYear {
+- (nullable NSString *)modelYear {
return [store objectForKey:SDLNameModelYear];
}
-- (void)setTrim:(NSString *)trim {
+- (void)setTrim:(nullable NSString *)trim {
if (trim != nil) {
[store setObject:trim forKey:SDLNameTrim];
} else {
@@ -52,8 +54,10 @@
}
}
-- (NSString *)trim {
+- (nullable NSString *)trim {
return [store objectForKey:SDLNameTrim];
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLVrHelpItem.h b/SmartDeviceLink/SDLVrHelpItem.h
index 0e851e2f1..e460538ac 100644
--- a/SmartDeviceLink/SDLVrHelpItem.h
+++ b/SmartDeviceLink/SDLVrHelpItem.h
@@ -5,15 +5,18 @@
@class SDLImage;
+NS_ASSUME_NONNULL_BEGIN
@interface SDLVRHelpItem : SDLRPCStruct
-- (instancetype)initWithText:(NSString *)text image:(SDLImage *)image;
+- (instancetype)initWithText:(NSString *)text image:(nullable SDLImage *)image;
-- (instancetype)initWithText:(NSString *)text image:(SDLImage *)image position:(UInt8)position;
+- (instancetype)initWithText:(NSString *)text image:(nullable SDLImage *)image position:(UInt8)position;
@property (strong, nonatomic) NSString *text;
-@property (strong, nonatomic) SDLImage *image;
+@property (strong, nonatomic, nullable) SDLImage *image;
@property (strong, nonatomic) NSNumber<SDLInt> *position;
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLVrHelpItem.m b/SmartDeviceLink/SDLVrHelpItem.m
index c11cc119b..0b9a387a5 100644
--- a/SmartDeviceLink/SDLVrHelpItem.m
+++ b/SmartDeviceLink/SDLVrHelpItem.m
@@ -7,9 +7,11 @@
#import "SDLImage.h"
#import "SDLNames.h"
+NS_ASSUME_NONNULL_BEGIN
+
@implementation SDLVRHelpItem
-- (instancetype)initWithText:(NSString *)text image:(SDLImage *)image position:(UInt8)position {
+- (instancetype)initWithText:(NSString *)text image:(nullable SDLImage *)image position:(UInt8)position {
self = [self initWithText:text image:image];
if (!self) {
return nil;
@@ -20,7 +22,7 @@
return self;
}
-- (instancetype)initWithText:(NSString *)text image:(SDLImage *)image {
+- (instancetype)initWithText:(NSString *)text image:(nullable SDLImage *)image {
self = [self init];
if (!self) {
return nil;
@@ -44,7 +46,7 @@
return [store objectForKey:SDLNameText];
}
-- (void)setImage:(SDLImage *)image {
+- (void)setImage:(nullable SDLImage *)image {
if (image != nil) {
[store setObject:image forKey:SDLNameImage];
} else {
@@ -52,13 +54,13 @@
}
}
-- (SDLImage *)image {
+- (nullable SDLImage *)image {
NSObject *obj = [store objectForKey:SDLNameImage];
- if (obj == nil || [obj isKindOfClass:SDLImage.class]) {
- return (SDLImage *)obj;
- } else {
+ if ([obj isKindOfClass:NSDictionary.class]) {
return [[SDLImage alloc] initWithDictionary:(NSDictionary *)obj];
}
+
+ return (SDLImage*)obj;
}
- (void)setPosition:(NSNumber<SDLInt> *)position {
@@ -74,3 +76,5 @@
}
@end
+
+NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLResponseDispatcherSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLResponseDispatcherSpec.m
index e91fc6c35..3d5d2ef76 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLResponseDispatcherSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLResponseDispatcherSpec.m
@@ -194,7 +194,10 @@ describe(@"a response dispatcher", ^{
});
it(@"should throw an exception if there's no button id", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
testSoftButton1.softButtonID = nil;
+#pragma clang diagnostic pop
testShow.softButtons = [@[testSoftButton1] mutableCopy];
expectAction(^{ [testDispatcher storeRequest:testShow handler:nil]; }).to(raiseException().named(@"MissingIdException"));
@@ -238,8 +241,11 @@ describe(@"a response dispatcher", ^{
});
it(@"should throw an exception if there's no command id", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
testAddCommand.cmdID = nil;
+#pragma clang diagnostic pop
expectAction(^{ [testDispatcher storeRequest:testAddCommand handler:nil]; }).to(raiseException().named(@"MissingIdException"));
});
@@ -348,7 +354,10 @@ describe(@"a response dispatcher", ^{
});
it(@"should throw an exception if there's no button name", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
testSubscribeButton.buttonName = nil;
+#pragma clang diagnostic pop
expectAction(^{ [testDispatcher storeRequest:testSubscribeButton handler:nil]; }).to(raiseException().named(@"MissingIdException"));
});
@@ -525,7 +534,10 @@ describe(@"a response dispatcher", ^{
});
it(@"should throw an exception if there's no button id", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
testSoftButton1.softButtonID = nil;
+#pragma clang diagnostic pop
testAlert.softButtons = [@[testSoftButton1] mutableCopy];
expectAction(^{ [testDispatcher storeRequest:testAlert handler:nil]; }).to(raiseException().named(@"MissingIdException"));
@@ -627,7 +639,10 @@ describe(@"a response dispatcher", ^{
});
it(@"should throw an exception if there's no button id", ^{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnonnull"
testSoftButton1.softButtonID = nil;
+#pragma clang diagnostic pop
testScrollableMessage.softButtons = [@[testSoftButton1] mutableCopy];
expectAction(^{ [testDispatcher storeRequest:testScrollableMessage handler:nil]; }).to(raiseException().named(@"MissingIdException"));
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLUploadFileOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLUploadFileOperationSpec.m
index 13ee3245d..a1bbc6baf 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLUploadFileOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLUploadFileOperationSpec.m
@@ -28,7 +28,7 @@ describe(@"Upload File Operation", ^{
beforeEach(^{
// Set the head unit size small so we have a low MTU size
- [SDLGlobals globals].maxHeadUnitVersion = 2;
+ [SDLGlobals sharedGlobals].maxHeadUnitVersion = 2;
});
context(@"running a small file operation", ^{
@@ -145,13 +145,13 @@ describe(@"Upload File Operation", ^{
SDLPutFile *firstPutFile = putFiles.firstObject;
// First putfile
- expect(firstPutFile.bulkData).to(equal([testFileData subdataWithRange:NSMakeRange(0, [SDLGlobals globals].maxMTUSize)]));
+ expect(firstPutFile.bulkData).to(equal([testFileData subdataWithRange:NSMakeRange(0, [SDLGlobals sharedGlobals].maxMTUSize)]));
expect(firstPutFile.length).to(equal(@(testFileData.length)));
expect(firstPutFile.offset).to(equal(@0));
expect(firstPutFile.persistentFile).to(equal(@NO));
expect(firstPutFile.syncFileName).to(equal(testFileName));
- NSUInteger numberOfPutFiles = (((testFileData.length - 1) / [SDLGlobals globals].maxMTUSize) + 1);
+ NSUInteger numberOfPutFiles = (((testFileData.length - 1) / [SDLGlobals sharedGlobals].maxMTUSize) + 1);
expect(@(putFiles.count)).to(equal(@(numberOfPutFiles)));
});
});