{"id":31446752,"url":"https://github.com/getsettalk/react-native-qr-kit","last_synced_at":"2025-10-01T01:01:58.565Z","repository":{"id":311388266,"uuid":"1043621322","full_name":"getsettalk/react-native-qr-kit","owner":"getsettalk","description":"Decode QR codes from images, decode multiple QR codes, decode from base64, and generate QR codes — all locally, with no network required.","archived":false,"fork":false,"pushed_at":"2025-09-23T11:58:00.000Z","size":518,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-23T13:34:01.245Z","etag":null,"topics":["react-native","react-native-app","react-native-qr-kit"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/react-native-qr-kit","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getsettalk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-24T09:00:23.000Z","updated_at":"2025-09-23T12:17:15.000Z","dependencies_parsed_at":"2025-08-24T13:15:47.665Z","dependency_job_id":"617053f5-bf15-4374-85b1-a4bec901a37d","html_url":"https://github.com/getsettalk/react-native-qr-kit","commit_stats":null,"previous_names":["getsettalk/react-native-qr-kit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/getsettalk/react-native-qr-kit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsettalk%2Freact-native-qr-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsettalk%2Freact-native-qr-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsettalk%2Freact-native-qr-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsettalk%2Freact-native-qr-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getsettalk","download_url":"https://codeload.github.com/getsettalk/react-native-qr-kit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getsettalk%2Freact-native-qr-kit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276597318,"owners_count":25670560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["react-native","react-native-app","react-native-qr-kit"],"created_at":"2025-10-01T01:00:40.679Z","updated_at":"2025-10-01T01:01:58.460Z","avatar_url":"https://github.com/getsettalk.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"1248\" height=\"832\" alt=\"Banner Image\" src=\"https://github.com/user-attachments/assets/b640186f-1de1-4696-a8c6-51c1ed062595\" /\u003e\n\n# react-native-qr-kit\n\n[![npm version](https://img.shields.io/npm/v/react-native-qr-kit.svg)](https://www.npmjs.com/package/react-native-qr-kit)\n[![Downloads](https://img.shields.io/npm/dm/react-native-qr-kit.svg)](https://www.npmjs.com/package/react-native-qr-kit)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\n\u003e **A fast, offline, and fully native QR code toolkit for React Native (Android and iOS).**  \n\u003e Decode QR codes from images, decode multiple QR codes, decode from base64, and generate QR codes — all locally, with no network required.\n\n---\n\n## ✨ Features\n\n- **Offline**: All QR code operations are performed locally on the device.\n- **Decode from Image**: Extract QR code data from any image file.\n- **Decode from Base64**: Decode QR code from a base64-encoded image string.\n- **Decode Multiple**: Detect and decode multiple QR codes in a single image.\n- **Generate QR Code**: Create QR codes as base64 PNG images.\n- **Native Performance**: Built with native Android and iOS code for speed and reliability.\n- **Easy Integration**: Simple API for React Native apps.\n\n\u003e **Note:**  \n\u003e While the library is fully focused on QR codes, decoding other barcode formats may not work reliably on iOS. See [#screenshot](#Screenshots) below for an example.\n\n---\n\n## 📦 Installation\n\n```sh\nnpm install react-native-qr-kit\n```\nor\n\n```sh\nyarn add react-native-qr-kit\n```\n\n### iOS Setup\nRun the following commands to install iOS dependencies:\n\n```sh\ncd ios\npod install\n```\n\n### Android Manual Linking (if needed) \nIf autolinking does not work, add the package manually in your `MainApplication.java`/`kt`:\n\n```java\nimport com.qrkit.QRKitPackage; // \u003c-- add this import\n\n@Override\nprotected List\u003cReactPackage\u003e getPackages() {\n  return Arrays.\u003cReactPackage\u003easList(\n    // ...other packages\n    new QRKitPackage() // \u003c-- add this line\n  );\n}\n```\n\n---\n\n## 📋 Usage\n\n### `decodeBase64`\n\nDecodes a QR code from a base64-encoded image string.(e.g., \"iVBORw0KGgo...\")\n\n#### Example:\n```js\nimport QRKit from 'react-native-qr-kit';\n\nconst decodeBase64 = async (base64String) =\u003e {\n  try {\n    const result = await QRKit.decodeBase64(base64String);\n    if (result.success) {\n      console.log('QR Code Data:', result.data);\n    } else {\n      console.error('Error:', result.message);\n    }\n  } catch (error) {\n    console.error('Unexpected Error:', error);\n  }\n};\n```\n\n#### Expected Response:\n```js\n{\n  success: true,\n  data: string\n}\n// or on failure\n{\n  success: false,\n  message: string\n}\n```\n\n---\n\n### `decodeQR`\n\nDecodes a QR code from a local file path.\n\n#### Example:\n```js\nimport QRKit from 'react-native-qr-kit';\n\nconst decodeQR = async (ImagePath) =\u003e {\n  try {\n    const result = await QRKit.decodeQR(ImagePath);\n    if (result.success) {\n      console.log('QR Code Data:', result.data);\n    } else {\n      console.error('Error:', result.message);\n    }\n  } catch (error) {\n    console.error('Unexpected Error:', error);\n  }\n};\n```\n\n#### For image choose:\n- you can use any library for select image, but i suggest `react-native-image-picker`\n\n\n#### Expected Response:\n```js\n{\n  success: true,\n  data: string,         // QR code content\n  error: null,\n  format: string,       // QR code format (e.g. 'QR_CODE')\n  points: string[]      // Array of detected points (e.g. [\"120.0,45.0\", ...])\n}\n// or on failure\n{\n  success: false,\n  errorType: string,\n  message: string,\n  details?: string,\n  stack?: string\n}\n```\n\n---\n\n### `decodeMultiple`\n\nDecodes multiple QR codes from a local file path.\n\n#### Example:\n```js\nimport QRKit from 'react-native-qr-kit';\n\nconst decodeMultiple = async (ImagePath) =\u003e {\n  try {\n    const result = await QRKit.decodeMultiple(ImagePath);\n    if (result.success) {\n      console.log('QR Codes:', result.results);\n    } else {\n      console.error('Error:', result.message);\n    }\n  } catch (error) {\n    console.error('Unexpected Error:', error);\n  }\n};\n```\n\n#### For image choose:\n- you can use any library for select image, but i suggest `react-native-image-picker`\n\n#### Expected Response:\n```js\n{\n  success: true,\n  results: [\n    { data: string, format: string },\n    ...\n  ]\n}\n// or on failure\n{\n  success: false,\n  message: string\n}\n```\n\n---\n\n### `generateQRCode`\n\nGenerates a QR code as a base64 PNG image.\n\n#### Example:\n```js\nimport QRKit from 'react-native-qr-kit';\n\nconst generateQRCode = async (data, size) =\u003e {\n  try {\n    const result = await QRKit.generateQRCode(data, size);\n    if (result.success) {\n      console.log('Generated QR Code (Base64):', result.base64);\n    } else {\n      console.error('Error:', result.message);\n    }\n  } catch (error) {\n    console.error('Unexpected Error:', error);\n  }\n};\n```\n\n#### Expected Response:\n```js\n{\n  success: true,\n  base64: string // PNG image as base64\n}\n// or on failure\n{\n  success: false,\n  message: string\n}\n```\n\n---\n\n## 📋 API Reference\n\n### `decodeQR(path: string): Promise\u003cDecodeResult\u003e`\nDecode a QR code from a local image file path.\n\n**Returns:**\n```js\n{\n  success: true,\n  data: string,         // QR code content\n  error: null,\n  format: string,       // QR code format (e.g. 'QR_CODE')\n  points: string[]      // Array of detected points (e.g. [\"120.0,45.0\", ...])\n}\n// or on failure\n{\n  success: false,\n  errorType: string,\n  message: string,\n  details?: string,\n  stack?: string\n}\n```\n\n### `decodeBase64(base64Str: string): Promise\u003cDecodeResult\u003e`\nDecode a QR code from a base64-encoded image string.\n\n**Returns:**\n```js\n{\n  success: true,\n  data: string\n}\n// or on failure\n{\n  success: false,\n  message: string\n}\n```\n\n### `decodeMultiple(path: string): Promise\u003cMultiDecodeResult\u003e`\nDecode multiple QR codes from a local image file path.\n\n**Returns:**\n```js\n{\n  success: true,\n  results: [\n    { data: string, format: string },\n    ...\n  ]\n}\n// or on failure\n{\n  success: false,\n  message: string\n}\n```\n\n### `generateQRCode(data: string, size: number): Promise\u003cGenerateResult\u003e`\nGenerate a QR code as a base64 PNG image.\n\n**Returns:**\n```js\n{\n  success: true,\n  base64: string // PNG image as base64\n}\n// or on failure\n{\n  success: false,\n  message: string\n}\n```\n\n---\n\n## Screenshots\n\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg width=\"200\"  alt=\"image\" src=\"https://github.com/user-attachments/assets/7f04bdf2-ef6b-4a9d-9397-3fdafedb835e\" /\u003e\n\u003cimg width=\"200\"  alt=\"image1\" src=\"https://github.com/user-attachments/assets/6d980ef4-5c59-418f-99f4-b6b6b415c443\" /\u003e\n\u003cvideo src=\"https://github.com/user-attachments/assets/f9a0c97a-0100-453c-91e4-1ddf9a33daf6\" width=\"200\" controls\u003e\u003c/video\u003e\n\u003cvideo src=\"https://github.com/user-attachments/assets/658e42f4-8246-4ffa-9255-7f3436a5c177\" width=\"200\" controls\u003e\u003c/video\u003e\n\u003c/p\u003e\n\n\n\n\n\n\n---\n\n## ℹ️ Notes\n- All QR code decoding and generation is performed **offline** and locally on the device.\n- The library is fully focused on QR codes. Decoding other barcode formats may not work reliably on iOS.\n- Works with any local image file path accessible to your app.\n\n---\n\n\n\n## 📄 License\n\nMIT © [getsettalk](https://github.com/getsettalk)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsettalk%2Freact-native-qr-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetsettalk%2Freact-native-qr-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetsettalk%2Freact-native-qr-kit/lists"}