Me and some coworkers recently discovered that due to security reasons, the Application.OpenURL can no longer be used for opening local app files and that we should use the File Provider. Sadly, that only works for Android and nothing is said about IOS. Our app needed that and now we’re searching for another way of doing this.
We have seen that this should be possible by creating plugins on Swift, but is this the only way? Do you guys have any suggestions at all?
You can use C#'s builtin filesystem classes, but depending on the kind of data you’re loading you’ll still need to get it into a format Unity can use. What kind of files specifically are you trying to load? Anything text-based is easy, and Texture2D can be loaded via LoadImage. Other kinds of data can get trickier.
Our app can send and receive files (.doc, .xls, .txt, .jpg, .pdf, .mp3 and .mp4… etc). What we want to do is, from inside the running app, we want it to externally open these files for the user, so they can visualize them through other apps on their cellphones. And this is where the problem lies…
The WWW class would not have helped you with that. As described it honestly sounds like this is impossible due to iOS’s security protocol - apps just can’t access each other’s files for security reasons.
You could maybe send files over to the other apps using a Share Sheet. I haven’t done that before, but it looks like this free asset might help with that.