I’m creating an utility that entails writing information to RFID tags utilizing NFC (ISO/IEC 14443A/B, Mifare, and FeliCa requirements)
for an electrical car charging station. Nonetheless, I’m persistently dealing with a problem the place the Apple Pockets app is routinely triggered throughout NFC operations on iOS. This downside happens each time I try to jot down information to the RFID tags, stopping the applying from correctly detecting or interacting with the NFC tags.
Listed here are the important thing particulars of the difficulty:
Gadget: iPhone (examined on varied fashions and iOS variations) Subject: Apple Pockets routinely opens throughout NFC tag writing operations.
Anticipated Habits: My utility ought to write information to RFID tags with out triggering Apple Pockets.
RFID Requirements: ISO/IEC 14443A/B, Mifare, FeliCa. Code Implementation: I’m utilizing the Core NFC framework and NFCISO14443ReaderSession to speak with the RFID tags. The identical code works seamlessly with Android units, however iOS repeatedly triggers the Pockets app.
Right here’s a short code snippet that demonstrates the issue:
import CoreNFC
func startNFCSession() {
let session = NFCISO14443ReaderSession(delegate: self, queue: nil, invalidateAfterFirstRead: false)
session?.alertMessage = "Maintain your iPhone close to the NFC tag."
session?.start()
}
func readerSession(_ session: NFCISO14443ReaderSession, didDetect tags: [NFCISO14443Tag]) {
guard let tag = tags.first else { return }
session.join(to: tag) { (error: Error?) in
if let error = error {
session.invalidate(errorMessage: "Connection failed: (error.localizedDescription)")
return
}
// Write information to the tag right here
// The Pockets app opens as a substitute of permitting information writing.
}
}
I’ve taken steps to make sure that I’m not utilizing NDEF tags, as I perceive which will intervene with the Pockets performance. Regardless of utilizing the lower-level NFCISO14443ReaderSession API, the difficulty persists.
I’ve additionally tried disabling all Pockets settings on the gadget, however the issue nonetheless happens. Moreover, no such points are skilled on Android units with related performance, so it seems to be an iOS-specific downside.
Is there a method to stop Apple Pockets from being triggered when utilizing Core NFC to work together with RFID tags?
Any help or steering on resolve this situation could be vastly appreciated, as it is a crucial characteristic for the performance of the electrical car charging station system we’re constructing.
Thanks prematurely!