Erin Noonan
Erin Noonan

Reputation: 11

Opening file in an app from URL

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

Upvotes: 1

Views: 1961

Answers (2)

Tobias Zucali
Tobias Zucali

Reputation: 177

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

Upvotes: 2

rmaddy
rmaddy

Reputation: 318934

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.

Upvotes: 1

Related Questions