title: Real IOS Device will not make network requests - React Native
body: <p>I am attempting to get my React Native application working on a real iPhone so I can begin integrating the app with branch.io. For some reason I cannot get my app to make network requests to my backend api on AWS. My code works as expected in the simulator when I hit the backend api on my local dev environment with localhost:3000/auth/login/. Below are the results of my efforts. </p>
  
  <p><strong><em>HTTP Class Post Method:</em></strong></p>
  
  <pre><code>post(endpoint, body, auth = null) {
  
    console.log(this.apiUrl + endpoint);
    console.log(this._headers(true));
    console.log(body);
  
    return Observable.defer(() =&gt; {
      return Observable.fromPromise(fetch(this.apiUrl + endpoint, {
        method: 'post',
        headers: this._headers(auth),
        body: JSON.stringify(body)
      })
      .then(this._checkStatus)
      .then(res =&gt; res.json()));
    });
  }
  
  _headers(auth) {
    let token = (auth) ? token = Config.clientId : this.accessToken;
    let headers = new Headers({
      'Content-Type': 'application/json',
      'Authorization': 'Bearer ' + token
    });
  
    return headers;
  }
  </code></pre>
  
  <p>After building the code to my iOS device I attempt to login and nothing happens. I added console calls to my post request to make sure the proper values are being passed and that seems to be correct. Below is the results of what I see when I attempt to login while running debug mode. I am new to React Native so I am not sure if the network tab would detect requests coming from a real device, nonetheless there is no sign of any network call being made.</p>
  
  <p><a href="https://i.stack.imgur.com/p4rkk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/p4rkk.png" alt="enter image description here"></a></p>
  
  <p>Running the same exact call from Postman works as expected and can be seen below:</p>
  
  <p><a href="https://i.stack.imgur.com/rMwuI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rMwuI.png" alt="enter image description here"></a></p>
  
  <p>Any assistance would be greatly appreciated. Thanks you in advance. </p>