Detect if NFC is enabled or not

Hi,

I am using the below code to detect if NFC is enabled or not.

  • (BOOL)isNFCAvailable { if ([NFCNDEFReaderSession readingAvailable]) { return YES; } return NO;

}

I have also added the permission is info.plist file

<key>NFCReaderUsageDescription</key> <string>Detecting if NFC is enabled or not</string>

I am testing on iphone XS with ios 15.6.1 and on iphone 11 with ios 13.2.2. In both the cases, the API is returning false.

Can you please let me know if I am missing something.