Socket
Socket
Sign inDemoInstall

react-native-passport-id-nfc-reader

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-passport-id-nfc-reader

test


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-passport-id-nfc-reader

React native allows you to scan using nfc for ID and passport only on ios platform.

Installation

npm install react-native-passport-id-nfc-reader

Usage


 import * as React from 'react';

import {
  NFCPassportModel,
  scanPassport,
} from 'react-native-passport-id-nfc-reader';
import { Alert, Button, StyleSheet, View } from 'react-native';

export default function App() {
  const [_, setResult] = React.useState<NFCPassportModel>();

  const scanDocument = () => {
    scanPassport({
      birthDate: '1993-04-10T00:00:00Z',
      expiryDate: '2030-08-19T00:00:00Z',
      passportNumber: 'A28L66104',
      useNewVerificationMethod: true,
    }).then((res) => {
      if ('error' in res) {
        Alert.alert('NFC failed!', res.error);
        return;
      }
      setResult(res);
    });
  };

  return (
    <View style={styles.container}>
      <Button onPress={scanDocument} title="Start scanning" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: 'white',
  },
});



// ...


Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Keywords

FAQs

Last updated on 08 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc