What I want to do is open any iOS Application (Evernote, safari, Facebook, etc) from my own iOS application. For example, I have created my app with two simple buttons, the first one is named "Evernote" and the second one is named "Safari", so when I click on the "Evernote" button I want that the Evernote App launch on my iOS device, the same when I click on the "Safari" button I want that the button opens my Safari App. How can I do that? It is that possible? If it is, please tell me how. Thank you very much.
yes it possible if you known this app scheme reference URL.
Example call Tel app:
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:#"tel://"]]){
NSString *tell = [#"tel://" stringByAppendingString:phoneNumber];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:tell]];
}
Safari and other is same way.
List common schemes Url here : http://wiki.akosma.com/IPhone_URL_Schemes
Hope this link helps you.
http://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629
If you need to open external apps from your app then follow the above link. Or if you need to open the iOS native apps like phone, mail, safari, etc, you can use URL schemes for opening the app.
Related
The question of how to link to a specific app or a list of a specific developers apps from a web link has been answered many times. My issue is that I cannot find a format that works to open the appstore front page, I do not want to link to a specific app I just want the link to open the app store on iOS devices. I have tried http://appstore.com and that works on iPad but on the iPhone I am getting a blank page. Is there a way to open the front page of the app store app from a web link on both iPad and iPhones?
Thy this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"https://itunes.apple.com/en/genre/ios/id36?mt=8"]];
It opens the featured page at iphone (main page).
Am I able to open app from browser using Custom URL Schemes, now I need open a browser back this app after click cancel button in app. how can I open a browser? is it possible?
are can we open last used app from this app?
You can open safari back with below line.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"http://www.google.com"]];
However it will not open the browser with the state from where it went into background.
We can not open last used application. We can open it only if we know its custom URL.
I'm currently developing an app for iOS and I've got a list of PDF files in the app which I want to be able to open (and show).
Now I do know you can do that with the UIDocumentInteractionController, which then shows what apps are able to open the specific file, but I'm looking for a solution where I can open an app (e.g. Adobe Reader) without first having to open the UIDocumentInteractionController, tapping the app I want and then opening it.
Is this possible? And if so: how?
Thanks in advance!
DckWlff
You can have a look at URL Schemes. But the app you want to open needs to support it.
http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
You can open an app in your App like this:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"myapp://"]];
Edit:
You can find some schemes here: http://schemes.zwapp.com
Is there any URL scheme that will launch the Calendar app on iOS?
I use Prowl to push Growl notifications to my phone. They just added support to launch an app with a URL based on the notification. I tried cal:// caldav:// and ical:// without any luck.
Try this. it works for me. Here is the link
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: #"calshow://"]];
Update: you can now use the calshow:// URL to open the Calendar app on iOS.
See this question: Apple does not list this application on its Apple URL Scheme Reference.
I want to create an app that will act as a shortcut for my website.So basically what i want to do is when user click on app icon it opens my website in safari or other browser and close the app.
I know its not recommended to close app as per apple guideline but i want to do it gracefully like it opens browser now its work is done; close the app.
Does anybody have any idea?
I can open the browser using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"myurl"]];
but don't have any idea on how to close app gracefully.
Note: you can NOT do the following in iOS apps (2016):
You can close your app by using this code.
exit(0);