Opening file in an app from URL - ios

I'm trying to create a link that, if clicked on a mobile device (ios), will open a PDF in a FileExplorer mobile app (or the App store if they don't have one installed). I've tried finding apps with their own URL scheme (similar to Facebook's "fb://" or YouTube's "youtube://"), but I'm not having any luck.
I've reviewed the content in the following pages and still have not found an answer:
iPhone apps: Can I open an app from a link in a website?
How to open ios app using url?
Opening an app from URL schema

There is the option to open the Files app at a specific location using the shareddocuments:// URL scheme, as described in this article.

There's no direct solution. Your best best is to let the user decide what to do with the PDF. Use a UIActivityViewController setup with the PDF. Then the user can choose. Typical options will be email, print, iBooks, Preview, other apps that handle PDFs, and as of iOS 11, the standard Files app.
You are not going to find URL schemes for "file explorer" apps in general. And there's little point to finding URL schemes to a few specific such apps. Any such apps the user may already have should appear in the activity view.

Related

Open iOS application from universal links

I have implemented universal links in my application by uploading "apple-app-site-association" to my server and enabling "associated domains" in my project(by adding applinks). My app opens whenever I click on my server weblink from Safari browser.
1) Its not working on any other browser
2) I need to open my app from other apps as well, i.e. Instagram, Twitter etc.
How can I achieve the above scenarios using universal links. If not, is there any other way of achieving the same.
Not all apps will open universal links in you app. You can read a little more here:
"Pasting a Universal Link directly into the Safari URL field doesn’t cause the app to open automatically. If you do this, you will have to manually pull the website down so that a prompt will appear at the top asking you to open the respective app.
But, if you paste links in Facebook(app), Twitter(app), Mail(app) or even if you go to Facebook on Safari and then click on a universal link, the app opens directly.
Universal links will not works for all the apps in iOS. If you click on a universal link from any of the “BLACK LISTED” apps, it will not open the app. Go to this link to know more.
As in step one, for the first time you will have to manually pull down the website and click “open” to open the link using the respective app. The iOS will “remember” to open the app instead of opening the safari if the universal link with the registered domains are clicked."
https://medium.com/#abhimuralidharan/universal-links-in-ios-79c4ee038272
https://docs.branch.io/pages/deep-linking/universal-links/#appsbrowsers-that-support-universal-links

Deep Linking in iOS - Navigate to Apple Store if app not installed

I need to implement Deep Linking concept without using any third party libraries (Branch and etc..). The link (starts with http/https) will be shared from app through Message, Email or any Social media apps. By tapping on shared link I want to open corresponding app if its already installed on device else it should navigate to the Apple Store to download the app.
I have knowledge on URL schemas but it works only when the app is already installed on device and the schema URL format also be different (like fb:// for Facebook app).
I have also done some R&D on Universal Links but I don't know whether it supports for dynamic links as for me the link will be combination of base URL(static) and referrer key(dynamic). I also need to track the referrer information once the corresponding app is opened like who referred this app (referrer details).
e.g: https://domain.com/ReferrerID
Can you please help me on it. Thanks in advance.
To make it clear on Universal Links in iOS will not take you to Apple Store if app is not installed on device. When you click on a link then Universal Links helps you to open the app if the app is already installed on device else the same link will be going to browse in Safari. When the url browse in Safari then we have to run JavaScript to navigate/redirect to Apple Store.
Yes you can support universal links to your application from iOS 9 or above. You can generate dynamic links and have deferred deep linking also.
Follow this steps its simple Click Here
For the file mentioned in the link you need to add that file in the root of your website which consists of the path valid for deeplinking. And that file should not have any extension.
Then validate your domain at Here.
After that you can add all the domains thing in your associated domain under the project capabilites.

Switching between apps with URL Schemes (iOS)

I'm developing an iPhone app with Swift which acts on certain file types (.xml &.zip). I've added these filetypes to the project file as a UTI (Uniform Type Identifiers). When accessing these sorts of files, usually from my email, I press and hold the file and a menu pops up from below. I choose my app icon that says "Open in MyApp". Is there a way that I can return to the email which triggered this event from within the app?
I've done some research on this and found that URL Schemes are the best way for inter - app communication, but you cannot arbitrarily open an app just to open it.
https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/UTIRef/Introduction/Introduction.html
The vision I have in mind is sort of how Google apps communicate with each other. For example, when opening a link from gmail, it switches apps to chrome. When chrome loads, the page back navigator is in Chrome displays the text similar to "back to gmail"
In iOS 9 the system implements this automatically, as seen in this screenshot here.

How to use UIWebView to display a website in an iPhone app?

I am using UIWebView to open a link in my app and I submitted it to the AppStore which resulted in the rejection with reason of 2.12 of review guidline which says
2.12: Apps that are not very useful, are simply web sites bundled as apps, or do not provide any lasting entertainment value may be rejected
Is it because I used UIWebView to open a web site.
UIWebView are used to open the websites. But your application must have certain more features.
The application containing only a UIWebView to open a website is of no use as instead you can open the website directly in the Safari and in that open the Actionsheet from the bottom bar and tap on Add to Home Screen option. It will be same as the application you have tried to upload on Appstore.
It is not because you open a website with UIWebView, but it might be because your app does only that. Your app must do more that just that.
As far as my knowledge you are not providing any useful information i.e nothing is special in your app

How to pass data from webpage to iPhone app

I want to password marked in web page to my iPhone application. If I paste it to clipboard then I need to run my app in background which is not possible in iPhone. So, how I should do that?
You can define a Custom URL Scheme in your iPhone app. Then you can link to your iPhone app using a regular HTML link, so for example Click here to go to my app. For more information about this, go to the Apple documentation (scroll to the part about Custom URL schemes). You can also find a lot of information about this by googling.

Resources