Posts

Post not yet marked as solved
4 Replies
Thanks for commenting - as my response below - I missed out some returns and it was not processing correctly but not erroring either.Thanks again!
Post not yet marked as solved
4 Replies
OK - yes being stupid - missed out some returns! Not totally sure why it would not just fall through correctly, but this has fixed itif (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() return } else { session.alertMessage = "Write and Lock successful" session.invalidate() return } } returnThis works perfectly and locks the tags.