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.
Just add the plugin via Package Manager with the git url:
https://github.com/Draudastic26/document-handler.git#upm
using drstc.DocumentHandler;
...
DocumentHandler.OpenDocument(somePath);
I just tested this on iOS with a PDF file. Please let me know if you tested this with other document types.
Feel free to create a pull request or an issue!
martejpad post in this thread: https://answers.unity.com/questions/1337996/ios-open-docx-file-from-applicationpersistentdata.html
Unity 2019.4.3f