Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
react-native-uking-qrcode
Advanced tools
Native QRCode and barcode and QRScanner component for React Native SDK
##Introduction
原生二维码(QRCode)和条码(BarCode)生成组件及二维码扫描(QRScaner)组件,,集成到 iOS 和 Android 。
二维码和条码生成组件和二维码扫描组(开发中)是基于
SGQRCode(IOS) GIT: https://github.com/kingsic/SGQRCode.git
BGAQRCode-Android(android) GIT: https://github.com/bingoogolapple/BGAQRCode-Android.git
##注:
IOS 版已将ZXingObjc 更新到最新
如果有不对的地方请提交到issues以便解决。
##Installation
###npm or yarn
npm install react-native-uking-qrcode or yarn add react-native-uking-qrcode
##BarCode
##QRCode
###IOS:
在你的项目ios目录下面新建一个Profile文件:
platform :ios, '8.0'
target '你的项目名称' do
pod 'yoga', path: '../node_modules/react-native/ReactCommon/yoga/'
pod 'React', path: '../node_modules/react-native/'
pod 'RCTQRCode', path: '../node_modules/react-native-uking-qrcode/ios/'
end
然后在ios目录下 执行 pod install 然后把ios/Pods录下 Pods.xcodeproj添加到 Libraries下
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
<key>NSContactsUsageDescription</key>
<string>contactsDesciption</string>
<key>NSMicrophoneUsageDescription</key>
<string>microphoneDesciption</string>
make the following additions to the given files manually:
android/settings.gradle
include ':react-native-uking-qrcode'
project(':react-native-uking-qrcode').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-uking-qrcode/android')
android/app/build.gradle
dependencies {
...
compile project(':react-native-uking-qrcode')
}
MainApplication.java
On top, where imports are:
import net.muding.uking.qrcode.RCTQRCodePackage;
Add the RCTQRCodePackage
class to your list of exported packages.
@Override
protected List<ReactPackage> getPackages() {
return Arrays.asList(
new MainReactPackage(),
new RCTQRCodePackage()
);
}
##Usage
###1. 二维码 QRCode
import {QRCode} from 'react-native-uking-qrcode';
<QRCode
style={{width:150,height:150}}
forecolor="#FF6621"
backcolor="#256DDD"
text={'by uking'}
logo='path' //logo local path 本地路径
size={150}
/>
###2. 条码 BarCode
import {BarCode} from 'react-native-uking-qrcode';
<BarCode
style={{width:300,height:100}}
text='6923450657713'
format='EAN_13'
width={300}
height={100}
/>
条码类型 format :
CODABAR
CODE_39
CODE_93
CODE_128
DATA_MATRIX
EAN_8
EAN_13
ITF
MAXICODE
PDF_417
QR_CODE
RSS_14
RSS_EXPANDED
UPC_A
UPC_E
UPC_EAN_EXTENSION
###3. 二维码扫描 QRScanner 开发中
FAQs
Native QRCode and barcode and QRScanner component for React Native SDK
We found that react-native-uking-qrcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.