How to remove existing password and set a new one in a single NFC session (iOS Swift)?
I’m working on an iOS(17+ using Swift) app using CoreNFC and need to manage passwords on ST25 tags.
The goal:
- Authenticate with the existing password (assuming I already have).
- Remove the password (disable protection).
- Immediately set a new password in the same NFC session.
The issue:
• The chip doesn’t actually clear the password.
• Commands fail with “Tag connection lost”.
It looks like I’m not reading/writing the configuration pages correctly or missing a required sequence.
What I need
A working Swift implementation that:
• Authenticates with the existing password,
• Removes/clears it,
• Sets a new password,
• All in one NFC session.
Any code snippets or idea would be really helpful.
