summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2020-05-06 10:19:03 -0400
committerJoel Fischer <joeljfischer@gmail.com>2020-05-06 10:19:03 -0400
commit0915c8ad999e0e4ef9bacbb127a40c4067023fd9 (patch)
treed15b7a7943e32c503042650d0e6903421f682781
parentb7804386654f19ef3b80c9f61607aac8d23c091c (diff)
parent546c6b93e21237562a897163c05e9ed355407ced (diff)
downloadsdl_ios-0915c8ad999e0e4ef9bacbb127a40c4067023fd9.tar.gz
Merge branch 'develop' into bugfix/issue-1611-replace-nstimer-with-sdltimer
-rw-r--r--.travis.yml8
-rw-r--r--SmartDeviceLink/SDLAppServiceManifest.h2
-rw-r--r--SmartDeviceLink/SDLAppServiceManifest.m4
-rwxr-xr-xSmartDeviceLink/SDLAudioStreamManager.h12
-rwxr-xr-xSmartDeviceLink/SDLAudioStreamManager.m7
-rw-r--r--SmartDeviceLink/SDLButtonPress.h16
-rw-r--r--SmartDeviceLink/SDLButtonPress.m14
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessage.h2
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessage.m4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.h2
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.m4
-rw-r--r--SmartDeviceLink/SDLError.h16
-rw-r--r--SmartDeviceLink/SDLError.m188
-rw-r--r--SmartDeviceLink/SDLErrorConstants.h8
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m4
-rwxr-xr-xSmartDeviceLink/SDLPCMAudioConverter.m4
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.h2
-rw-r--r--SmartDeviceLink/SDLPerformInteraction.m4
-rw-r--r--SmartDeviceLink/SDLReadDID.h4
-rw-r--r--SmartDeviceLink/SDLReadDID.m4
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.h2
-rw-r--r--SmartDeviceLink/SDLRegisterAppInterfaceResponse.m4
-rw-r--r--SmartDeviceLink/SDLTouchEvent.h2
-rw-r--r--SmartDeviceLink/SDLTouchEvent.m4
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLAudioStreamManagerSpec.m1
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLSequentialRPCRequestOperationSpec.m6
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m1
-rw-r--r--SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m19
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m22
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m2
-rw-r--r--SmartDeviceLinkTests/SDLCacheFileManagerSpec.m4
32 files changed, 227 insertions, 153 deletions
diff --git a/.travis.yml b/.travis.yml
index b05a77162..2c1ef1799 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: objective-c
-osx_image: xcode11.2
+osx_image: xcode11.3
xcode_project: SmartDeviceLink-iOS.xcodeproj
xcode_scheme: SmartDeviceLink
xcode_sdk: iphonesimulator13.2
@@ -20,9 +20,9 @@ before_install:
- carthage bootstrap --verbose --no-use-binaries --platform iOS --cache-builds
script:
-- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-ObjC" -destination "platform=iOS Simulator,OS=13.2.2,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO build | xcpretty -c;
-- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-Swift" -destination "platform=iOS Simulator,OS=13.2.2,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO build | xcpretty -c;
-- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -destination "platform=iOS Simulator,OS=13.2.2,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-ObjC" -destination "platform=iOS Simulator,OS=13.3,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO build | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink-Example-Swift" -destination "platform=iOS Simulator,OS=13.3,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO build | xcpretty -c;
+- set -o pipefail && xcodebuild -project "SmartDeviceLink-iOS.xcodeproj" -scheme "SmartDeviceLink" -destination "platform=iOS Simulator,OS=13.3,name=iPhone 11" -configuration Debug ONLY_ACTIVE_ARCH=NO RUN_CLANG_STATIC_ANALYZER=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ENABLE_TESTABILITY=YES test | xcpretty -c;
after_success:
- bash <(curl -s https://codecov.io/bash) -J 'SmartDeviceLink'
diff --git a/SmartDeviceLink/SDLAppServiceManifest.h b/SmartDeviceLink/SDLAppServiceManifest.h
index 94069d104..1548181a1 100644
--- a/SmartDeviceLink/SDLAppServiceManifest.h
+++ b/SmartDeviceLink/SDLAppServiceManifest.h
@@ -191,7 +191,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* Array of Integers, See `SDLFunctionID`, Optional
*/
-@property (nullable, strong, nonatomic) NSArray<NSNumber<SDLInt> *> *handledRPCs;
+@property (nullable, strong, nonatomic) NSArray<NSNumber *> *handledRPCs;
/**
* A media service manifest.
diff --git a/SmartDeviceLink/SDLAppServiceManifest.m b/SmartDeviceLink/SDLAppServiceManifest.m
index 3a40c9cd0..fe5849145 100644
--- a/SmartDeviceLink/SDLAppServiceManifest.m
+++ b/SmartDeviceLink/SDLAppServiceManifest.m
@@ -168,11 +168,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameRPCSpecVersion ofClass:SDLMsgVersion.class error:nil];
}
-- (void)setHandledRPCs:(nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs {
+- (void)setHandledRPCs:(nullable NSArray<NSNumber *> *)handledRPCs {
[self.store sdl_setObject:handledRPCs forName:SDLRPCParameterNameHandledRPCs];
}
-- (nullable NSArray<NSNumber<SDLInt> *> *)handledRPCs {
+- (nullable NSArray<NSNumber *> *)handledRPCs {
return [self.store sdl_objectsForName:SDLRPCParameterNameHandledRPCs ofClass:NSNumber.class error:nil];
}
diff --git a/SmartDeviceLink/SDLAudioStreamManager.h b/SmartDeviceLink/SDLAudioStreamManager.h
index 131f2df8b..7ec8a5918 100755
--- a/SmartDeviceLink/SDLAudioStreamManager.h
+++ b/SmartDeviceLink/SDLAudioStreamManager.h
@@ -16,18 +16,6 @@
NS_ASSUME_NONNULL_BEGIN
-/// Error relates to AudioStreamManager
-extern NSString *const SDLErrorDomainAudioStreamManager;
-
-/// AudioStreamManager errors
-typedef NS_ENUM(NSInteger, SDLAudioStreamManagerError) {
- /// The audio stream is not currently connected
- SDLAudioStreamManagerErrorNotConnected = -1,
-
- /// Attempted to play but there's no audio in the queue
- SDLAudioStreamManagerErrorNoQueuedAudio = -2
-};
-
/**
The manager to control the audio stream
*/
diff --git a/SmartDeviceLink/SDLAudioStreamManager.m b/SmartDeviceLink/SDLAudioStreamManager.m
index 11d39812a..f8486272a 100755
--- a/SmartDeviceLink/SDLAudioStreamManager.m
+++ b/SmartDeviceLink/SDLAudioStreamManager.m
@@ -9,18 +9,17 @@
#import "SDLAudioStreamManager.h"
#import "SDLAudioFile.h"
+#import "SDLAudioStreamManagerDelegate.h"
+#import "SDLError.h"
#import "SDLFile.h"
#import "SDLGlobals.h"
#import "SDLLogMacros.h"
#import "SDLManager.h"
#import "SDLPCMAudioConverter.h"
-#import "SDLAudioStreamManagerDelegate.h"
#import "SDLStreamingAudioManagerType.h"
NS_ASSUME_NONNULL_BEGIN
-NSString *const SDLErrorDomainAudioStreamManager = @"com.sdl.extension.pcmAudioStreamManager";
-
@interface SDLAudioStreamManager ()
@property (weak, nonatomic) id<SDLStreamingAudioManagerType> streamManager;
@@ -126,7 +125,7 @@ NSString *const SDLErrorDomainAudioStreamManager = @"com.sdl.extension.pcmAudioS
if (!self.streamManager.isAudioConnected) {
if (self.delegate != nil) {
- NSError *error = [NSError errorWithDomain:SDLErrorDomainAudioStreamManager code:SDLAudioStreamManagerErrorNotConnected userInfo:nil];
+ NSError *error = [NSError sdl_audioStreamManager_notConnected];
[self.delegate audioStreamManager:self errorDidOccurForFile:self.mutableQueue.firstObject.inputFileURL error:error];
}
return;
diff --git a/SmartDeviceLink/SDLButtonPress.h b/SmartDeviceLink/SDLButtonPress.h
index 56b9bcadd..c5769ca6d 100644
--- a/SmartDeviceLink/SDLButtonPress.h
+++ b/SmartDeviceLink/SDLButtonPress.h
@@ -24,7 +24,7 @@ Constructs a newly allocated SDLButtonPress object with the given parameters
@return An instance of the SDLButtonPress class.
*/
-- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId: instead"));;
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId:buttonPressMode: instead"));;
/**
Constructs a newly allocated SDLButtonPress object with the given parameters
@@ -35,7 +35,19 @@ Constructs a newly allocated SDLButtonPress object with the given parameters
@return An instance of the SDLButtonPress class.
*/
-- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId;
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId __deprecated_msg(("Use initWithButtonName:moduleType:moduleId:buttonPressMode: instead"));;
+
+/**
+Constructs a newly allocated SDLButtonPress object with the given parameters
+
+@param buttonName the name of the button
+@param moduleType the module where the button should be pressed
+@param moduleId the id of the module
+@param buttonPressMode indicates LONG or SHORT button press event
+
+@return An instance of the SDLButtonPress class.
+*/
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId buttonPressMode:(SDLButtonPressMode)buttonPressMode;
/**
* The module where the button should be pressed.
diff --git a/SmartDeviceLink/SDLButtonPress.m b/SmartDeviceLink/SDLButtonPress.m
index 4f215c206..419f0d7f6 100644
--- a/SmartDeviceLink/SDLButtonPress.m
+++ b/SmartDeviceLink/SDLButtonPress.m
@@ -37,10 +37,24 @@ NS_ASSUME_NONNULL_BEGIN
if (!self) {
return nil;
}
+
+ self.buttonName = buttonName;
+ self.moduleType = moduleType;
+ self.moduleId = moduleId;
+
+ return self;
+}
+
+- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId buttonPressMode:(SDLButtonPressMode)buttonPressMode {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
self.buttonName = buttonName;
self.moduleType = moduleType;
self.moduleId = moduleId;
+ self.buttonPressMode = buttonPressMode;
return self;
}
diff --git a/SmartDeviceLink/SDLDiagnosticMessage.h b/SmartDeviceLink/SDLDiagnosticMessage.h
index 74cbbcdff..385c72b4f 100644
--- a/SmartDeviceLink/SDLDiagnosticMessage.h
+++ b/SmartDeviceLink/SDLDiagnosticMessage.h
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* Required, Array of NSNumber (Integers), Array size 1 - 65535, Integer Size 0 - 255
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageData;
+@property (strong, nonatomic) NSArray<NSNumber *> *messageData;
@end
diff --git a/SmartDeviceLink/SDLDiagnosticMessage.m b/SmartDeviceLink/SDLDiagnosticMessage.m
index b7d4e4016..adef6c980 100644
--- a/SmartDeviceLink/SDLDiagnosticMessage.m
+++ b/SmartDeviceLink/SDLDiagnosticMessage.m
@@ -52,11 +52,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameMessageLength ofClass:NSNumber.class error:&error];
}
-- (void)setMessageData:(NSArray<NSNumber<SDLInt> *> *)messageData {
+- (void)setMessageData:(NSArray<NSNumber *> *)messageData {
[self.parameters sdl_setObject:messageData forName:SDLRPCParameterNameMessageData];
}
-- (NSArray<NSNumber<SDLInt> *> *)messageData {
+- (NSArray<NSNumber *> *)messageData {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameMessageData ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
index aca74a779..2912beafa 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
Optional
*/
-@property (nullable, strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
+@property (nullable, strong, nonatomic) NSArray<NSNumber *> *messageDataResult;
@end
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
index a7b5cc254..dbfaa03a2 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.m
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
@@ -20,11 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setMessageDataResult:(nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (void)setMessageDataResult:(nullable NSArray<NSNumber *> *)messageDataResult {
[self.parameters sdl_setObject:messageDataResult forName:SDLRPCParameterNameMessageDataResult];
}
-- (nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (nullable NSArray<NSNumber *> *)messageDataResult {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameMessageDataResult ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLError.h b/SmartDeviceLink/SDLError.h
index 326fdf792..edfe87bc0 100644
--- a/SmartDeviceLink/SDLError.h
+++ b/SmartDeviceLink/SDLError.h
@@ -27,6 +27,8 @@ extern SDLErrorDomain *const SDLErrorDomainSystemCapabilityManager;
extern SDLErrorDomain *const SDLErrorDomainTransport;
extern SDLErrorDomain *const SDLErrorDomainRPCStore;
extern SDLErrorDomain *const SDLErrorDomainCacheFileManager;
+extern SDLErrorDomain *const SDLErrorDomainAudioStreamManager;
+
@interface NSError (SDLErrors)
@@ -37,14 +39,14 @@ extern SDLErrorDomain *const SDLErrorDomainCacheFileManager;
#pragma mark SDLManager
-+ (NSError *)sdl_lifecycle_rpcErrorWithDescription:(NSString *)description andReason:(NSString *)reason;
++ (NSError *)sdl_lifecycle_rpcErrorWithDescription:(nullable NSString *)description andReason:(nullable NSString *)reason;
+ (NSError *)sdl_lifecycle_notConnectedError;
+ (NSError *)sdl_lifecycle_notReadyError;
-+ (NSError *)sdl_lifecycle_unknownRemoteErrorWithDescription:(NSString *)description andReason:(NSString *)reason;
++ (NSError *)sdl_lifecycle_unknownRemoteErrorWithDescription:(nullable NSString *)description andReason:(nullable NSString *)reason;
+ (NSError *)sdl_lifecycle_managersFailedToStart;
-+ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult)result info:(NSString *)info;
-+ (NSError *)sdl_lifecycle_startedWithWarning:(SDLResult)result info:(NSString *)info;
-+ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult)result info:(NSString *)info;
++ (NSError *)sdl_lifecycle_startedWithBadResult:(nullable SDLResult)result info:(nullable NSString *)info;
++ (NSError *)sdl_lifecycle_startedWithWarning:(nullable SDLResult)result info:(nullable NSString *)info;
++ (NSError *)sdl_lifecycle_failedWithBadResult:(nullable SDLResult)result info:(nullable NSString *)info;
+ (NSError *)sdl_lifecycle_multipleRequestsCancelled;
#pragma mark SDLFileManager
@@ -99,6 +101,10 @@ extern SDLErrorDomain *const SDLErrorDomainCacheFileManager;
+ (NSError *)sdl_cacheFileManager_updateIconArchiveFileFailed;
+#pragma mark Audio Stream Manager
+
++ (NSError *)sdl_audioStreamManager_notConnected;
+
@end
@interface NSException (SDLExceptions)
diff --git a/SmartDeviceLink/SDLError.m b/SmartDeviceLink/SDLError.m
index 420d655f4..7e1f0c65e 100644
--- a/SmartDeviceLink/SDLError.m
+++ b/SmartDeviceLink/SDLError.m
@@ -25,15 +25,16 @@ SDLErrorDomain *const SDLErrorDomainSystemCapabilityManager = @"com.sdl.systemca
SDLErrorDomain *const SDLErrorDomainTransport = @"com.sdl.transport.error";
SDLErrorDomain *const SDLErrorDomainRPCStore = @"com.sdl.rpcStore.error";
SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanager.error";
+SDLErrorDomain *const SDLErrorDomainAudioStreamManager = @"com.sdl.extension.pcmAudioStreamManager";
@implementation NSError (SDLErrors)
#pragma mark - SDLEncryptionLifecycleManager
+ (NSError *)sdl_encryption_lifecycle_notReadyError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Encryption Lifecycle manager not ready", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The SDL library is not finished setting up the connection, please wait until the encryption lifecycleState is SDLEncryptionLifecycleStateReady", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure HMI is not NONE and at least one RPC requires encryption in permissions?", nil)
+ NSLocalizedDescriptionKey: @"Encryption Lifecycle manager not ready",
+ NSLocalizedFailureReasonErrorKey: @"The SDL library is not finished setting up the connection, please wait until the encryption lifecycleState is SDLEncryptionLifecycleStateReady",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure HMI is not NONE and at least one RPC requires encryption in permissions?"
};
return [NSError errorWithDomain:SDLErrorDomainEncryptionLifecycleManager
@@ -43,9 +44,9 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_encryption_lifecycle_encryption_off {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Encryption Lifecycle received a ACK with encryption bit = 0", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The SDL library received ACK with encryption = OFF.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure you are on a supported remote head unit with proper policies and your app id is approved.", nil)
+ NSLocalizedDescriptionKey: @"Encryption Lifecycle received a ACK with encryption bit = 0",
+ NSLocalizedFailureReasonErrorKey: @"The SDL library received ACK with encryption = OFF.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure you are on a supported remote head unit with proper policies and your app id is approved."
};
return [NSError errorWithDomain:SDLErrorDomainEncryptionLifecycleManager
@@ -55,9 +56,9 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_encryption_lifecycle_nak {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Encryption Lifecycle received a negative acknowledgement", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The remote head unit sent a NAK. Encryption service failed to start due to NAK.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure your certificates are valid.", nil)
+ NSLocalizedDescriptionKey: @"Encryption Lifecycle received a negative acknowledgement",
+ NSLocalizedFailureReasonErrorKey: @"The remote head unit sent a NAK. Encryption service failed to start due to NAK.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure your certificates are valid."
};
return [NSError errorWithDomain:SDLErrorDomainEncryptionLifecycleManager
@@ -68,10 +69,12 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
#pragma mark - SDLManager
-+ (NSError *)sdl_lifecycle_rpcErrorWithDescription:(NSString *)description andReason:(NSString *)reason {
++ (NSError *)sdl_lifecycle_rpcErrorWithDescription:(nullable NSString *)description andReason:(nullable NSString *)reason {
+ NSString *descriptionString = description ?: @"";
+ NSString *reasonString = reason ?: @"";
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(description, nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(reason, nil)
+ NSLocalizedDescriptionKey: descriptionString,
+ NSLocalizedFailureReasonErrorKey: reasonString
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorRPCRequestFailed
@@ -80,8 +83,8 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_lifecycle_notConnectedError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Could not find a connection", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The SDL library could not find a current connection to an SDL hardware device", nil)
+ NSLocalizedDescriptionKey: @"Could not find a connection",
+ NSLocalizedFailureReasonErrorKey: @"The SDL library could not find a current connection to an SDL hardware device"
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
@@ -91,8 +94,8 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_lifecycle_notReadyError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Lifecycle manager not ready", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The SDL library is not finished setting up the connection, please wait until the lifecycleState is SDLLifecycleStateReady", nil)
+ NSLocalizedDescriptionKey: @"Lifecycle manager not ready",
+ NSLocalizedFailureReasonErrorKey: @"The SDL library is not finished setting up the connection, please wait until the lifecycleState is SDLLifecycleStateReady"
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
@@ -100,10 +103,12 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
userInfo:userInfo];
}
-+ (NSError *)sdl_lifecycle_unknownRemoteErrorWithDescription:(NSString *)description andReason:(NSString *)reason {
++ (NSError *)sdl_lifecycle_unknownRemoteErrorWithDescription:(nullable NSString *)description andReason:(nullable NSString *)reason {
+ NSString *descriptionString = description ?: @"";
+ NSString *reasonString = reason ?: @"";
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(description, nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(reason, nil)
+ NSLocalizedDescriptionKey: descriptionString,
+ NSLocalizedFailureReasonErrorKey: reasonString
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorUnknownRemoteError
@@ -116,30 +121,36 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
userInfo:nil];
}
-+ (NSError *)sdl_lifecycle_startedWithBadResult:(SDLResult)result info:(NSString *)info {
++ (NSError *)sdl_lifecycle_startedWithBadResult:(nullable SDLResult)result info:(nullable NSString *)info {
+ NSString *resultString = result ?: @"";
+ NSString *infoString = info ?: @"";
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(result, nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(info, nil)
+ NSLocalizedDescriptionKey: resultString,
+ NSLocalizedFailureReasonErrorKey: infoString
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorRegistrationFailed
userInfo:userInfo];
}
-+ (NSError *)sdl_lifecycle_startedWithWarning:(SDLResult)result info:(NSString *)info {
++ (NSError *)sdl_lifecycle_startedWithWarning:(nullable SDLResult)result info:(nullable NSString *)info {
+ NSString *resultString = result ?: @"";
+ NSString *infoString = info ?: @"";
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(result, nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(info, nil)
+ NSLocalizedDescriptionKey: resultString,
+ NSLocalizedFailureReasonErrorKey: infoString
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorRegistrationSuccessWithWarning
userInfo:userInfo];
}
-+ (NSError *)sdl_lifecycle_failedWithBadResult:(SDLResult)result info:(NSString *)info {
++ (NSError *)sdl_lifecycle_failedWithBadResult:(nullable SDLResult)result info:(nullable NSString *)info {
+ NSString *resultString = result ?: @"";
+ NSString *infoString = info ?: @"";
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(result, nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(info, nil)
+ NSLocalizedDescriptionKey: resultString,
+ NSLocalizedFailureReasonErrorKey: infoString
};
return [NSError errorWithDomain:SDLErrorDomainLifecycleManager
code:SDLManagerErrorRegistrationFailed
@@ -157,36 +168,36 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_fileManager_cannotOverwriteError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Cannot overwrite remote file", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The remote file system already has a file of this name, and the file manager is set to not automatically overwrite files", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Set SDLFileManager autoOverwrite to YES, or call forceUploadFile:completion:", nil)
+ NSLocalizedDescriptionKey: @"Cannot overwrite remote file",
+ NSLocalizedFailureReasonErrorKey: @"The remote file system already has a file of this name, and the file manager is set to not automatically overwrite files",
+ NSLocalizedRecoverySuggestionErrorKey: @"Set SDLFileManager autoOverwrite to YES, or call forceUploadFile:completion:"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorCannotOverwrite userInfo:userInfo];
}
+ (NSError *)sdl_fileManager_noKnownFileError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"No such remote file is currently known", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The remote file is not currently known by the file manager. It could be that this file does not exist on the remote system or that the file manager has not completed its initialization and received a list of files from the remote system.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure a file with this name is present on the remote system and that the file manager has finished its initialization.", nil)
+ NSLocalizedDescriptionKey: @"No such remote file is currently known",
+ NSLocalizedFailureReasonErrorKey: @"The remote file is not currently known by the file manager. It could be that this file does not exist on the remote system or that the file manager has not completed its initialization and received a list of files from the remote system.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure a file with this name is present on the remote system and that the file manager has finished its initialization."
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorNoKnownFile userInfo:userInfo];
}
+ (NSError *)sdl_fileManager_unableToStartError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"The file manager was unable to start", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"This may be because files are not supported on this unit and / or LISTFILES returned an error", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that the system is sending back a proper LIST FILES response", nil)
+ NSLocalizedDescriptionKey: @"The file manager was unable to start",
+ NSLocalizedFailureReasonErrorKey: @"This may be because files are not supported on this unit and / or LISTFILES returned an error",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that the system is sending back a proper LIST FILES response"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorUnableToStart userInfo:userInfo];
}
+ (NSError *)sdl_fileManager_unableToUploadError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"The file manager was unable to send this file", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"This could be because the file manager has not started, or the head unit does not support files", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that the system is sending back a proper LIST FILES response and check the file manager's state", nil)
+ NSLocalizedDescriptionKey: @"The file manager was unable to send this file",
+ NSLocalizedFailureReasonErrorKey: @"This could be because the file manager has not started, or the head unit does not support files",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that the system is sending back a proper LIST FILES response and check the file manager's state"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorUnableToUpload userInfo:userInfo];
}
@@ -201,27 +212,27 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_fileManager_fileUploadCanceled {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"The file upload was canceled", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The file upload transaction was canceled before it could be completed", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"The file upload was canceled", nil)
+ NSLocalizedDescriptionKey: @"The file upload was canceled",
+ NSLocalizedFailureReasonErrorKey: @"The file upload transaction was canceled before it could be completed",
+ NSLocalizedRecoverySuggestionErrorKey: @"The file upload was canceled"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerUploadCanceled userInfo:userInfo];
}
+ (NSError *)sdl_fileManager_dataMissingError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"The file upload was canceled", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The data for the file is missing", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure the data used to create the file is valid", nil)
+ NSLocalizedDescriptionKey: @"The file upload was canceled",
+ NSLocalizedFailureReasonErrorKey: @"The data for the file is missing",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure the data used to create the file is valid"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorFileDataMissing userInfo:userInfo];
}
+ (NSError *)sdl_fileManager_staticIconError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"The file upload was canceled", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The file is a static icon, which cannot be uploaded", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Stop trying to upload a static icon, set it via the screen manager or create an SDLImage instead", nil)
+ NSLocalizedDescriptionKey: @"The file upload was canceled",
+ NSLocalizedFailureReasonErrorKey: @"The file is a static icon, which cannot be uploaded",
+ NSLocalizedRecoverySuggestionErrorKey: @"Stop trying to upload a static icon, set it via the screen manager or create an SDLImage instead"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorStaticIcon userInfo:userInfo];
}
@@ -230,9 +241,9 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_fileManager_fileDoesNotExistError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"The file manager was unable to send the file", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"This could be because the file does not exist at the specified file path or that passed data is invalid", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that the the correct file path is being set and that the passed data is valid", nil)
+ NSLocalizedDescriptionKey: @"The file manager was unable to send the file",
+ NSLocalizedFailureReasonErrorKey: @"This could be because the file does not exist at the specified file path or that passed data is invalid",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that the the correct file path is being set and that the passed data is valid"
};
return [NSError errorWithDomain:SDLErrorDomainFileManager code:SDLFileManagerErrorFileDoesNotExist userInfo:userInfo];
}
@@ -269,9 +280,9 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_choiceSetManager_failedToCreateMenuItems {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Choice Set Manager error", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"Choice set manager failed to create menu items due to menuName being empty.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"If you are setting the menuName, it is possible that the head unit is sending incorrect displayCapabilities.", nil)
+ NSLocalizedDescriptionKey: @"Choice Set Manager error",
+ NSLocalizedFailureReasonErrorKey: @"Choice set manager failed to create menu items due to menuName being empty.",
+ NSLocalizedRecoverySuggestionErrorKey: @"If you are setting the menuName, it is possible that the head unit is sending incorrect displayCapabilities."
};
return [NSError errorWithDomain:SDLErrorDomainChoiceSetManager code:SDLChoiceSetManagerErrorFailedToCreateMenuItems userInfo:userInfo];
}
@@ -280,8 +291,8 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
NSString *errorString = [NSString stringWithFormat:@"Choice Set Manager error invalid state: %@", state];
NSDictionary<NSString *, NSString *> *userInfo = @{
NSLocalizedDescriptionKey: errorString,
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The choice set manager could be in an invalid state because the head unit doesn't support choice sets or the manager failed to set up correctly.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"If you are setting the menuName, it is possible that the head unit is sending incorrect displayCapabilities.", nil)
+ NSLocalizedFailureReasonErrorKey: @"The choice set manager could be in an invalid state because the head unit doesn't support choice sets or the manager failed to set up correctly.",
+ NSLocalizedRecoverySuggestionErrorKey: @"If you are setting the menuName, it is possible that the head unit is sending incorrect displayCapabilities."
};
return [NSError errorWithDomain:SDLErrorDomainChoiceSetManager code:SDLChoiceSetManagerErrorInvalidState userInfo:userInfo];
}
@@ -290,27 +301,27 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_systemCapabilityManager_moduleDoesNotSupportSystemCapabilities {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Module does not understand system capabilities", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The connected module does not support system capabilities", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Use isCapabilitySupported to find out if the feature is supported on the head unit, but no more information about the feature is available on this module", nil)
+ NSLocalizedDescriptionKey: @"Module does not understand system capabilities",
+ NSLocalizedFailureReasonErrorKey: @"The connected module does not support system capabilities",
+ NSLocalizedRecoverySuggestionErrorKey: @"Use isCapabilitySupported to find out if the feature is supported on the head unit, but no more information about the feature is available on this module"
};
return [NSError errorWithDomain:SDLErrorDomainSystemCapabilityManager code:SDLSystemCapabilityManagerErrorModuleDoesNotSupportSystemCapabilities userInfo:userInfo];
}
+ (NSError *)sdl_systemCapabilityManager_cannotUpdateInHMINONE {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"System capabilities cannot be updated in HMI NONE.", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The system capability manager attempted to subscribe or update a system capability in HMI NONE, which is not allowed.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Wait until you are in HMI BACKGROUND, LIMITED, OR FULL before subscribing or updating a capability.", nil)
+ NSLocalizedDescriptionKey: @"System capabilities cannot be updated in HMI NONE.",
+ NSLocalizedFailureReasonErrorKey: @"The system capability manager attempted to subscribe or update a system capability in HMI NONE, which is not allowed.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Wait until you are in HMI BACKGROUND, LIMITED, OR FULL before subscribing or updating a capability."
};
return [NSError errorWithDomain:SDLErrorDomainSystemCapabilityManager code:SDLSystemCapabilityManagerErrorHMINone userInfo:userInfo];
}
+ (NSError *)sdl_systemCapabilityManager_cannotUpdateTypeDISPLAYS {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"System capability type DISPLAYS cannot be updated.", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The system capability manager attempted to update system capability type DISPLAYS, which is not allowed.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Subscribe to DISPLAYS to automatically receive updates or retrieve a cached display capability value directly from the SystemCapabilityManager.", nil)
+ NSLocalizedDescriptionKey: @"System capability type DISPLAYS cannot be updated.",
+ NSLocalizedFailureReasonErrorKey: @"The system capability manager attempted to update system capability type DISPLAYS, which is not allowed.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Subscribe to DISPLAYS to automatically receive updates or retrieve a cached display capability value directly from the SystemCapabilityManager."
};
return [NSError errorWithDomain:SDLErrorDomainSystemCapabilityManager code:SDLSystemCapabilityManagerErrorCannotUpdateTypeDisplays userInfo:userInfo];
}
@@ -319,36 +330,36 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_transport_unknownError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"TCP connection error", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"TCP connection cannot be established due to unknown error.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that correct IP address and TCP port number are specified, and the phone is connected to the correct Wi-Fi network.", nil)
+ NSLocalizedDescriptionKey: @"TCP connection error",
+ NSLocalizedFailureReasonErrorKey: @"TCP connection cannot be established due to unknown error.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that correct IP address and TCP port number are specified, and the phone is connected to the correct Wi-Fi network."
};
return [NSError errorWithDomain:SDLErrorDomainTransport code:SDLTransportErrorUnknown userInfo:userInfo];
}
+ (NSError *)sdl_transport_connectionRefusedError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"TCP connection cannot be established", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The TCP connection is refused by head unit. Possible causes are that the specified TCP port number is not correct, or SDL Core is not running properly on the head unit.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that correct IP address and TCP port number are specified. Also, make sure that SDL Core on the head unit enables TCP transport.", nil)
+ NSLocalizedDescriptionKey: @"TCP connection cannot be established",
+ NSLocalizedFailureReasonErrorKey: @"The TCP connection is refused by head unit. Possible causes are that the specified TCP port number is not correct, or SDL Core is not running properly on the head unit.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that correct IP address and TCP port number are specified. Also, make sure that SDL Core on the head unit enables TCP transport."
};
return [NSError errorWithDomain:SDLErrorDomainTransport code:SDLTransportErrorConnectionRefused userInfo:userInfo];
}
+ (NSError *)sdl_transport_connectionTimedOutError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"TCP connection timed out", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"The TCP connection cannot be established within a given time. Possible causes are that the specified IP address is not correct, or the connection is blocked by a firewall.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that correct IP address and TCP port number are specified. Also, make sure that the head unit's system configuration accepts TCP connections.", nil)
+ NSLocalizedDescriptionKey: @"TCP connection timed out",
+ NSLocalizedFailureReasonErrorKey: @"The TCP connection cannot be established within a given time. Possible causes are that the specified IP address is not correct, or the connection is blocked by a firewall.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that correct IP address and TCP port number are specified. Also, make sure that the head unit's system configuration accepts TCP connections."
};
return [NSError errorWithDomain:SDLErrorDomainTransport code:SDLTransportErrorConnectionTimedOut userInfo:userInfo];
}
+ (NSError *)sdl_transport_networkDownError {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Network is not available", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"TCP connection cannot be established because the phone is not connected to the network. Possible causes are: Wi-Fi being disabled on the phone or the phone is connected to a wrong Wi-Fi network.", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that the phone is connected to the Wi-Fi network that has the head unit on it. Also, make sure that correct IP address and TCP port number are specified.", nil)
+ NSLocalizedDescriptionKey: @"Network is not available",
+ NSLocalizedFailureReasonErrorKey: @"TCP connection cannot be established because the phone is not connected to the network. Possible causes are: Wi-Fi being disabled on the phone or the phone is connected to a wrong Wi-Fi network.",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that the phone is connected to the Wi-Fi network that has the head unit on it. Also, make sure that correct IP address and TCP port number are specified."
};
return [NSError errorWithDomain:SDLErrorDomainTransport code:SDLTransportErrorNetworkDown userInfo:userInfo];
}
@@ -357,9 +368,9 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_rpcStore_invalidObjectErrorWithObject:(id)wrongObject expectedType:(Class)type {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Type of stored value doesn't match with requested", nil),
+ NSLocalizedDescriptionKey: @"Type of stored value doesn't match with requested",
NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:@"Requested %@ but returned %@", NSStringFromClass(type), NSStringFromClass([wrongObject class])],
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Check the object type returned from the head unit system", nil)
+ NSLocalizedRecoverySuggestionErrorKey: @"Check the object type returned from the head unit system"
};
return [NSError errorWithDomain:SDLErrorDomainRPCStore code:SDLRPCStoreErrorGetInvalidObject userInfo:userInfo];
}
@@ -368,13 +379,24 @@ SDLErrorDomain *const SDLErrorDomainCacheFileManager = @"com.sdl.cachefilemanage
+ (NSError *)sdl_cacheFileManager_updateIconArchiveFileFailed {
NSDictionary<NSString *, NSString *> *userInfo = @{
- NSLocalizedDescriptionKey: NSLocalizedString(@"Cache File Manager error", nil),
- NSLocalizedFailureReasonErrorKey: NSLocalizedString(@"Unable to archive icon archive file to file path", nil),
- NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString(@"Make sure that file path is valid", nil)
+ NSLocalizedDescriptionKey: @"Failed to update the icon archive file",
+ NSLocalizedFailureReasonErrorKey: @"Unable to archive icon archive file to file path",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that file path is valid"
};
return [NSError errorWithDomain:SDLErrorDomainCacheFileManager code:SDLCacheManagerErrorUpdateIconArchiveFileFailure userInfo:userInfo];
}
+#pragma mark Audio Stream Manager
++ (NSError *)sdl_audioStreamManager_notConnected {
+ NSDictionary<NSString *, NSString *> *userInfo = @{
+ NSLocalizedDescriptionKey: @"Couldn't send audio data, the audio service is not connected",
+ NSLocalizedFailureReasonErrorKey: @"The audio service must be connected before sending audio data",
+ NSLocalizedRecoverySuggestionErrorKey: @"Make sure that a connection has been established, you are a NAVIGATION app and have the NAVIGATION app type in your configuration, and you are the active NAVIGATION app"
+ };
+
+ return [NSError errorWithDomain:SDLErrorDomainAudioStreamManager code:SDLAudioStreamManagerErrorNotConnected userInfo:userInfo];
+}
+
@end
diff --git a/SmartDeviceLink/SDLErrorConstants.h b/SmartDeviceLink/SDLErrorConstants.h
index 04fc7a7ec..8631e603f 100644
--- a/SmartDeviceLink/SDLErrorConstants.h
+++ b/SmartDeviceLink/SDLErrorConstants.h
@@ -199,3 +199,11 @@ typedef NS_ENUM(NSInteger, SDLCacheFileManagerError) {
*/
SDLCacheManagerErrorUpdateIconArchiveFileFailure = -1,
};
+
+typedef NS_ENUM(NSInteger, SDLAudioStreamManagerError) {
+ /// The audio stream is not currently connected
+ SDLAudioStreamManagerErrorNotConnected = -1,
+
+ /// Attempted to play but there's no audio in the queue
+ SDLAudioStreamManagerErrorNoQueuedAudio = -2
+};
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h
index a22ec39d9..cbe315df2 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.h
@@ -20,9 +20,9 @@ NS_ASSUME_NONNULL_BEGIN
"true" - if SDL grants the permission for the requested module
"false" - SDL denies the permission for the requested module.
- Optional
+ Optional, contains a boolean
*/
-@property (strong, nonatomic, nullable) NSArray<NSNumber<SDLBool> *> *allowed;
+@property (strong, nonatomic, nullable) NSArray<NSNumber *> *allowed;
@end
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m
index 872eded62..369b63645 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataConsentResponse.m
@@ -22,11 +22,11 @@
}
#pragma clang diagnostic pop
-- (void)setAllowed:(nullable NSArray<NSNumber<SDLBool> *> *)allowed {
+- (void)setAllowed:(nullable NSArray<NSNumber *> *)allowed {
[self.parameters sdl_setObject:allowed forName:SDLRPCParameterNameAllowed];
}
-- (nullable NSArray<NSNumber<SDLBool> *> *)allowed {
+- (nullable NSArray<NSNumber *> *)allowed {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameAllowed ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLPCMAudioConverter.m b/SmartDeviceLink/SDLPCMAudioConverter.m
index 454ecdebb..853f5a6fb 100755
--- a/SmartDeviceLink/SDLPCMAudioConverter.m
+++ b/SmartDeviceLink/SDLPCMAudioConverter.m
@@ -132,7 +132,7 @@ NSString *const SDLErrorDomainPCMAudioStreamConverter = @"com.sdl.extension.pcmA
err = ExtAudioFileRead(infile, &numFrames, &fillBufList);
if (err != noErr) {
if (*error != nil) {
- *error = [NSError errorWithDomain:SDLErrorDomainPCMAudioStreamConverter code:err userInfo:nil];
+ *error = [NSError errorWithDomain:SDLErrorDomainPCMAudioStreamConverter code:err userInfo:@{@"type": @"ExtAudioFileRead"}];
}
return nil;
}
@@ -143,7 +143,7 @@ NSString *const SDLErrorDomainPCMAudioStreamConverter = @"com.sdl.extension.pcmA
err = ExtAudioFileWrite(outfile, numFrames, &fillBufList);
if (err != noErr) {
if (*error != nil) {
- *error = [NSError errorWithDomain:SDLErrorDomainPCMAudioStreamConverter code:err userInfo:nil];
+ *error = [NSError errorWithDomain:SDLErrorDomainPCMAudioStreamConverter code:err userInfo:@{@"type": @"ExtAudioFileWrite"}];
}
return nil;
}
diff --git a/SmartDeviceLink/SDLPerformInteraction.h b/SmartDeviceLink/SDLPerformInteraction.h
index 575305682..bc035ce04 100644
--- a/SmartDeviceLink/SDLPerformInteraction.h
+++ b/SmartDeviceLink/SDLPerformInteraction.h
@@ -189,7 +189,7 @@ NS_ASSUME_NONNULL_BEGIN
@since SDL 1.0
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *interactionChoiceSetIDList;
+@property (strong, nonatomic) NSArray<NSNumber *> *interactionChoiceSetIDList;
/**
Help text. This is the spoken text when a user speaks "help" while the interaction is occurring.
diff --git a/SmartDeviceLink/SDLPerformInteraction.m b/SmartDeviceLink/SDLPerformInteraction.m
index 6b72bf502..540788531 100644
--- a/SmartDeviceLink/SDLPerformInteraction.m
+++ b/SmartDeviceLink/SDLPerformInteraction.m
@@ -135,11 +135,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_enumForName:SDLRPCParameterNameInteractionMode error:&error];
}
-- (void)setInteractionChoiceSetIDList:(NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList {
+- (void)setInteractionChoiceSetIDList:(NSArray<NSNumber *> *)interactionChoiceSetIDList {
[self.parameters sdl_setObject:interactionChoiceSetIDList forName:SDLRPCParameterNameInteractionChoiceSetIdList];
}
-- (NSArray<NSNumber<SDLInt> *> *)interactionChoiceSetIDList {
+- (NSArray<NSNumber *> *)interactionChoiceSetIDList {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameInteractionChoiceSetIdList ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLReadDID.h b/SmartDeviceLink/SDLReadDID.h
index a5ea8ee7c..299e7851d 100644
--- a/SmartDeviceLink/SDLReadDID.h
+++ b/SmartDeviceLink/SDLReadDID.h
@@ -44,8 +44,10 @@ NS_ASSUME_NONNULL_BEGIN
* <li>Minvalue:0; Maxvalue:65535</li>
* <li>ArrayMin:0; ArrayMax:1000</li>
* </ul>
+ *
+ * Mandatory, contains an integer
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *didLocation;
+@property (strong, nonatomic) NSArray<NSNumber *> *didLocation;
@end
diff --git a/SmartDeviceLink/SDLReadDID.m b/SmartDeviceLink/SDLReadDID.m
index cf2d276ff..dd337708e 100644
--- a/SmartDeviceLink/SDLReadDID.m
+++ b/SmartDeviceLink/SDLReadDID.m
@@ -42,11 +42,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameECUName ofClass:NSNumber.class error:&error];
}
-- (void)setDidLocation:(NSArray<NSNumber<SDLInt> *> *)didLocation {
+- (void)setDidLocation:(NSArray<NSNumber *> *)didLocation {
[self.parameters sdl_setObject:didLocation forName:SDLRPCParameterNameDIDLocation];
}
-- (NSArray<NSNumber<SDLInt> *> *)didLocation {
+- (NSArray<NSNumber *> *)didLocation {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameDIDLocation ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
index 2f18c4522..20c9cf4e2 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.h
@@ -172,7 +172,7 @@ NS_ASSUME_NONNULL_BEGIN
*
* @since SDL 3.0
*/
-@property (nullable, strong, nonatomic) NSArray<NSNumber<SDLInt> *> *supportedDiagModes;
+@property (nullable, strong, nonatomic) NSArray<NSNumber *> *supportedDiagModes;
/**
* Specifies the HMI capabilities.
diff --git a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
index e1d174ecf..5c081e9e6 100644
--- a/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
+++ b/SmartDeviceLink/SDLRegisterAppInterfaceResponse.m
@@ -163,11 +163,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameVehicleType ofClass:SDLVehicleType.class error:nil];
}
-- (void)setSupportedDiagModes:(nullable NSArray<NSNumber<SDLInt> *> *)supportedDiagModes {
+- (void)setSupportedDiagModes:(nullable NSArray<NSNumber *> *)supportedDiagModes {
[self.parameters sdl_setObject:supportedDiagModes forName:SDLRPCParameterNameSupportedDiagnosticModes];
}
-- (nullable NSArray<NSNumber<SDLInt> *> *)supportedDiagModes {
+- (nullable NSArray<NSNumber *> *)supportedDiagModes {
return [self.parameters sdl_objectsForName:SDLRPCParameterNameSupportedDiagnosticModes ofClass:NSNumber.class error:nil];
}
diff --git a/SmartDeviceLink/SDLTouchEvent.h b/SmartDeviceLink/SDLTouchEvent.h
index 4d2671c78..b11a9a21a 100644
--- a/SmartDeviceLink/SDLTouchEvent.h
+++ b/SmartDeviceLink/SDLTouchEvent.h
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN
Required, array size 1-1000, contains integer value 0-2000000000
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *timeStamp;
+@property (strong, nonatomic) NSArray<NSNumber *> *timeStamp;
/**
The touch's coordinate
diff --git a/SmartDeviceLink/SDLTouchEvent.m b/SmartDeviceLink/SDLTouchEvent.m
index 617174bbc..2fbfa90d4 100644
--- a/SmartDeviceLink/SDLTouchEvent.m
+++ b/SmartDeviceLink/SDLTouchEvent.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
return [self.store sdl_objectForName:SDLRPCParameterNameId ofClass:NSNumber.class error:&error];
}
-- (void)setTimeStamp:(NSArray<NSNumber<SDLInt> *> *)timeStamp {
+- (void)setTimeStamp:(NSArray<NSNumber *> *)timeStamp {
[self.store sdl_setObject:timeStamp forName:SDLRPCParameterNameTS];
}
-- (NSArray<NSNumber<SDLInt> *> *)timeStamp {
+- (NSArray<NSNumber *> *)timeStamp {
NSError *error = nil;
return [self.store sdl_objectsForName:SDLRPCParameterNameTS ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLAudioStreamManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLAudioStreamManagerSpec.m
index e538122f5..77999e9d9 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLAudioStreamManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLAudioStreamManagerSpec.m
@@ -2,6 +2,7 @@
#import <Nimble/Nimble.h>
#import "SDLAudioStreamManager.h"
+#import "SDLError.h"
#import "SDLStreamingAudioManagerMock.h"
QuickSpecBegin(SDLAudioStreamManagerSpec)
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLSequentialRPCRequestOperationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLSequentialRPCRequestOperationSpec.m
index 0c121d22c..9f3f5cc93 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLSequentialRPCRequestOperationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLSequentialRPCRequestOperationSpec.m
@@ -51,9 +51,9 @@ describe(@"Sending sequential requests", ^{
testOperation = [[SDLSequentialRPCRequestOperation alloc] initWithConnectionManager:testConnectionManager requests:sendRequests.copy progressHandler:^BOOL(__kindof SDLRPCRequest * _Nonnull request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error, float percentComplete) {
TestRequestProgressResponse *progressResponse = testProgressResponses[request.correlationID];
- expect(progressResponse.percentComplete).to(beCloseTo(percentComplete));
- expect(response).toNot(beNil());
- expect(error).to(beNil());
+ expect(progressResponse.percentComplete).toEventually(beCloseTo(percentComplete));
+ expect(response).toEventuallyNot(beNil());
+ expect(error).toEventually(beNil());
[resultResponses addObject:response];
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m
index 730af59f7..4f708087b 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLSoftButtonManagerSpec.m
@@ -167,6 +167,7 @@ describe(@"a soft button manager", ^{
testObject2 = [[SDLSoftButtonObject alloc] initWithName:object2Name state:object2State1 handler:nil];
testManager.softButtonObjects = @[testObject1, testObject2];
+ [NSThread sleepForTimeInterval:0.1];
});
it(@"should set soft buttons correctly", ^{
diff --git a/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m b/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m
index dc713cb06..150e07168 100644
--- a/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m
+++ b/SmartDeviceLinkTests/Notifications/SDLResponseDispatcherSpec.m
@@ -701,7 +701,7 @@ describe(@"a response dispatcher", ^{
});
context(@"storing an audio pass thru handler", ^{
- __block SDLPerformAudioPassThru* testPerformAudioPassThru = nil;
+ __block SDLPerformAudioPassThru *testPerformAudioPassThru = nil;
__block NSUInteger numTimesHandlerCalled = 0;
context(@"with a handler", ^{
@@ -713,10 +713,10 @@ describe(@"a response dispatcher", ^{
testPerformAudioPassThru.correlationID = @1;
[testDispatcher storeRequest:testPerformAudioPassThru handler:nil];
});
-
+
it(@"should store the handler" ,^{
-// expect(testDispatcher.audioPassThruHandler).toNot(beNil());
-// expect(testDispatcher.audioPassThruHandler).to(equal(testPerformAudioPassThru.audioDataHandler));
+ expect((id)testDispatcher.audioPassThruHandler).toNot(beNil());
+ expect((id)testDispatcher.audioPassThruHandler).to(equal((id)testPerformAudioPassThru.audioDataHandler));
});
describe(@"when an on audio data notification arrives", ^{
@@ -728,21 +728,22 @@ describe(@"a response dispatcher", ^{
});
it(@"should run the handler", ^{
- expect(@(numTimesHandlerCalled)).to(equal(@1));
+ expect(numTimesHandlerCalled).to(equal(1));
});
});
-
+
describe(@"when an on audio data response arrives", ^{
beforeEach(^{
SDLPerformAudioPassThruResponse *performAudioPassThruResponse = [[SDLPerformAudioPassThruResponse alloc] init];
performAudioPassThruResponse.success = @YES;
-
+
SDLRPCResponseNotification *notification = [[SDLRPCResponseNotification alloc] initWithName:SDLDidReceivePerformAudioPassThruResponse object:nil rpcResponse:performAudioPassThruResponse];
[[NSNotificationCenter defaultCenter] postNotification:notification];
});
-
+
it(@"should clear the handler", ^{
-// expect(testDispatcher.audioPassThruHandler).to(beNil());
+ expect((id)testDispatcher.audioPassThruHandler).to(beNil());
+ expect(@(numTimesHandlerCalled)).to(equal(1));
});
});
});
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m
index 23f2b4916..d9a49d20c 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLButtonPressSpec.m
@@ -53,12 +53,32 @@ describe(@"Getter/Setter Tests", ^ {
expect(testRequest.buttonPressMode).to(equal(SDLButtonPressModeShort));
});
- it(@"Should get correctly using initializer", ^ {
+ it(@"Should get correctly when initialized with initWithButtonName:moduleType:", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLButtonPress *testRequest = [[SDLButtonPress alloc] initWithButtonName:SDLButtonNameAC moduleType:SDLModuleTypeClimate];
+#pragma clang diagnostic pop
+ expect(testRequest.buttonName).to(equal(SDLButtonNameAC));
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate));
+ });
+
+ it(@"Should get correctly when initialized with initWithButtonName:moduleType:moduleId:", ^ {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLButtonPress *testRequest = [[SDLButtonPress alloc] initWithButtonName:SDLButtonNameAC moduleType:SDLModuleTypeClimate moduleId:@"123"];
+#pragma clang diagnostic pop
+ expect(testRequest.buttonName).to(equal(SDLButtonNameAC));
+ expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate));
+ expect(testRequest.moduleId).to(equal(@"123"));
+ });
+
+ it(@"Should get correctly when initialized with initWithButtonName:moduleType:moduleId:buttonPressMode:", ^ {
+ SDLButtonPress *testRequest = [[SDLButtonPress alloc] initWithButtonName:SDLButtonNameAC moduleType:SDLModuleTypeClimate moduleId:@"123" buttonPressMode:SDLButtonPressModeShort];
expect(testRequest.buttonName).to(equal(SDLButtonNameAC));
expect(testRequest.moduleType).to(equal(SDLModuleTypeClimate));
expect(testRequest.moduleId).to(equal(@"123"));
+ expect(testRequest.buttonPressMode).to(equal(SDLButtonPressModeShort));
});
it(@"Should return nil if not set", ^ {
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m
index 479220441..4d92cd188 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetInteriorVehicleDataConsentResponseSpec.m
@@ -19,7 +19,7 @@
QuickSpecBegin(SDLGetInteriorVehicleDataConsentResponseSpec)
describe(@"Getter/Setter Tests", ^ {
- __block NSArray<NSNumber<SDLBool> *> *allowed = nil;
+ __block NSArray<NSNumber *> *allowed = nil;
beforeEach(^{
allowed = @[@YES, @NO];
diff --git a/SmartDeviceLinkTests/SDLCacheFileManagerSpec.m b/SmartDeviceLinkTests/SDLCacheFileManagerSpec.m
index 05832a953..e320a76ad 100644
--- a/SmartDeviceLinkTests/SDLCacheFileManagerSpec.m
+++ b/SmartDeviceLinkTests/SDLCacheFileManagerSpec.m
@@ -147,8 +147,8 @@ describe(@"a cache file manager", ^{
});
it(@"it should return downloaded image and no error", ^{
- expect(resultImage).to(equal(testImage));
- expect(resultError).to(beNil());
+ expect(resultImage).toEventually(equal(testImage));
+ expect(resultError).toEventually(beNil());
});
});