title: (React Native - Using AWS Amplify) - Invariant Violation: Native module cannot be null
body: <p><strong>Description of the issue:</strong></p>
  
  <p>I'm implementing push notification in my React-Native app using this <a href="https://docs.amplify.aws/lib/push-notifications/getting-started/q/platform/js" rel="noreferrer">AWS Amplify doc</a> and testing with the iOS part fails with the error "<strong>Invariant Violation: Native module cannot be null</strong>", however if I test (<strong>i.e</strong> fetching device token and sending push notification) the Android part it works. Screenshot of the error I see on the iOS is seen below :</p>
  
  <p><a href="https://i.stack.imgur.com/DpAEB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DpAEB.png" alt="enter image description here"></a></p>
  
  <p>What I have tried so far :</p>
  
  <ol>
  <li>Upgrading react-native version from 0.59.10 to 0.61.5</li>
  <li><p>As per this <a href="https://github.com/aws-amplify/amplify-js/issues/4089" rel="noreferrer">github post</a>, I also tried installing the following:</p>
  
  <p>@react-native-community/push-notification-ios</p>
  
  <p>npm install aws-amplify@unstable</p></li>
  </ol>
  
  <p>This module (<strong>aws-amplify@unstable</strong>) introduced an error  saying <strong><em>TypeError: undefined is not an object (evaluating '_core.Amplify.register')</em></strong> so I decided to get rid of it.</p>
  
  <ol start="3">
  <li>Using latest package of <strong>"@aws-amplify/pushnotification": "^3.0.13"</strong> works for Android but in iOS I'm back to the original error  : "<strong>Invariant Violation: Native module cannot be null</strong>"</li>
  </ol>
  
  <p>currently I've left my package.json as follows :</p>
  
  <pre><code>"dependencies": {
  "@aws-amplify/pushnotification": "^1.1.4",
  "@aws-amplify/analytics": "^1.3.3",
  "@react-native-community/netinfo": "^5.7.0",
  "@react-native-community/push-notification-ios": "^1.2.0",
  "amazon-cognito-identity-js": "^4.2.1",
  "aws-amplify": "^1.2.4",
  "aws-amplify-react-native": "^4.2.0",
  "axios": "^0.19.2",
  "cache": "^2.3.1",
  "react": "16.9.0",
  "react-native": "^0.62.2"
  }
  </code></pre>
  
  <p>Let me get some sleep, I'll continue debugging tomorrow morning ..</p>