Application.OpenUrl(''file://…") won't work on iOS build from Unity

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```

Do you even need that file: thing?

Try three slashes:

Application.OpenURL(“file:///” + Path.Combine(Application.streamingAssetsPath, fileName));

You can’t open a pdf using OpenUrl with a filepath to the pdf. It is a file protocol and iOS doesn’t know what to do with it.

Does OpenURL even work on local files?

I figure you either need to use www, unitywebrequest, or for iOS I believe you can just use the File.ReadAllBytes (Android requires the first two for streamingassets, but I think iOS can use any of those.)

no it doesn’t, because OpenUrl with a local file, iOS doesn’t know what to do with it. It’s a file… it doesn’t link it to any other app to actually open it.
Thats why you have url schemes to open something with another app. Like OpenURL(“tel://9102938193”) opens up the phone app and fills in that value.

If you want to open a pdf, it needs an app to open it with, and the app requires to be able to read that pdf.