
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@diningcity/capacitor-qr-scanner
Advanced tools
This repository is a capacitor plug in for scanning QR Codes on Android and iOS.
To install from the command line:
npm i @diningcity/capacitor-qr-scanner;
npx cap sync;
or
npm i @diningcity/capacitor-qr-scanner;
ionic capacitor copy;
(https://ionicframework.com/docs/cli/commands/capacitor-copy)
NOTE: After install the plug-in, you should add some settings and code snippets into your navite project.
<key>NSCameraUsageDescription</key>
<string>{Your camera usage description}</string>
ex: App would like to use camera to scan QRCode.
or
You can add this directly without coding with Xcode as following
To import the following into your code
import { QrScanner } from '@diningcity/capacitor-qr-scanner';
import React from "react";
const Test = () => {
async function scanQR() {
const {camera} = await QrScanner.requestPermissions();
if (camera == "granted") {
const {result} = await QrScanner.scanQrCode();
alert(result);
} else {
alert("You should allow camera permission.");
}
}
return (
<React.Fragment>
<div onClick={() => scanQR()}>
</div>
</React.Fragment>
);
};
To import the following into your code
import { QrScanner } from '@diningcity/capacitor-qr-scanner';
import React from "react";
const Test = () => {
const scanQrCode = async () => {
const {result} = await QrScanner.scanQrCode();
alert(result);
}
return (
<React.Fragment>
<div onClick={scanQrCode}>
</div>
</React.Fragment>
);
};
After remove old android directory from the root director of the project, then run the following commands
npx cap add android
npx cap open android
After open the android project with Android Studio, then you should add the following dependency repository under the allprojects > repositories in the build.gradle of the project.
maven { url 'https://jitpack.io' }
FAQs
A Capacitor plug in to scan QR Codes
The npm package @diningcity/capacitor-qr-scanner receives a total of 69 weekly downloads. As such, @diningcity/capacitor-qr-scanner popularity was classified as not popular.
We found that @diningcity/capacitor-qr-scanner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.