From aa66b5ae9562445775bf52011ed904da181173ad Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Mon, 1 Dec 2014 14:01:50 +0100 Subject: [PATCH] Change the provisioning scheme: we now use linphone-config:// and escape the rest of the URL This is consistent with Android and also a bit more future-proof (if we switch to something else than HTTP for provisioning) --- Classes/LinphoneAppDelegate.m | 5 +++-- linphone-Info.plist | 14 +------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index 10234e5a0..c13700ed2 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -232,8 +232,9 @@ - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { NSString *scheme = [[url scheme] lowercaseString]; - if ([scheme isEqualToString:@"linphone-config-http"] || [scheme isEqualToString:@"linphone-config-https"]) { - configURL = [[NSString alloc] initWithString:[[url absoluteString] stringByReplacingOccurrencesOfString:@"linphone-config-" withString:@""]]; + if ([scheme isEqualToString:@"linphone-config"] || [scheme isEqualToString:@"linphone-config"]) { + NSString* encodedURL = [[url absoluteString] stringByReplacingOccurrencesOfString:@"linphone-config://" withString:@""]; + self.configURL = [encodedURL stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; UIAlertView* confirmation = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Remote configuration",nil) message:NSLocalizedString(@"This operation will load a remote configuration. Continue ?",nil) delegate:self diff --git a/linphone-Info.plist b/linphone-Info.plist index 3b0579398..b0000d2a2 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -83,19 +83,7 @@ org.linphone.phone CFBundleURLSchemes - linphone-config-http - - - - CFBundleTypeRole - Viewer - CFBundleURLIconFile - linphone_icon_72@2x - CFBundleURLName - org.linphone.phone - CFBundleURLSchemes - - linphone-config-https + linphone-config