Domain=NSURLErrorDomain Code 1202
<p>Hi I receive the following error:</p>

<blockquote>
  <p>Error Domain=NSURLErrorDomain Code=-1202 \"The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server-prod.name-cloud.com” which could put your confidential information at risk.\" UserInfo={NSErrorFailingURLStringKey=<a href="https://server-prod.name-cloud.com" rel="noreferrer">https://server-prod.name-cloud.com</a> /v3/project/session/926B9E6BE31B/, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=<a href="https://server-prod.name-cloud.com" rel="noreferrer">https://server-prod.name-cloud.com</a> /v3/project/session/926B9E6BE31B/, _kCFStreamErrorCodeKey=-9843, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “server-prod.name-cloud.com” which could put your confidential information at risk.}</p>
</blockquote>

<p>I read all the <a href="https://developer.apple.com/library/content/technotes/tn2232/_index.html" rel="noreferrer">relevant docs</a>, we apply all the requirements in "Common Failures" section.</p>

<p>More details:</p>

<ul>
<li>the errors received only from Germany(except 4 times in the past 2W that was from Italy)</li>
<li>It is not reproducible in house</li>
<li>Eventually after tons of retries the uploads go throw </li>
<li>This was received booth in iOS 10.x.x &amp; 9.x.x</li>
<li>I use amazon servers with <a href="http://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html" rel="noreferrer">2016-08 SSL Security Policies</a>,
so according to <a href="https://support.apple.com/en-il/HT206871" rel="noreferrer">apple</a> it should be OK</li>
</ul>

<p>In the app I use:</p>

<pre><code>&lt;key&gt;NSAppTransportSecurity&lt;/key&gt;
   &lt;dict&gt;
      &lt;key&gt;NSAllowsArbitraryLoads&lt;/key&gt;
   &lt;true/&gt;
&lt;/dict&gt;
</code></pre>

<p>note - in production I always use HTTP’s, I leave the NSAllowsArbitraryLoads because some testers offshore can switch the rout to HTTP for debugging.</p>