Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@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 205 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.