okadan / flutter-nfc-manager

A Flutter plugin for accessing the NFC features on Android and iOS.
https://pub.dev/packages/nfc_manager
MIT License
198 stars 130 forks source link

additionalData property of Ndef-Object is empty on iOS #147

Closed philitell closed 1 year ago

philitell commented 1 year ago

Reading a properly configured nfc-tag (with a NDEF-message) returns different results on android and iOS (testing for iOS 15.2 on an iPhone 8). I am using ntag213-Tags with a valid NDEF-message. When i create an Ndef-Object with this package the resulting object is incomplete on iOS (the object itself is not null). Ndef? ndefTag = Ndef.from(tag);

The additionalData-map only contains values on android.

ndefTag.additionalData["type"] 
ndefTag.additionalData["identifier"]

On iOS this map is empty.

If this is the intended behaviour, how do i get the identifier from a Ndef-Tag?

okadan commented 1 year ago

@philitell That's the intended behavior.

To get the identifier on iOS, you will need to use other classes such as MiFare/FeliCa/Iso15693/Iso7618.