Posts

Post not yet marked as solved
4 Replies
1k Views
We have been successfully writing to NFC tags using Beta 13, but have no luck with trying to lock them using the writeLock() function. After execution we get back a result of nil but it is definitely not locking. Any clues or has anyone managed to get this work as yet?Code is extremley straight forward (but might have done something stupid!) - Trying on different variations of a NXP NTAG213 tag:if (self.lockTag) { // locking required also os_log("Tag needs to be locked") tag.writeLock() { (error: Error?) in if error != nil { os_log("LOCK FAILED!!") session.alertMessage = "Lock failed try again" session.invalidate() } else { session.alertMessage = "Write and Lock successful" session.invalidate() } } } else { // only writing os_log("Tag is unlocked") session.alertMessage = "Write successful!" session.invalidate() }
Posted
by chum63.
Last updated
.