I want to implement Skype Instant Message sending/sharing on my iOS app. I just want to share certain link on skype.
Following is the code is am using:
//skype sharing
BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"skype:"]];
NSString * msg = [NSString stringWithFormat:#"Hi. Check it out.\n %# %#",[[self Detail] objectForKey:#"title"],self.shareLink];
NSString * urlSkype = [NSString stringWithFormat:#"skype:?chat=%#",msg];
NSURL * SkypeURL = [NSURL URLWithString:[urlSkype stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if(installed)
{
[[UIApplication sharedApplication] openURL:SkypeURL];
}
else
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.com/apps/skype/skype"]];
}
If skype is installed, then also the above code isn't working as wanted. I want that the message-msg should automatically be sent(as Instant Message) to the Skype contact I select from the iOS app.
How do I implement this?
This is not possible, as written here in, Skype URI API Reference Documentation.
Or direct link, Skype URI API reference for Chat
And here is, Skype URI tutorial: iOS apps
They also added a note there,
With the recent redesign of the Skype for iOS client, URIs are not currently supported on the Skype for iOS 5.x branch.
It seems to me that the user is able to start a new chat with the selected Skype contact, but not able to send a message immediately.
To start a new chat with a given user:
NSString * urlSkype = [NSString stringWithFormat:#"skype:skype.test.user.1?chat",msg];
Check the Skype URI API reference (Chat) for more info.
Related
I have a button that when it is clicked, It will let us choose between default mail app, yahoo mail and Safari to read inbox.
Currently i'm using:
NSURL* mailURL = [NSURL URLWithString:#"mailto:abc#gmail.com&subject=My%20Subject%20Line&body=Hello%20Email!"];
[[UIApplication sharedApplication] openURL: mailURL];
This code always open the compose screen. I don't want it be shown. I just want to open inbox or just only open the mail app. How can I implement that?
Thank you very much!
UPDATE
I know how to open app without compose screen now.
If you want to open default mail app, use:
NSURL* mailURL = [NSURL URLWithString:#"message://"];
If you want to open Gmail, use:
NSString *gmailUrl = #"googlegmail://";
Now the problem is: How to show a dialog to choose between them
Like this picture
May be below code can help:
NSURL* mailURL = [NSURL URLWithString:#"message://"];
if ([[UIApplication sharedApplication] canOpenURL:mailURL]) {
[[UIApplication sharedApplication] openURL:mailURL];
}
Reads more at: https://www.macstories.net/tutorials/ios-7-and-mail-message-urls/
Also check Vladimir's answer: https://stackoverflow.com/a/29211632/5575752
I want to provide an email link in my app for users to send feedback. I can use a mailto link, but if the user has uninstalled Mail.app (the inbuilt mail app), iOS puts up a dialog saying that it has been uninstalled, and telling the user how to restore it.
I don't want this to happen. Instead, I want to use another email app if it exists, like Gmail or Inbox. And if there are multiple third-party email apps, the user should get a choice, rather than the app picking one randomly.
How do I do that?
Ideally in a way that works with all apps, rather than hardcoding specific apps to check for, like:
if Inbox is installed {
open Inbox
} else if Gmail is installed {
open Gmail
} else if Outlook is installed {
open Outlook
}
... which obviously doesn't work if the user uses an app other than these three.
You will need to add query scheme for gmail and outlook.
And then you will need to check whether your app can open it or not.
If your app can then go ahead otherwise check for other in elseif condition.
like this..
NSString *gmailmURL = #"googlegmail://";
NSString *outllokURL = #"outlook://";
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:gmailURL]])
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:gmailmURL]];
else if ([[UIApplication sharedApplication]
canOpenURL:[NSURL URLWithString:outlookURL]])
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:outllokURL]];
You can add more info in gmail by appending url like this
googlegmail://co?subject=Example&body=ExampleBody
There must be something like this for outlook also...
This question already has answers here:
How to integrate Skype in my iPhone application
(4 answers)
Closed 6 years ago.
I read the pages in stackoverflow and I can understand that I can embed or redirect to Skype app from app I code, but I couldn't find how to make it on iOS even whether it's possible or not.
I want to redirect to skype triggered by pushing button in my iOS app(swift).Please teach me how to do that(If it is not possible, I also want to know that)
Thanks,
when you build your app for iOS 9 and above and you need to call URL schemes, you will now need to declare them in your apps Info.plist. There is a new key LSApplicationQueriesSchemes.
you can do this in helps of canOpenURL:
Objective-C
NSURL *skype = [NSURL URLWithString:[NSString stringWithFormat:#"skype:"]]; .
if ([[UIApplication sharedApplication] canOpenURL:skype]) {
[[UIApplication sharedApplication] openURL:skype];
} else {
// skype not Installed in your Device
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.com/apps/skype/skype"]]; // or use https://itunes.apple.com/in/app/skype-for-iphone/id304878510?mt=8
}
Swift
var skype: NSURL = NSURL(string: String(format: "skype:"))! //add object skype like this
if UIApplication.sharedApplication().canOpenURL(skype) {
UIApplication.sharedApplication().openURL(skype)
}
else {
// skype not Installed in your Device
UIApplication.sharedApplication().openURL("http://itunes.com/apps/skype/skype")
}
for example see this link
I am new to IOS.I am trying to open another app from my app to send mail so i got URL schema and format to open gmail app but I am not aware of the formats to open Exchange,AOL,Yahoo,Outlook so that I can check whether that app is available in device are not and if it is available I will send mails from that if app is not available I will give a alert that app is not installed. below is the code for gmail. Can any one help me out with formats of Exchange,AOL,Yahoo,Outlook like i did for gmail "googlegmail:///co?" so that I can implement the UI manually like image belowenter image description here
NSString *customURL = [NSString stringWithFormat:#"googlegmail:///co?subject=%#", subject];
NSURL *url = [NSURL URLWithString:[customURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
else {
NSLog(#"Application is not installed");
//not installed, show popup for a user or an error
}
first of All you Need a iPhone Device to Run Email Code.Email can not be send through Simulator.
And here is the link http://www.appcoda.com/ios-programming-create-email-attachment/
Good Tutorial For Sending Email in iOS and also a discussing a good format and all the steps i think it may be helpful for u.thanks.
I have explored tel:// pattern to establish a call. But in my iPad mini I have only wi-fi support. so this uri fails. What I want to know is if there is nay way write a code such that my application will ask user to choose among all calling feature supporting application.
I tried callto: pattern but no luck. any help on this?
To make calls via Skype you can use this URL scheme, source is skype docs
BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"skype:"]];
if(installed)
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"skype:echo123?call"]];
}
else
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"http://itunes.com/apps/skype/skype"]];
}
To make calls via facetime you can use use similar url scheme
NSURL *url = [NSURL URLWithString:#"facetime://+123456789"];
[[UIApplication sharedApplication] openURL:url];
Hope this helps , There is no such feature which i am aware of that will give you list of all calling apps , but you can manually show an selection option and let user select any of above