From efa6a69780591608e73309d8ce1212085f814f79 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Tue, 14 Aug 2012 15:00:02 +0200 Subject: [PATCH] Add sip URL support --- Classes/LinphoneAppDelegate.m | 12 ++++++++++++ linphone-Info.plist | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index cd7f89a06..8cdbcd2d8 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -184,6 +184,18 @@ int __aeabi_idiv(int a, int b) { - (void)applicationWillTerminate:(UIApplication *)application { } +- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { + [self startApplication]; + if([LinphoneManager isLcReady]) { + // Go to ChatRoom view + DialerViewController *controller = DYNAMIC_CAST([[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription] push:TRUE], DialerViewController); + if(controller != nil) { + [controller setAddress:[url absoluteString]]; + } + } + return YES; +} + - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { [LinphoneLogger log:LinphoneLoggerDebug format:@"PushNotification: Receive %@", userInfo]; NSDictionary *aps = [userInfo objectForKey:@"aps"]; diff --git a/linphone-Info.plist b/linphone-Info.plist index 22181516a..7b5fcad31 100644 --- a/linphone-Info.plist +++ b/linphone-Info.plist @@ -2,6 +2,17 @@ + CFBundleURLTypes + + + CFBundleURLName + org.linphone.phone + CFBundleURLSchemes + + sip + + + CFBundleDevelopmentRegion English CFBundleDisplayName