franckbour / Plugin.NFC

A Cross-Platform NFC (Near Field Communication) plugin to easily read and write NFC tags in your application.
MIT License
227 stars 67 forks source link

OnMessageReceived, OnTagDiscovered event handlers are not working - Xamarin Forms - iOS #108

Open NageshD-Obeliskstech opened 2 years ago

NageshD-Obeliskstech commented 2 years ago

Description

The events are subscribed to before StartListening(). But those are not getting called after the NFC tag read operation.

Expected Behavior

Usually, when the NFC tag reads successfully OnMessageReceived should get called and should publish the message.

Actual Behavior

Subscribed events (OnMessageReceived, OnMessagePublished, OnTagDiscovered) are not getting called.

Basic Information

saamerm commented 2 years ago

@NageshD-Obeliskstech Are you sure CrossNFC.IsSupported, CrossNFC.Current.IsAvailable, CrossNFC.Current.IsEnabled values are all true for you? You likely haven't included entitlements in your build

NageshD-Obeliskstech commented 2 years ago

@saamerm Yes, the values of those all are true. And have added 'com.apple.developer.nfc.readersession.formats' for NDEF and TAG.

saamerm commented 2 years ago

@NageshD-Obeliskstech are you testing the sample or just your own solution? Was it working before and it just stopped?

iaps commented 2 years ago

@NageshD-Obeliskstech did you ever get this working? I am having a similar issue.

cbirsen commented 2 years ago

I am having the same issue, would you please let me know if you ever solve it?

saamerm commented 1 year ago

@iaps and @cbirsen are you all trying the solution example in this repository and having this issue?

jpsaccount commented 1 year ago

Unfortunately, having the same issue.. however it triggers the iOS cancelled event.

saamerm commented 1 year ago

@jpsaccount are you trying this on the sample? And you’re not having any success?