I’m trying to open local PDF file located in SteamingAssets folded in Unity from iOS app. I’ve tried different ways, most of them are working on my Mac, but not on the iPad:
public void openPDF(string fileName) {
Application.OpenURL("file://" + Path.Combine(Application.streamingAssetsPath, fileName));
}
What’s wrong with OpenURL() method? Am I missing something?
P.S. also tried to add following flags to Info.plist - no success as well.
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>```
**UPDATE #1**
Now the issue is a bit more precise - iOS can't find the file, which is located in `Data/Raw` folder. When you call the method it returns:
```2018-07-10 12:09:43.220514+0200 MyApp[7327:780708] TIC TCP Conn Failed [9:0x15b54d380]: 1:50 Err(50)
2018-07-10 12:09:43.233098+0200 MyApp[7327:780708] Task <73D63E76-6C43-477C-987E-AED113CC1788>.<0> HTTP load failed (error code: -1009 [1:50])
2018-07-10 12:09:43.233631+0200 MyApp[7327:780924] NSURLConnection finished with error - code -1009```
I've tried to see where the link is pointing too after Unity build - it looks correct:
```file:///var/containers/Bundle/Application/C0219E08-70E8-4917-855F-A01C9C27DFD7/MyApp.app/Data/Raw/pdf.pdf```