🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@capgo/capacitor-nfc

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capgo/capacitor-nfc - npm Package Compare versions

Comparing version
8.1.5
to
8.1.6
+3
-1
android/src/main/java/app/capgo/nfc/CapacitorNfcPlugin.java

@@ -304,3 +304,5 @@ package app.capgo.nfc;

}
ndef.close();
if (ndef.isConnected()) {
ndef.close();
}
} else if (allowFormat) {

@@ -307,0 +309,0 @@ NdefFormatable formatable = NdefFormatable.get(tag);

@@ -7,3 +7,3 @@ import Capacitor

public class NfcPlugin: CAPPlugin, CAPBridgedPlugin {
private let pluginVersion: String = "8.1.5"
private let pluginVersion: String = "8.1.6"

@@ -531,2 +531,8 @@ public let identifier = "NfcPlugin"

if let readError {
if !self.invalidateAfterFirstRead && status == .readWrite {
self.currentTag = tag
let event = self.buildEvent(tag: tag, status: status, capacity: capacity, message: nil)
self.notify(event: event)
return
}
session.invalidate(errorMessage: "Failed to read NDEF message: \(readError.localizedDescription)")

@@ -711,3 +717,3 @@ return

// Tag supports NDEF, try to read it
tag.readNDEF { [weak self] message, _ in
tag.readNDEF { [weak self] message, readError in
guard let self else {

@@ -723,4 +729,6 @@ return

self.emitTagEvent(tag: tag, status: status, capacity: capacity, message: nil, session: session)
} else if readError != nil && self.invalidateAfterFirstRead {
session.invalidate(errorMessage: "Failed to read NDEF message: \(readError!.localizedDescription)")
} else {
// Successfully read NDEF
// Successfully read NDEF (or keep session open for writes after a read error)
self.currentTag = tag

@@ -727,0 +735,0 @@ let event = self.buildEvent(tag: tag, status: status, capacity: capacity, message: message)

{
"name": "@capgo/capacitor-nfc",
"version": "8.1.5",
"version": "8.1.6",
"description": "Native NFC tag discovery, reading and writing for Capacitor apps on iOS and Android.",

@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js",