diff --git a/README.md b/README.md index 42ff194..7399ec1 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ In your `Info.plist`: ```javascript import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { AlertIOS } from 'react-native'; +import { Alert } from 'react-native'; import FingerprintScanner from 'react-native-fingerprint-scanner'; class FingerprintPopup extends Component { @@ -166,11 +166,11 @@ class FingerprintPopup extends Component { .authenticate({ description: 'Scan your fingerprint on the device scanner to continue' }) .then(() => { this.props.handlePopupDismissed(); - AlertIOS.alert('Authenticated successfully'); + Alert.alert('Authenticated successfully'); }) .catch((error) => { this.props.handlePopupDismissed(); - AlertIOS.alert(error.message); + Alert.alert(error.message); }); } @@ -352,11 +352,11 @@ componentDidMount() { .authenticate({ description: 'Scan your fingerprint on the device scanner to continue' }) .then(() => { this.props.handlePopupDismissed(); - AlertIOS.alert('Authenticated successfully'); + Alert.alert('Authenticated successfully'); }) .catch((error) => { this.props.handlePopupDismissed(); - AlertIOS.alert(error.message); + Alert.alert(error.message); }); } ``` diff --git a/examples/src/FingerprintPopup.component.ios.js b/examples/src/FingerprintPopup.component.ios.js index a0c5bc3..0b1c269 100644 --- a/examples/src/FingerprintPopup.component.ios.js +++ b/examples/src/FingerprintPopup.component.ios.js @@ -1,6 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; -import { AlertIOS } from 'react-native'; +import { Alert } from 'react-native'; import FingerprintScanner from 'react-native-fingerprint-scanner'; class FingerprintPopup extends Component { @@ -10,11 +10,11 @@ class FingerprintPopup extends Component { .authenticate({ description: 'Scan your fingerprint on the device scanner to continue' }) .then(() => { this.props.handlePopupDismissed(); - AlertIOS.alert('Authenticated successfully'); + Alert.alert('Authenticated successfully'); }) .catch((error) => { this.props.handlePopupDismissed(); - AlertIOS.alert(error.message); + Alert.alert(error.message); }); } diff --git a/index.d.ts b/index.d.ts index 6de5573..287d37b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -129,11 +129,11 @@ export interface FingerPrintProps { .authenticate({ description: 'Scan your fingerprint on the device scanner to continue' }) .then(() => { this.props.handlePopupDismissed(); - AlertIOS.alert('Authenticated successfully'); + Alert.alert('Authenticated successfully'); }) .catch((error) => { this.props.handlePopupDismissed(); - AlertIOS.alert(error.message); + Alert.alert(error.message); }); ``` -----------------