Closed Valandur closed 3 years ago
Same problem here, also targetting iOS 9.0
In my case it was my mistake because the tag I was using was empty
Considering it works on Android I don't think an empty tag is the issue, at least for me.
Hi @Valandur , I think @gbettinazzi is right. Tags contain no valid NDEF records will not be discovered by registerTagEvent
, since we use NFCNDEFReaderSession
under the hood for this case.
Can you try it again with tags contain valid NDEF message?
Hi, sorry for the confusion but I am actually using a tag with data. I was just thinking that the fact that it has data shouldn't matter for the firing of the event, but it possibly does?
The tags I'm reading do contain a valid NDEF message, and I also receive that data on Android. On iOS I only receive the data when adding the fix I posted above.
I believe to have found the cause for this issue. I had to set platform :ios, '11.0'
in my Podfile
, not just in the main project. Now it seems to work, even without the additional line changes I mentioned.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 5 days with no activity.
Following the example to read ndef tags I have added the following code
during my component initialization.
This works perfectly on Android devices, but produces a warning in the logs on iOS:
[CoreNFC] 00000002 80129180 -[NFCNDEFReaderSession _callbackDidBecomeActive]:228 Delegate does not implement -readerSessionDidBecomeActive: method
The scanning system overlay for iOS shows up, but it never scans any tags.
If I copy and paste the lines 260-262 of
ios/NfcManager.m
and rename the method toreaderSessionDidBecomeActive
then the warning in the logs goes away, and the scanning also works.I'm not sure if I ran into an actual bug (possibly with older versions of iOS? Target deployment is set to iOS 9.0 for my project) or if I misconfigured something.