RefreshAsync failed
Amazon.CognitoIdentity.<GenerateNewCredentialsAsync>c__AnonStorey44:<>m__18(AmazonServiceResult) (at /Developer/repos/git/freeracing/Assets/AWSUnitySDK/AWSCore/Amazon.CognitoIdentity/CognitoAWSCredentials.cs:294)
Amazon.Unity3D.<FireCallbackOnCoRoutine>c__Iterator2:MoveNext() (at /Developer/repos/git/freeracing/Assets/AWSUnitySDK/AWSCore/Amazon.Unity3D/AmazonMainThreadDispatcher.cs:94)
curl -X POST -H "X-Amz-Target: AWSCognitoIdentityService.GetId" -H "Content-Type: application/x-amz-json-1.1" -H "User-Agent: AWS-SDK-UNITY/1.0.4" -H "X-HTTP-Method-Override: POST" -H "Accept: application/json" -d '{"IdentityPoolId":"us-east-1:cc43fef0-cb92-43ee-8156-71e3885f8d44"}' https://cognito-identity.us-east-1.amazonaws.com/
{"ClassName":"Amazon.Runtime.AmazonServiceException","Message":"The operation couldn’t be completed. (NSURLErrorDomain error -1012.)","InnerException":{"ClassName":"System.Net.WebException","Message":"The operation couldn’t be completed. (NSURLErrorDomain error -1012.)","InnerException":null,"HelpURL":null,"StackTraceString":null,"RemoteStackTraceString":null,"RemoteStackIndex":0,"HResult":-2146233079,"Source":null,"ExceptionMethod":null,"Data":null},"HelpURL":null,"StackTraceString":null,"RemoteStackTraceString":null,"RemoteStackIndex":0,"HResult":-2146233088,"Source":null,"ExceptionMethod":null,"Data":null}
Amazon.CognitoIdentity.<GenerateNewCredentialsAsync>c__AnonStorey44:<>m__18(AmazonServiceResult) (at /Developer/repos/git/freeracing/Assets/AWSUnitySDK/AWSCore/Amazon.CognitoIdentity/CognitoAWSCredentials.cs:292)
WWWForm form = new WWWForm();
form.AddField( "IdentityPoolId", "us-east-1:cc43fef0-cb92-43ee-8156-71e3885f8d44" );
Dictionary<string, string> headers = form.headers;
var encoding = new System.Text.UTF8Encoding();
Dictionary<string, string> dict = new Dictionary<string, string>();
dict["IdentityPoolId"] = "us-east-1:cc43fef0-cb92-43ee-8156-71e3885f8d44";
byte[] rawData = encoding.GetBytes( SMUtils.SerializeToString(dict) );
string url = "https://cognito-identity.us-east-1.amazonaws.com/";
// Add a custom header to the request.
// In this case a basic authentication to access a password protected resource.
headers["X-Amz-Target"] = "AWSCognitoIdentityService.GetId";
headers["Content-Type"] = "application/x-amz-json-1.1" ;
headers["User-Agent"] = "AWS-SDK-UNITY/1.0.4";
headers["X-HTTP-Method-Override"] = "POST";
headers["Accept"] = "application/json";
// Post a request to an URL with our custom headers
WWW www = new WWW(url, rawData, headers);
yield return www;
Debug.Log( string.Join( "\n", www.responseHeaders.Select(x => "[" + x.Key + ": " + x.Value + "]").ToArray() ) + "\n\n" + www.data );
works fine in the emulator (and on Android), but not on the iPad we're testing with, despite other POST, and GET www calls working fine.
What's up here? I also have to ask what is your testing platform like, because (like Unity themselves) it seems like both OSX and iOS testing is sparsely done, at best.