You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chenbin f9bedd2c62 add file open 4 years ago
..
Runtime add file open 4 years ago
CHANGELOG.md add file open 4 years ago
CHANGELOG.md.meta add file open 4 years ago
LICENSE.md add file open 4 years ago
LICENSE.md.meta add file open 4 years ago
README.md add file open 4 years ago
README.md.meta add file open 4 years ago
Runtime.meta add file open 4 years ago
package.json add file open 4 years ago
package.json.meta add file open 4 years ago

README.md

DocumentHandler

Open a document (e.g. PDF) with a corresponding native app.

Since Application.OpenURL(...path) is not working (anymore?) to open local files on iOS, I searched the internet for another solution (see credits). I found usable code and want to make it more accessible.

How to install

Just add the plugin via Package Manager with the git url:

https://github.com/Draudastic26/document-handler.git#upm

Usage

using drstc.DocumentHandler;
...
DocumentHandler.OpenDocument(somePath);

Notes

I just tested this on iOS with a PDF file. Please let me know if you tested this with other document types.

Contribution

Feel free to create a pull request or an issue!

Credits

martejpad post in this thread: https://answers.unity.com/questions/1337996/ios-open-docx-file-from-applicationpersistentdata.html

Unity 2019.4.3f