Reputation:
Hi i am new for Ios app in my project i have added the facility for user make call from ios app to skype
for this i have installed skype in my device and when i made call call from my app call not going
What I have tried so far is the following:
NSString * userNameString = @"sarithasai";
NSString* urlString = [NSString stringWithFormat:@";skype://%@?call", userNameString];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
Upvotes: 3
Views: 537
Reputation: 1003
Try this code,
BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"skype:"]];
if(installed)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"skype:%@?call", userNameString]]];
}
else
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.com/apps/skype/skype"]];
}
for more detail follow here.
Upvotes: 1
Reputation: 57114
According to the Skype URI tutorial: iOS apps by MSDN your schema is wrong. You should probably use the following instead:
NSString *urlString = [NSString stringWithFormat:@"skype:%@?call", userNameString];
Note that you should check wether or not Skype is installed beforehand which is mentioned in the linked article as well.
To start a chat use the schema
skype:user?chat
To start a video call use
skype:user?call&video=true
Upvotes: 2