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
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).
I wanted to know how I can open an external app from a custom keyboard in iOS 8?
is it by example possible to open Facebook, or post a Facebook message from a custom keyboard, if yes, how can I achieve this?
Thank you,
joe
I was trying to work with the UIApplication sharedApplication openURL: method in order to open the AppStore to link to the app so user's could rate it, Xcode kept telling me that the openURL method would not work in the extension. So I am sure you are able to refer back to the app itself but not open other app's which hopefully they will be able to change fairly soon.
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.
I have the following URL which links to the product page of a Mac app. I'd like to provide this URL inside my iPhone app. However, it always launches the App Store and subsequently can't display the product because it's not an iOS app. How would I tell it to open in Safari? Is this even possible?
http://itunes.apple.com/us/app/appname/idxxxxxxxxx
Haven't found an answer, so opted for directing to Appshoper URL instead.
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);