summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-03-10 11:06:02 -0500
committerJoel Fischer <joeljfischer@gmail.com>2016-03-10 11:06:02 -0500
commitf92f39b7e93e9d5e8a12a8564dcbab40cd2ee406 (patch)
treed161ed816e651ce48047f8a42fba2f5c0fc30cd4
parent994b22bfc2ae78c1a54cf2a453346a16f297613a (diff)
parentb1e8ef3bb073b132592c39ae3f994af1b4ee328e (diff)
downloadsdl_ios-f92f39b7e93e9d5e8a12a8564dcbab40cd2ee406.tar.gz
Merge branch 'hotfix/issue_371'
# Conflicts: # SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
-rw-r--r--SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
index 94ba0a751..9475d1de8 100644
--- a/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
+++ b/SmartDeviceLink-iOS/SmartDeviceLink/SDLProxy.m
@@ -324,6 +324,8 @@ const int POLICIES_CORRELATION_ID = 65535;
[self handleSystemRequestLockScreenIconURL:systemRequest];
} else if (requestType == [SDLRequestType HTTP]) {
[self sdl_handleSystemRequestHTTP:systemRequest];
+ } else if (requestType == [SDLRequestType LAUNCH_APP]) {
+ [self sdl_handleSystemRequestLaunchApp:systemRequest];
}
}
@@ -354,6 +356,16 @@ const int POLICIES_CORRELATION_ID = 65535;
#pragma mark OnSystemRequest Handlers
+- (void)sdl_handleSystemRequestLaunchApp:(SDLOnSystemRequest *)request {
+ NSURL *URLScheme = [NSURL URLWithString:request.url];
+ if (URLScheme == nil) {
+ [SDLDebugTool logInfo:[NSString stringWithFormat:@"Launch App failure: invalid URL sent from module: %@", request.url] withType:SDLDebugType_RPC toOutput:SDLDebugOutput_All toGroup:self.debugConsoleGroupName];
+ return;
+ }
+
+ [[UIApplication sharedApplication] openURL:URLScheme];
+}
+
- (void)handleSystemRequestProprietary:(SDLOnSystemRequest *)request {
NSDictionary *JSONDictionary = [self validateAndParseSystemRequest:request];
if (JSONDictionary == nil || request.url == nil) {