goosoftware/GSKeychain — pull request #1 by osteslag (2013-01-30 16:44:41+00:00)
Title: Add method to remove all secrets

Use at own risk. This hasn’t been tested much.

This is particularly convenient if you want to clear an app’s secrets at launch. When an app is deleted from the device, the secrets are kept in the keychain. This means that if a user deletes the app, sells the device to somebody, and that somebody installs the same app, the secrets will have survived and are now in the hands of that somebody else.

One solution for this is to check for a first-launch flag at startup, delete all items if appropriate and clear the flag.