title: React native with self signed certificates on M1 chip MacOS
body: <p>The below is my code for Webservices call, which works fine on both iOS and Android. But for API calls where self signed certificate is used, this does not work. I am using <strong>macOS with M1 chip</strong>.</p>
  <p>To fix this, I used the steps mentioned in <a href="https://itnext.io/react-native-security-ssl-pinning-cde086210d58" rel="nofollow noreferrer">https://itnext.io/react-native-security-ssl-pinning-cde086210d58</a>:</p>
  <pre><code>let dataToSend = {username: &quot;rider1&quot; ,password: &quot;password&quot;};
  axios.post('https://my_domain:11443/websrc/api/v1.0/auth/login', dataToSend)
  .then(function (response) {
      if (response.status === 200) {
          console.log(response.data);
      } else {
          console.log('Please check your email id or password');
      }
  })
  .catch(function (error) {
      console.log(error)
  });
  </code></pre>
  <p><strong>Output for Android :</strong></p>
  <p>Goes to the catch block of API call and returns error <code>[Error: Network Error]</code></p>
  <p><strong>Output for iOS :</strong></p>
  <p>A splash screen appears and the app crashes immediately.</p>
  <p>I am new to react-native. Any solutions are welcome.</p>