title: React app fetch works only sometimes on iPhone safari
body: <p>I have a confusing issue. I have a React/Redux front end that pulls data from TWO backends. One backend, I built myself with Node. The second backend is run by NASA. </p>
  
  <p>QUESTION: The fetch call only works for the NASA API on iPhone safari. It does NOT work with my Node backend. It works fine on computers, just not my phone. </p>
  
  <p>THINGS I HAVE ALREADY TRIED: </p>
  
  <ol>
  <li><p>whatwg-fetch - this did nothing. It's still there, but it's not improving anything</p></li>
  <li><p>REACT_APP_... - I made sure to name my API address with the prefix "REACT_APP.." to ensure create-react-app isn't preventing the data from coming through. It isn't doing anything helpful. </p></li>
  </ol>
  
  <p>Here is a fetch call that works: </p>
  
  <pre><code>export const getNasaImage = () =&gt; dispatch =&gt; {
      return fetch('https://api.nasa.gov/planetary/apod?api_key=IBNbXHbyn8pC2k9EVxumOUauFaccdzinCD0WJcSA', 
      {
          method: 'GET'
      })
      .then(res =&gt; res.json())
      .then(imageData =&gt; {
          dispatch(setNasaImage(imageData))
      }); 
  }
  </code></pre>
  
  <p>Here is a fetch call in the same file that does not work on iPhones: </p>
  
  <pre><code>export const getAllQuizes = () =&gt; dispatch =&gt; {
      dispatch(quizLoading(true)); 
      return fetch(`${REACT_APP_API_URL}/quiz/`, 
          {
              method: 'GET', 
          }
      )
      .then(res =&gt; res.json())
      .then(quizes =&gt; {
          dispatch(setAllQuizes(quizes.quizes))
          return dispatch(quizLoading(false));
      })
      .catch(err =&gt; {
          console.error(err); 
          dispatch(quizLoading(false));
          return Promise.reject();  
      }); 
  };  
  </code></pre>
  
  <p>Here is my config file, where the REACT_APP_API_URL comes from: </p>
  
  <pre><code>if (process.env.NODE_ENV === 'development'){
      module.exports = {
          REACT_APP_API_URL: 'http://localhost:8080'
      }  
  } else {
      module.exports = {
          REACT_APP_API_URL: 'THEAPIADDRESS'
      }
  }
  </code></pre>