code on iOS does not work

All this code works just fine in unity editor, but android or iOS it just fails and throws errors…

// Label for speech
        SpeechLbl = GameObject.Find ("SpeechLabel").GetComponent<UILabel> ();
        // Start microphone, wait 5 seconds then end recording.
        GetComponent<AudioSource>().clip = Microphone.Start (null,false,5,8000);
        yield return new WaitForSeconds(5);
        Microphone.End(null);
        // Playback what we've got.
        GetComponent<AudioSource>().Play();
        // Generate audio data clip.
        float[] clipData = new float[GetComponent<AudioSource>().clip.samples * GetComponent<AudioSource>().clip.channels];
        GetComponent<AudioSource>().clip.GetData(clipData,0);
        WaveGen.WaveFormatChunk format = new WaveGen().MakeFormat(GetComponent<AudioSource>().clip);
        // Create a file in local app path.
        string filename = "recordedSpeech.wav";
        filePath = Application.persistentDataPath + "/" + filename;
        FileStream stream = File.OpenWrite(filePath);
        new WaveGen().Write (clipData,format,stream);
        stream.Close();
        // Check response from AT&T API and save in speech label.
        SpeechResponse response = requestFactory.SpeechToText (filePath);
        string transcribedText = response.Recognition.NBest[0].ResultText;
        SpeechLbl.text = transcribedText;

and errors iOS here:

creating a file in local path
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65)

Check response from API
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65)

TlsException: The authentication or decryption has failed.
  at Mono.Math.BigInteger+Kernel.Multiply (System.UInt32[] x, UInt32 xOffset, UInt32 xLen, System.UInt32[] y, UInt32 yOffset, UInt32 yLen, System.UInt32[] d, UInt32 dOffset) [0x00000] in <filename unknown>:0
  at Mono.Security.Protocol.Tls.RecordProtocol.ProcessAlert (AlertLevel alertLevel, AlertDescription alertDesc) [0x00000] in <filename unknown>:0
  at Mono.Security.Protocol.Tls.RecordProtocol.InternalReceiveRecordCallback (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
  at System.IO.Stream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 count, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
  at Mono.Security.Protocol.Tls.RecordProtocol.BeginReceiveRecord (System.IO.Stream record, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
  at Mono.Security.Protocol.Tls.SslStreamBase.InternalReadCallback (IAsyncResult result) [0x00000] in <filename unknown>:0
  at System.Net.Sockets.Socket+SocketAsyncResult.Complete () [0x00000] in <filename unknown>:0
Rethrow as WebException: Error getting response stream (ReadDone1): ReceiveFailure
  at System.Net.Configuration.BypassElementCollection.set_Item (Int32 index, System.Net.Configuration.BypassElement value) [0x00000] in <filename unknown>:0
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
  at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.Send (HTTPMethods method, System.String relativeUri, System.Collections.Specialized.NameValueCollection headers, System.Byte[] bodyBytes, System.String contentType, System.String accept, Boolean returnWebResponse) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.Send (HTTPMethods method, System.String relativeUri, System.Collections.Specialized.NameValueCollection headers, System.String body, System.String contentType, System.String accept) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.GetNewClientCredential () [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.GetClientCredentials () [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.ConvertToText (System.String audioFilePath, System.String speechContext, Nullable`1 xSpeechContext, System.String xArgsParameter, System.Collections.Specialized.NameValueCollection xArgsCollection, ATT_MSSDK.Speechv3.XArgs xArgs) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.SpeechToText (System.String audioFilePath) [0x00000] in <filename unknown>:0
  at VoiceRec+<DoRecognize>c__Iterator17.MoveNext () [0x00000] in <filename unknown>:0
Rethrow as InvalidResponseException: Failed: Unable to get response
  at ATT_MSSDK.RequestFactory..ctor (System.String endPoint, System.String clientId, System.String clientSecret, System.Collections.Generic.List`1 scopes, System.String redirectUri, System.String proxyAddress) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.Send (HTTPMethods method, System.String relativeUri, System.Collections.Specialized.NameValueCollection headers, System.Byte[] bodyBytes, System.String contentType, System.String accept, Boolean returnWebResponse) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.Send (HTTPMethods method, System.String relativeUri, System.Collections.Specialized.NameValueCollection headers, System.String body, System.String contentType, System.String accept) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.GetNewClientCredential () [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.GetClientCredentials () [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.ConvertToText (System.String audioFilePath, System.String speechContext, Nullable`1 xSpeechContext, System.String xArgsParameter, System.Collections.Specialized.NameValueCollection xArgsCollection, ATT_MSSDK.Speechv3.XArgs xArgs) [0x00000] in <filename unknown>:0
  at ATT_MSSDK.RequestFactory.SpeechToText (System.String audioFilePath) [0x00000] in <filename unknown>:0
  at VoiceRec+<DoRecognize>c__Iterator17.MoveNext () [0x00000] in <filename unknown>:0
(Filename: currently not available on il2cpp Line: -1)

Anyone can help me please, this is important for me.

bump, anyone pls

It appears you’re using the AT&T Speech API. Are you certain that it’s compatible with IL2CPP?

I fixed the authentication error and others, now i am getting this one… I am not sure whether its compatible or not but it does not work android either, even though the API it self have android and iOS support on their website…

Validation successful!

(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 65)
MissingMethodException: Method not found: 'Default constructor not found...ctor() of ATT_MSSDK.OAuthToken+OAuthTokenRaw'.
   at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToObject (IDictionary`2 dict, System.Type type) [0x00000] in <filename unknown>:0
   at System.Web.Script.Serialization.JavaScriptSerializer.ConvertToType (System.Type type, System.Object obj) [0x00000] in <filename unknown>:0
   at ATT_MSSDK.OAuthToken.ParseJSON (System.String jsonInput) [0x00000] in <filename unknown>:0
   at ATT_MSSDK.RequestFactory.GetNewClientCredential () [0x00000] in <filename unknown>:0
   at ATT_MSSDK.RequestFactory.GetClientCredentials () [0x00000] in <filename unknown>:0
   at ATT_MSSDK.RequestFactory.ConvertToText (System.String audioFilePath, System.String speechContext, Nullable`1 xSpeechContext, System.String xArgsParameter, System.Collections.Specialized.NameValueCollection xArgsCollection, ATT_MSSDK.Speechv3.XArgs xArgs) [0x00000] in <filename unknown>:0
   at ATT_MSSDK.RequestFactory.SpeechToText (System.String audioFilePath) [0x00000] in <filename unknown>:0
   at VoiceReco+<DoRecognize>c__Iterator18.MoveNext () [0x00000] in <filename unknown>:0

Does it not look like it has something to do with :0 ??

anyone pls