Mono reflection using HTTPWebRequest and HTTPS with GET

I have a nice download manager that runs in a background thread and works great with both POST and GET requests over HTTPS on every platform but iOS.

I’d seen issues reported in the past about iOS and HTTPS with HttpWebRequest, but had hoped they’d been resolved in Mono 2.6 (is that what we’re using now?)

Well, it doesn’t work sadly, but oddly enough you can use HTTPS if the method is a POST.

POST using HTTPS on iOS via HttpWebRequest works great (at least asynchronously which is how I’m using it.)

GET using HTTPS on iOS via HttpWebRequest results in a Mono JIT reflection error when running on iOS.

Anyone using a 3rd party library Unity plugin that works with HTTPS and iOS?

I could always write some server side code to support a POST version of ‘get’ (but that’s a bit hacky…)

Anybody slain this issue before?

Does UniWeb work with HTTPS on iOS? BestHTTP?


In your iOS Player Settings, under Other Settings → Optimization → Api Compatibility Level, make sure you have .NET 2.0 Subset selected (instead of .NET 2.0). That fixed the JIT error for me.