I'm trying to make NFC work on a iOS phone and now I'm getting this error:
[CoreNFC] 00000002 82426be0 -[NFCHardwareManager areFeaturesSupported:outError:]:154 XPC Error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.nfcd.service.corenfc was invalidated from this process." UserInfo={NSDebugDescription=The connection to service named com.apple.nfcd.service.corenfc was invalidated from this process.}
The package I'm currently using is nfc_manager
Here is the code that's being used:
openNFC() async {
// Check availability
bool isAvailable = await NfcManager.instance.isAvailable();
// Start Session
if (isAvailable == true) {
NfcManager.instance.startSession(
onDiscovered: (NfcTag tag) async {
print(tag);
},
);
} else {
print("Your device is not compatible with NFC");
}
// Stop Session
NfcManager.instance.stopSession();
}
Can someone please help me? Thanks in advance❤️