summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2018-05-15 16:58:39 -0400
committerNicoleYarroch <nicole@livio.io>2018-05-15 16:58:39 -0400
commit4f91e80c864c1e10cae90e9a137af2fea0536d34 (patch)
tree525bafc40b2d3fa2c7aff24ffac0a044f4cf2178
parent3199eedcf8d882f2e1bace3fe046478a17c8b098 (diff)
downloadsdl_ios-4f91e80c864c1e10cae90e9a137af2fea0536d34.tar.gz
Fixed vehicle odometer status messagefeature/issue_620_swift_sdl_example_app
* Changed product name for Swift Ex. App Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj10
-rw-r--r--SmartDeviceLink_Example/VehicleDataManager.m3
-rw-r--r--SmartDeviceLink_Example/VehicleDataManager.swift6
3 files changed, 11 insertions, 8 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index d272f9341..18b8a8ae9 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -2414,7 +2414,7 @@
8814AEA920AB663800466E0F /* PerformInteractionManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PerformInteractionManager.m; sourceTree = "<group>"; };
8814AEAB20AB667B00466E0F /* PerformInteractionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PerformInteractionManager.swift; sourceTree = "<group>"; };
88166AFF207E41E900076236 /* MenuManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuManager.swift; sourceTree = "<group>"; };
- 88295697207CF68800EF056C /* SmartDeviceLink-Example-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SmartDeviceLink-Example-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 88295697207CF68800EF056C /* SDL Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SDL Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
88295698207CF68800EF056C /* SmartDeviceLink-Example-Swift-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "SmartDeviceLink-Example-Swift-Info.plist"; path = "/Users/nicolelivioradio.com/sdl_ios/SmartDeviceLink-Example-Swift-Info.plist"; sourceTree = "<absolute>"; };
8829569C207CFD0D00EF056C /* SmartDeviceLink-Example-Swift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SmartDeviceLink-Example-Swift-Bridging-Header.h"; sourceTree = "<group>"; };
8829569D207CFD0E00EF056C /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -3227,7 +3227,7 @@
5D4019AF1A76EC350006B0C2 /* SDL Example.app */,
5D61FA1C1A84237100846EE7 /* SmartDeviceLink.framework */,
5D61FA261A84237100846EE7 /* SmartDeviceLinkTests.xctest */,
- 88295697207CF68800EF056C /* SmartDeviceLink-Example-Swift.app */,
+ 88295697207CF68800EF056C /* SDL Example.app */,
88802FEF20853AE600E9EBC6 /* SmartDeviceLinkSwift.framework */,
);
name = Products;
@@ -5599,7 +5599,7 @@
);
name = "SmartDeviceLink-Example-Swift";
productName = "SmartDeviceLink-iOS";
- productReference = 88295697207CF68800EF056C /* SmartDeviceLink-Example-Swift.app */;
+ productReference = 88295697207CF68800EF056C /* SDL Example.app */;
productType = "com.apple.product-type.application";
};
88802CD720853AE600E9EBC6 /* SmartDeviceLinkSwift */ = {
@@ -6933,7 +6933,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SDLTestApp;
- PRODUCT_NAME = "$(TARGET_NAME)";
+ PRODUCT_NAME = "SDL Example";
SWIFT_OBJC_BRIDGING_HEADER = "SmartDeviceLink_Example/SmartDeviceLink-Example-Swift-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
@@ -6952,7 +6952,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SDLTestApp;
- PRODUCT_NAME = "$(TARGET_NAME)";
+ PRODUCT_NAME = "SDL Example";
SWIFT_OBJC_BRIDGING_HEADER = "SmartDeviceLink_Example/SmartDeviceLink-Example-Swift-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
diff --git a/SmartDeviceLink_Example/VehicleDataManager.m b/SmartDeviceLink_Example/VehicleDataManager.m
index dbd954e3c..5615dfe52 100644
--- a/SmartDeviceLink_Example/VehicleDataManager.m
+++ b/SmartDeviceLink_Example/VehicleDataManager.m
@@ -55,7 +55,6 @@ NS_ASSUME_NONNULL_BEGIN
[self.sdlManager sendRequest:subscribeToVehicleOdometer withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) {
if (error || ![response isKindOfClass:SDLSubscribeVehicleDataResponse.class]) {
SDLLogE(@"Error sending Get Vehicle Data RPC: %@", error);
- return;
}
SDLGetVehicleDataResponse* getVehicleDataResponse = (SDLGetVehicleDataResponse *)response;
@@ -78,7 +77,7 @@ NS_ASSUME_NONNULL_BEGIN
SDLLogD(@"You have permission to access to vehicle data, but the vehicle you are connected to did not provide any data");
[message appendString:@"Unknown"];
} else {
- SDLLogD(@"Unknown reason for failure to get vehicle data: %@", error != nil ? error.localizedDescription : @"no error message");
+ SDLLogE(@"Unknown reason for failure to get vehicle data: %@", error != nil ? error.localizedDescription : @"no error message");
[message appendString:@"Unsubscribed"];
}
diff --git a/SmartDeviceLink_Example/VehicleDataManager.swift b/SmartDeviceLink_Example/VehicleDataManager.swift
index 2257b3a81..1d8c5a52a 100644
--- a/SmartDeviceLink_Example/VehicleDataManager.swift
+++ b/SmartDeviceLink_Example/VehicleDataManager.swift
@@ -36,6 +36,10 @@ extension VehicleDataManager {
sdlManager.send(request: subscribeToVehicleOdometer) { [unowned self] (request, response, error) in
guard let result = response?.resultCode else { return }
+ if error != nil {
+ SDLLog.e("Error sending Get Vehicle Data RPC: \(error!.localizedDescription)")
+ }
+
var message = "\(VehicleDataOdometerName): "
switch result {
case .success:
@@ -54,7 +58,7 @@ extension VehicleDataManager {
SDLLog.d("You have permission to access to vehicle data, but the vehicle you are connected to did not provide any data")
message += "Unknown"
default:
- SDLLog.d("Unknown reason for failure to get vehicle data: \(error != nil ? error!.localizedDescription : "no error message")")
+ SDLLog.e("Unknown reason for failure to get vehicle data: \(error != nil ? error!.localizedDescription : "no error message")")
message += "Unsubscribed"
return
}