How to make API calls IPV6 compatible in react-native using the .fetch function?
<p>I have developed an app (for IOS) written in react native which is working good in IPV4 networks. However, recently Apple has sent a message saying that my app did not work when tested in an IPV6 network. They told me that I had to make it compatible with IPV6-only networks too.</p>

<p>The question is, how can I make my existing API calls compatible with an IPV6 network?</p>

<p>My API uses the https protocol and it is called by domain name, not a raw IP.</p>

<p>A sample fetch call that I use is:</p>

<pre><code>fetch(query,{
      method: 'post',
      headers: Utils.fetchHeaders('post')
      })
      .then(Utils.checkStatus)
      .then(Utils.parseJSON)
      .then(json =&gt; this._handleResponse(json))
      .catch(error =&gt; {

         this.setState({
          votingError: 'Sorry, there was an error!',
          loading: false
       });

      });
</code></pre>

<p>and the API endpoint is in following format:</p>

<blockquote>
  <p><a href="https://www.myapidomain.com" rel="noreferrer">https://www.myapidomain.com</a></p>
</blockquote>

<p>any help appreciated.</p>