semlette / nfc_in_flutter

Cross-platform flutter plugin for reading and writing NFC tags. Not maintained anymore - not looking for new maintainer, fork instead.
MIT License
120 stars 119 forks source link

Can't read UUID #49

Closed ryanhz closed 4 years ago

ryanhz commented 4 years ago

Below is my code:

void scan() async {
    // Start reading using NFC.readNDEF()
    _stream = NFC.readNDEF(
        once: false,
        throwOnUserCancel: false,
    ).listen((NDEFMessage message) async {
        print("read NDEF message: ${message.payload}");
        uuid = message.id;
        content = message.data;
        content = content ??  "";
        setState(() {});
    }, onError: (e) {
        // Check error handling guide below
        handleError(e);
    });

running on ios, I can't get the UUID of tag

the-white-cat commented 4 years ago

It seems there's no way to read the UUID because the framework uses NFCNDEFReaderSession instead of NFCTagReaderSession. And iOS doesn't read the UUIDs in ndef session Stuck with the same problem :(

semlette commented 4 years ago

Daring souls can clone the tags branch, which has support for reading tag identifiers on iOS.

Absolutely no guarantee on its stability.