更新记录
1.0.0(2026-08-04)
1.0.0
- 由旧版 HBuilder 原生插件 NFCPlugin 迁移为 UTS 插件
- iOS CoreNFC / Android NfcV 双端读写
- API:testAsyncFunc / writeFunc / testSyncFunc / isNFCAvailable
平台兼容性
其他
| 多语言 | 暗黑模式 | 宽屏模式 |
|---|---|---|
| √ | √ | √ |
nfc-manager
UTS 插件:App 端 ISO15693(NFC-V)标签读写。iOS CoreNFC,Android NfcV ReaderMode。
安装
市场导入,或将插件目录复制到工程:
你的项目/uni_modules/nfc-manager
需制作自定义基座 / 云打包(含 NFC 能力)。
调用
import {
testAsyncFunc,
writeFunc,
testSyncFunc,
isNFCAvailable
} from '@/uni_modules/nfc-manager'
if (!isNFCAvailable()) {
// 不支持或未开启
}
testAsyncFunc({}, (res) => {
console.log(res)
})
writeFunc({ /* grade / model / tagId 等按业务 */ }, (res) => {
console.log(res)
})
API
| API | 说明 |
|---|---|
testAsyncFunc(options, callback) |
读卡 |
writeFunc(options, callback) |
写卡 |
testSyncFunc(options?) |
同步探测 |
isNFCAvailable() |
是否可用 |
注意
- 需真机 + NFC;模拟器无法验证。
- iOS:Near Field Communication Tag Reading +
NFCReaderUsageDescription。 - Android:
android.permission.NFC,并打开系统 NFC。 - 插件 ID 为
nfc-manager(市场类型选 UTS)。

收藏人数:
购买普通授权版(
试用
赞赏(0)
下载 0
赞赏 0
下载 12480951
赞赏 1937
赞赏
京公网安备:11010802035340号