Add sip URL support

This commit is contained in:
Yann Diorcet 2012-08-14 15:00:02 +02:00
parent 919e732dc0
commit efa6a69780
2 changed files with 23 additions and 0 deletions

View file

@ -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"];

View file

@ -2,6 +2,17 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>org.linphone.phone</string>
<key>CFBundleURLSchemes</key>
<array>
<string>sip</string>
</array>
</dict>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>