{"_id":"@dankelleher/react-native-nfc-passport-reader","_rev":"3-f7b06360d838eef19d75f63c4cf42566","name":"@dankelleher/react-native-nfc-passport-reader","dist-tags":{"latest":"0.4.1"},"versions":{"0.3.0":{"name":"@dankelleher/react-native-nfc-passport-reader","version":"0.3.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/batuhanoztrk","name":"Batuhan Öztürk","email":"batuhanoztrk@hotmail.com"},"license":"MIT","_id":"@dankelleher/react-native-nfc-passport-reader@0.3.0","maintainers":[{"name":"dankelleher","email":"dankelleher@yahoo.com"}],"homepage":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader#readme","bugs":{"url":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader/issues"},"dist":{"shasum":"7bfa158d2638255839efcf6fb0117628eea5e8d1","tarball":"https://registry.npmjs.org/@dankelleher/react-native-nfc-passport-reader/-/react-native-nfc-passport-reader-0.3.0.tgz","fileCount":66,"integrity":"sha512-8jrjknlcodICYDmuKQymH3qbyW5YGIz9epQlWFPM7gEnqVn8Wgf1ikre+b8OUTE87N5BLeSivSI4mIwzgd6seA==","signatures":[{"sig":"MEUCIQCa9jiYE+hKcbxVlkSbS3C9P9yQ7JEP3q0Tm33PCklydAIgSsyKejlUi1OJfkV/dE0AL35larPT/BdayI86d0/eTY4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":341052},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/src/index.d.ts","module":"lib/module/index","source":"src/index","gitHead":"5594eb30141b6a1aee12a240bef0c5deae00b5fa","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","example":"yarn workspace react-native-nfc-passport-reader-example","prepare":"bob build","release":"release-it","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dankelleher","email":"dankelleher@yahoo.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"access":"public","publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/batuhanoztrk/react-native-nfc-passport-reader.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.2","description":"Reads passports and ID cards using its the device NFC.","directories":{},"resolutions":{"@types/react":"^18.2.44"},"_nodeVersion":"23.9.0","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^29.7.0","react":"18.2.0","turbo":"^1.10.7","eslint":"^8.51.0","del-cli":"^5.1.0","prettier":"^3.0.3","commitlint":"^17.0.2","release-it":"^15.0.0","typescript":"^5.2.2","@types/jest":"^29.5.5","@types/react":"^18.2.44","react-native":"0.73.6","@evilmartians/lefthook":"^1.5.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","react-native-builder-bob":"^0.23.2","@react-native/eslint-config":"^0.73.1","@commitlint/config-conventional":"^17.0.2","@release-it/conventional-changelog":"^5.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-nfc-passport-reader_0.3.0_1741711634537_0.4907379766704745","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"0.4.0":{"name":"@dankelleher/react-native-nfc-passport-reader","version":"0.4.0","keywords":["react-native","ios","android"],"author":{"url":"https://github.com/batuhanoztrk","name":"Batuhan Öztürk","email":"batuhanoztrk@hotmail.com"},"license":"MIT","_id":"@dankelleher/react-native-nfc-passport-reader@0.4.0","maintainers":[{"name":"dankelleher","email":"dankelleher@yahoo.com"}],"homepage":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader#readme","bugs":{"url":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader/issues"},"dist":{"shasum":"45c6d4792c69c137039baa441eba01fbc0e8fcc1","tarball":"https://registry.npmjs.org/@dankelleher/react-native-nfc-passport-reader/-/react-native-nfc-passport-reader-0.4.0.tgz","fileCount":66,"integrity":"sha512-z5U3k1Se2slQdSnUAdkmifnHDVWOCJYFpsvc5+EY0etCrDm4Lpzubtp0l6Z3rXxxDgz7cced3Y0kg4cGKRNaRA==","signatures":[{"sig":"MEQCID5EQHk5ezgw9pU2RDl4gDxqSn6aNUTp+baXPdll6o/7AiBd5ctOSmWFodeNUhbJ4v5Lg/RCEVU7OiaMSrW0wguUHw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":341053},"jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"main":"lib/commonjs/index","types":"lib/typescript/src/index.d.ts","module":"lib/module/index","source":"src/index","gitHead":"1e783dde74c7b7452f546c24e8da9670258fd6a9","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","example":"yarn workspace react-native-nfc-passport-reader-example","prepare":"bob build","release":"release-it","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dankelleher","email":"dankelleher@yahoo.com"},"prettier":{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"tagName":"v${version}","commitMessage":"chore: release ${version}"},"npm":{"access":"public","publish":true},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"repository":{"url":"git+https://github.com/batuhanoztrk/react-native-nfc-passport-reader.git","type":"git"},"workspaces":["example"],"_npmVersion":"10.9.2","description":"Reads passports and ID cards using its the device NFC.","directories":{},"resolutions":{"@types/react":"^18.2.44"},"_nodeVersion":"23.9.0","eslintConfig":{"root":true,"rules":{"prettier/prettier":["error",{"useTabs":false,"tabWidth":2,"quoteProps":"consistent","singleQuote":true,"trailingComma":"es5"}]},"extends":["@react-native","prettier"]},"eslintIgnore":["node_modules/","lib/"],"react-native":"src/index","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"yarn@3.6.1","devDependencies":{"jest":"^29.7.0","react":"18.2.0","turbo":"^1.10.7","eslint":"^8.51.0","del-cli":"^5.1.0","prettier":"^3.0.3","commitlint":"^17.0.2","release-it":"^15.0.0","typescript":"^5.2.2","@types/jest":"^29.5.5","@types/react":"^18.2.44","react-native":"0.73.6","@evilmartians/lefthook":"^1.5.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","react-native-builder-bob":"^0.23.2","@react-native/eslint-config":"^0.73.1","@commitlint/config-conventional":"^17.0.2","@release-it/conventional-changelog":"^5.0.0"},"peerDependencies":{"react":"*","react-native":"*"},"_npmOperationalInternal":{"tmp":"tmp/react-native-nfc-passport-reader_0.4.0_1741793210646_0.022481640934717495","host":"s3://npm-registry-packages-npm-production"},"react-native-builder-bob":{"output":"lib","source":"src","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]}},"0.4.1":{"name":"@dankelleher/react-native-nfc-passport-reader","version":"0.4.1","description":"Reads passports and ID cards using its the device NFC.","main":"lib/commonjs/index","module":"lib/module/index","types":"lib/typescript/src/index.d.ts","react-native":"src/index","source":"src/index","scripts":{"example":"yarn workspace react-native-nfc-passport-reader-example","test":"jest","typecheck":"tsc --noEmit","lint":"eslint \"**/*.{js,ts,tsx}\"","clean":"del-cli android/build example/android/build example/android/app/build example/ios/build lib","prepare":"bob build","release":"release-it"},"keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/batuhanoztrk/react-native-nfc-passport-reader.git"},"author":{"name":"Batuhan Öztürk","email":"batuhanoztrk@hotmail.com","url":"https://github.com/batuhanoztrk"},"license":"MIT","bugs":{"url":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader/issues"},"homepage":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader#readme","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"devDependencies":{"@commitlint/config-conventional":"^17.0.2","@evilmartians/lefthook":"^1.5.0","@react-native/eslint-config":"^0.73.1","@release-it/conventional-changelog":"^5.0.0","@types/jest":"^29.5.5","@types/react":"^18.2.44","commitlint":"^17.0.2","del-cli":"^5.1.0","eslint":"^8.51.0","eslint-config-prettier":"^9.0.0","eslint-plugin-prettier":"^5.0.1","jest":"^29.7.0","prettier":"^3.0.3","react":"18.2.0","react-native":"0.73.6","react-native-builder-bob":"^0.23.2","release-it":"^15.0.0","turbo":"^1.10.7","typescript":"^5.2.2"},"resolutions":{"@types/react":"^18.2.44"},"peerDependencies":{"react":"*","react-native":"*"},"workspaces":["example"],"packageManager":"yarn@3.6.1","jest":{"preset":"react-native","modulePathIgnorePatterns":["<rootDir>/example/node_modules","<rootDir>/lib/"]},"commitlint":{"extends":["@commitlint/config-conventional"]},"release-it":{"git":{"commitMessage":"chore: release ${version}","tagName":"v${version}"},"npm":{"publish":true,"access":"public"},"github":{"release":true},"plugins":{"@release-it/conventional-changelog":{"preset":"angular"}}},"eslintConfig":{"root":true,"extends":["@react-native","prettier"],"rules":{"prettier/prettier":["error",{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false}]}},"eslintIgnore":["node_modules/","lib/"],"prettier":{"quoteProps":"consistent","singleQuote":true,"tabWidth":2,"trailingComma":"es5","useTabs":false},"react-native-builder-bob":{"source":"src","output":"lib","targets":["commonjs","module",["typescript",{"project":"tsconfig.build.json"}]]},"_id":"@dankelleher/react-native-nfc-passport-reader@0.4.1","gitHead":"02bcc39812059d148c3ec710b680b68973589e31","_nodeVersion":"23.9.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-d7r2633dfYgy3Me9aNtJ9pJNZ1Arr0DmG3aNK8ztUuX2LnTqNqg5l6rFILxxv+prUvZePkIV0apNiLjwNKEf7A==","shasum":"0288864872ca0367e490f022ba1494e4d0831342","tarball":"https://registry.npmjs.org/@dankelleher/react-native-nfc-passport-reader/-/react-native-nfc-passport-reader-0.4.1.tgz","fileCount":66,"unpackedSize":345778,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCm/oL18LndF0i86P4rU84sWFy+hqSHCRktZOaWM7r1DAIgR1MgZ9JLs9FPh6MZ+JUcKuEpR59GgqCC2XV9cNIfLIY="}]},"_npmUser":{"name":"dankelleher","email":"dankelleher@yahoo.com"},"directories":{},"maintainers":[{"name":"dankelleher","email":"dankelleher@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-nfc-passport-reader_0.4.1_1741809945229_0.3424568507602255"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-11T16:47:14.451Z","modified":"2025-03-12T20:05:45.566Z","0.3.0":"2025-03-11T16:47:14.707Z","0.4.0":"2025-03-12T15:26:50.881Z","0.4.1":"2025-03-12T20:05:45.417Z"},"bugs":{"url":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader/issues"},"author":{"name":"Batuhan Öztürk","email":"batuhanoztrk@hotmail.com","url":"https://github.com/batuhanoztrk"},"license":"MIT","homepage":"https://github.com/batuhanoztrk/react-native-nfc-passport-reader#readme","keywords":["react-native","ios","android"],"repository":{"type":"git","url":"git+https://github.com/batuhanoztrk/react-native-nfc-passport-reader.git"},"description":"Reads passports and ID cards using its the device NFC.","maintainers":[{"name":"dankelleher","email":"dankelleher@yahoo.com"}],"readme":"# NFC Passport Reader for React Native\n\nThis React Native plugin enables the reading of NFC-enabled passports using native device capabilities. It provides a user-friendly interface for initiating and handling NFC operations, including reading passport data, checking NFC support, and managing NFC settings.\n\n## Features\n\n- Start and stop NFC passport reading\n- Basic Access Control (BAC) support for secure passport reading\n- Check if NFC is supported and enabled on the device\n- Open device NFC settings\n- Support for both iOS and Android platforms\n- Optional image extraction from passport\n\n## Installation\n\nTo use the NFC Passport Reader in your React Native project, follow these steps:\n\n1. **Install the Plugin**:\n   ```sh\n   npm install react-native-nfc-passport-reader\n   ```\n2. **Link Native Modules (if required for versions below React Native 0.60)**:\n   ```sh\n   npx react-native link react-native-nfc-passport-reader\n   ```\n3. **iOS Additional Setup**:\n   - Modify your Info.plist to include necessary NFC usage descriptions.\n     ```xml\n     <key>NFCReaderUsageDescription</key>\n     <string>This app requires NFC access to verify your identity.</string>\n     <key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>\n     <array>\n        <string>A0000002471001</string>\n        <string>00000000000000</string>\n        <string>D4100000030001</string>\n     </array>\n     ```\n   - Ensure your entitlements include NFC tag reading capability.\n   - Add the following pod to your Podfile:\n     ```ruby\n     pod 'OpenSSL-Universal', '~> 1.1.1900'\n     ```\n   - Disable Flipper in your Podfile (required for proper functionality)\n\n4. **Android Additional Setup**:\n   - Add NFC permissions in your AndroidManifest.xml.\n     ```xml\n     <uses-feature android:name=\"android.hardware.nfc\" android:required=\"false\" />\n     <uses-permission android:name=\"android.permission.NFC\" />\n     ```\n   - Ensure your device has NFC capabilities and that NFC is enabled.\n\n## Usage\n\nImport and use the NFC Passport Reader as follows:\n\n```ts\nimport NfcPassportReader from 'react-native-nfc-passport-reader';\nimport type { NfcResult } from 'react-native-nfc-passport-reader';\n```\n\n### Basic Methods\n\n- **startReading**: Initiates the NFC passport reading process.\n  ```ts\n  const result: NfcResult = await NfcPassportReader.startReading({\n    bacKey: {\n      documentNo: '123456789', // Document Number\n      expiryDate: '2025-03-09', // YYYY-MM-DD\n      birthDate: '2025-03-09', // YYYY-MM-DD\n    },\n    includeImages: true, // Include images in the result (default: false)\n  });\n  ```\n- **stopReading**: Stops the NFC passport reading process. ***(Only Android)***\n  ```ts\n  NfcPassportReader.stopReading();\n  ```\n\n### Event Listeners (Only Android)\n\n- **addOnTagDiscoveredListener**: Triggers when an NFC tag is discovered.\n  ```ts\n  NfcPassportReader.addOnTagDiscoveredListener(() => {\n    console.log('Tag Discovered');\n  });\n  ```\n- **addOnNfcStateChangedListener**: Monitors changes in NFC state.\n  ```ts\n  NfcPassportReader.addOnNfcStateChangedListener((state: 'on' | 'off') => {\n    console.log('NFC State Changed:', state);\n  });\n  ```\n\n### Check Device Support\n\n- **isNfcSupported**: Checks if NFC is supported by the device.\n  ```ts\n  const supported = await NfcPassportReader.isNfcSupported();\n  ```\n- **isNfcEnabled**: Checks if NFC is enabled on the device.\n  ```ts\n  const enabled = await NfcPassportReader.isNfcEnabled();\n  ```\n\n### Settings\n\n- **openNfcSettings**: Opens the device's NFC settings. ***(Only Android)***\n  ```ts\n  NfcPassportReader.openNfcSettings();\n  ```\n\n## Example\n\nFor a detailed example of how to use the NFC Passport Reader, please see the [Example App](example/src/App.tsx).\n\n## Acknowledgments\n\nSpecial thanks to [Andy Qua](https://github.com/AndyQ) for his excellent [NFCPassportReader](https://github.com/AndyQ/NFCPassportReader) library that powers the iOS implementation of this package. His work on implementing BAC, Secure Messaging, and various passport data group readings has been instrumental in making this React Native wrapper possible.\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n---\n\nMade with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)\n","readmeFilename":"README.md"}