- Home /
WebClient FileDownload exception in iOS - NotSupportedException: The URI prefix is not recognized.
Unity: 2017.1.0f3
Target platform: iOS 10.3
Target device: iPhone 6s
When I used unity 5.6, WebClient.DownloadFile code is fine.
But Unity 2017, WebClient.DownloadFile code occur exceptions below only iOS platform.
NotSupportedException: The URI prefix is not recognized. at System.Net.WebRequest.Create (System.Uri requestUri, System.Boolean useUriBase) [0x00000] in :0 at System.Net.WebRequest.Create (System.Uri requestUri) [0x00000] in :0 at System.Net.WebClient.GetWebRequest (System.Uri address) [0x00000] in :0 at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) [0x00000] in :0 at System.Net.WebClient.DownloadString (System.Uri address) [0x00000] in :0 at System.Net.WebClient.DownloadString (System.String address) [0x00000] in :0
To fix this exceptions replace WebClient to WWW class as you know. But I cannot find why WebClient.DownloadFile method occur exceptions.
Please tell me this exceptions.
Answer by feelfeel · Aug 22, 2017 at 02:23 AM
API Compatibility Level: .NET 4.6 is not working Only set to .Net 2.0 or .Net 2.0 subset working
Need to fix WebClient class in .NET 4.6 and iOS platform.
Someday maybe fix... I don't know when fix it.
To Unity developer: Need to work for .NET 4.6 compatibility.