Skip to content

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

License

Notifications You must be signed in to change notification settings

AlexanderLukashin/document-handler

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C++ 73.0%
  • C# 19.5%
  • Shell 7.5%