From 19aef6f12d77c954491853236897b0efa4dd6aeb Mon Sep 17 00:00:00 2001 From: NicoleYarroch Date: Tue, 12 Mar 2019 13:21:30 -0400 Subject: Made param in conv. init nullable `CloudAppProperties` --- SmartDeviceLink/SDLCloudAppProperties.h | 4 ++-- SmartDeviceLink/SDLCloudAppProperties.m | 2 +- SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLCloudAppPropertiesSpec.m | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SmartDeviceLink/SDLCloudAppProperties.h b/SmartDeviceLink/SDLCloudAppProperties.h index 1c7dc5cc3..1bd1f742f 100644 --- a/SmartDeviceLink/SDLCloudAppProperties.h +++ b/SmartDeviceLink/SDLCloudAppProperties.h @@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Convenience init for all parameters. * - * @param nicknames An array of app names a cloud app is allowed to register with + * @param nicknames An array of app names a cloud app is allowed to register with * @param appID The id of the cloud app * @param enabled If true, cloud app will be included in HMI RPC UpdateAppList * @param authToken Used to authenticate websocket connection on app activation @@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN * @param endpoint The websocket endpoint * @return A SDLCloudAppProperties object */ -- (instancetype)initWithNicknames:( NSArray *)nicknames appID:(NSString *)appID enabled:(BOOL)enabled authToken:(nullable NSString *)authToken cloudTransportType:(nullable NSString *)cloudTransportType hybridAppPreference:(nullable SDLHybridAppPreference)hybridAppPreference endpoint:(nullable NSString *)endpoint; +- (instancetype)initWithAppID:(NSString *)appID nicknames:(nullable NSArray *)nicknames enabled:(BOOL)enabled authToken:(nullable NSString *)authToken cloudTransportType:(nullable NSString *)cloudTransportType hybridAppPreference:(nullable SDLHybridAppPreference)hybridAppPreference endpoint:(nullable NSString *)endpoint; /** * An array of app names a cloud app is allowed to register with. If included in a `SetCloudAppProperties` request, this value will overwrite the existing "nicknames" field in the app policies section of the policy table. diff --git a/SmartDeviceLink/SDLCloudAppProperties.m b/SmartDeviceLink/SDLCloudAppProperties.m index ed0486fb0..41cc7719c 100644 --- a/SmartDeviceLink/SDLCloudAppProperties.m +++ b/SmartDeviceLink/SDLCloudAppProperties.m @@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithNicknames:( NSArray *)nicknames appID:(NSString *)appID enabled:(BOOL)enabled authToken:(nullable NSString *)authToken cloudTransportType:(nullable NSString *)cloudTransportType hybridAppPreference:(nullable SDLHybridAppPreference)hybridAppPreference endpoint:(nullable NSString *)endpoint { +- (instancetype)initWithAppID:(NSString *)appID nicknames:(nullable NSArray *)nicknames enabled:(BOOL)enabled authToken:(nullable NSString *)authToken cloudTransportType:(nullable NSString *)cloudTransportType hybridAppPreference:(nullable SDLHybridAppPreference)hybridAppPreference endpoint:(nullable NSString *)endpoint { self = [self initWithAppID:appID]; if (!self) { return nil; diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLCloudAppPropertiesSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLCloudAppPropertiesSpec.m index f12868f92..8e933275e 100644 --- a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLCloudAppPropertiesSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLCloudAppPropertiesSpec.m @@ -87,7 +87,7 @@ describe(@"Getter/Setter Tests", ^{ }); it(@"Should get correctly when initialized with initWithAppName:appID:enabled:authToken:cloudTransportType: hybridAppPreference:endpoint:", ^{ - SDLCloudAppProperties *testStruct = [[SDLCloudAppProperties alloc] initWithNicknames:testNicknames appID:testAppID enabled:testEnabled authToken:testAuthToken cloudTransportType:testCloudTransportType hybridAppPreference:testHybridAppPreference endpoint:testEndpoint]; + SDLCloudAppProperties *testStruct = [[SDLCloudAppProperties alloc] initWithAppID:testAppID nicknames:testNicknames enabled:testEnabled authToken:testAuthToken cloudTransportType:testCloudTransportType hybridAppPreference:testHybridAppPreference endpoint:testEndpoint]; expect(testStruct.nicknames).to(equal(testNicknames)); expect(testStruct.appID).to(equal(testAppID)); -- cgit v1.2.1