mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
changed url scheme to launch app from extension
This commit is contained in:
parent
55cd730d5d
commit
bb7458e276
3 changed files with 23 additions and 13 deletions
|
|
@ -336,18 +336,16 @@
|
|||
[errView addAction:yesAction];
|
||||
|
||||
[PhoneMainView.instance presentViewController:errView animated:YES completion:nil];
|
||||
} else {
|
||||
if ([[url scheme] isEqualToString:@"sip"]) {
|
||||
// remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and
|
||||
// trailing "/"
|
||||
if ([[url host] isEqualToString:@"call_log"] &&
|
||||
[[url path] isEqualToString:@"/show"]) {
|
||||
[VIEW(HistoryDetailsView) setCallLogId:[url query]];
|
||||
[PhoneMainView.instance popToView:HistoryDetailsView.compositeViewDescription];
|
||||
} else {
|
||||
NSString *sipUri = [[url resourceSpecifier] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];
|
||||
[VIEW(DialerView) setAddress:sipUri];
|
||||
}
|
||||
} else if ([scheme isEqualToString:@"sip"]) {
|
||||
// remove "sip://" from the URI, and do it correctly by taking resourceSpecifier and removing leading and
|
||||
// trailing "/"
|
||||
NSString *sipUri = [[url resourceSpecifier] stringByTrimmingCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"/"]];
|
||||
[VIEW(DialerView) setAddress:sipUri];
|
||||
} else if ([scheme isEqualToString:@"linphone-widget"]) {
|
||||
if ([[url host] isEqualToString:@"call_log"] &&
|
||||
[[url path] isEqualToString:@"/show"]) {
|
||||
[VIEW(HistoryDetailsView) setCallLogId:[url query]];
|
||||
[PhoneMainView.instance changeCurrentView:HistoryDetailsView.compositeViewDescription];
|
||||
}
|
||||
}
|
||||
return YES;
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@
|
|||
}
|
||||
|
||||
- (void)launchOnHistoryDetailsWithId:(NSString *)logId {
|
||||
[self launchAppWithURL:[NSURL URLWithString:[@"sip://call_log/show?" stringByAppendingString:logId]]];
|
||||
[self launchAppWithURL:[NSURL URLWithString:[@"linphone-widget://call_log/show?" stringByAppendingString:logId]]];
|
||||
}
|
||||
|
||||
- (IBAction)firstButtonTapped {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,18 @@
|
|||
<string>linphone-config</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-widget</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0</string>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue