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)
This commit is contained in:
Guillaume BIENKOWSKI 2014-12-01 14:01:50 +01:00
parent a114dc03b1
commit aa66b5ae95
2 changed files with 4 additions and 15 deletions

View file

@ -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

View file

@ -83,19 +83,7 @@
<string>org.linphone.phone</string>
<key>CFBundleURLSchemes</key>
<array>
<string>linphone-config-http</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>CFBundleURLIconFile</key>
<string>linphone_icon_72@2x</string>
<key>CFBundleURLName</key>
<string>org.linphone.phone</string>
<key>CFBundleURLSchemes</key>
<array>
<string>linphone-config-https</string>
<string>linphone-config</string>
</array>
</dict>
</array>