summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Dickow <jjdickow@gmail.com>2016-03-09 16:32:45 -0500
committerJustin Dickow <jjdickow@gmail.com>2016-03-09 16:32:45 -0500
commit7eb79012a1ebfcd21d0047b51b8debc8b3bcc9e1 (patch)
tree8cd08cc0f1aac1a748c41709f17689e4e8b8081a
parentb028efe0841b3ccef8395650f2d6dd89e520bfe2 (diff)
downloadsdl_ios-7eb79012a1ebfcd21d0047b51b8debc8b3bcc9e1.tar.gz
Add support for LAUNCH_APP system request
-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 806575f0f..a09f33303 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 handleSystemRequestHTTP:systemRequest];
+ } else if (requestType == [SDLRequestType LAUNCH_APP]) {
+ [self handleSystemRequestLockScreenIconURL:systemRequest];
}
}
@@ -354,6 +356,16 @@ const int POLICIES_CORRELATION_ID = 65535;
#pragma mark OnSystemRequest Handlers
+- (void)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) {