Hi,
I need to download and store Big size file on device. I did the following code:
WWW www = new WWW(url);
yield return www;
if (Succeeded(www))
SaveFile(www.bytes);
//my method that save files
and it works everywhere apart iOS. It throws there Timeout and memoryException. I quess this happen, because I load file into the memory and after I save it on device. So I wroted to the following code:
WebClient client = new WebClient();
client.DownloadFileCompleted += new AsyncCompletedEventHandler(
(object sender, AsyncCompletedEventArgs e) =>
{
if (e.Error != null)
{
Debug.Log(e.Error.Message);
Debug.Log(e.Error.InnerException);
}
});
client.DownloadFileAsync(new Uri(url), path);
But I get the following exveption:
System.IO.IOException: The authentication or decryption has failed. —> Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in :0
at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in :0
— End of inner exception stack trace —
at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) [0x00000] in :0
UnityEngine.Debug:Log(Object)
Assets.Scripts.Network.c__AnonStoreyD:<>m__26(Object, AsyncCompletedEventArgs) (at Assets/Scripts/Network/HttpService.cs:140)
System.Net.WebClient:m__E(Object)
Do You have any idea how to solve this issue?