The short version
- iOS has one passcode and no second one that opens something else or erases on demand.
- Holding the side button and a volume button for two seconds, then cancelling, makes the next unlock ask for the passcode and not Face ID. That is not a duress code, but it stops a face being held up to the phone.
- Erase Data wipes the phone after ten wrong passcodes in a row. It is an anti-guessing setting, and it can wipe by accident.
- A few vault apps add their own panic or erase code. Each does something different.
If you are asking whether you can set an iPhone to open a harmless view, or erase itself, when you type a special passcode, the answer in Apple's documentation is no. The iPhone has one passcode. What it has instead is a handful of settings that cover parts of the same worry, each with a different shape.
No second passcode in iOS
We read Apple's Platform Security guide and the Lockdown Mode page for this article and found no feature that accepts an alternate passcode and behaves differently. Nothing in them describes a decoy phone, a hidden profile or a code that wipes on entry. Some third-party tools claim to add one at system level. On a stock iPhone they cannot, because the lock screen belongs to iOS.
Apple's longer answer to coercion is to make passcodes harder to get at, not to pretend to be someone else. That brings in the next two items.
Buttons that disable Face ID
If you are afraid of being forced to look at your phone, there is a fast way to switch Face ID off. Apple's security guide says that a passcode is required after the device exits power off or Emergency SOS, a gesture it describes as pressing and holding a volume button and the side (Sleep/Wake) button together for two seconds and then pressing Cancel. The next unlock then needs the passcode, as it does in other cases Apple lists: after a restart, after 48 hours without unlocking, and after five unsuccessful biometric attempts.
This is not a duress code. The person demanding access can still demand the passcode, and in that situation the law of where you are decides what they may do. What the gesture gives you is the removal of the easiest route, a glance at your face or a finger. If you worry about that, practise the gesture so you can do it in a pocket.
Erase after ten attempts
The setting called Erase Data lives under Settings, Face ID & Passcode (Touch ID & Passcode on phones with a home button). Apple's guide says that when it is on, after 10 consecutive incorrect passcode attempts all content and settings are removed from storage, and that repeated entries of the same wrong passcode do not count toward the limit.
Delays come first. The guide's table shows no delay at three wrong attempts, then one minute, five, fifteen, an hour, three hours and eight hours, with the Secure Enclave enforcing them. Ten wrong attempts is therefore the end of a long road, not a quick one, and a person who is guessing at the lock screen will usually be stopped by the delays long before ten tries.
Two cautions. Erase Data is for guessing, not for a code you choose to type. And children and cats make wrong attempts: switching it on without a recent backup is how photos get lost. Some readers will also need to ask first whether destroying data they have been told to hand over is lawful where they are, a question we cannot answer and a lawyer can.
Lockdown Mode
Lockdown Mode is an optional protection for people who may be targeted by sophisticated attacks. Apple's page says it limits what the phone does so that fewer attack routes exist, and that emergency features such as SOS calls are not affected. It does not add a duress passcode, and it does nothing about someone standing in front of you. We mention it because it is often confused with the topic.
Apps with a panic or erase code
Inside an app, anything is possible, because the app owns its own lock. Three examples from their own pages, none tested by us:
| App | What its special code does |
|---|---|
| Privault | A secondary passcode opens a secondary folder, and a separate erase-all passcode deletes all secret files |
| Inner Gallery | A Panic PIN opens a decoy space (sold as a $9.99 one-time purchase) |
| Vaultaire | A duress vault, a Pro feature; its site describes the other vaults being removed from the device |
Vaultario, which is not released yet, has a duress pattern in Pro: drawing it opens one vault and deletes every other vault. It is file deletion, not forensic erasure, and there is no backup. Our guide to duress passwords sets out when any of these designs backfire.
An app's special code protects only that app. The photo in the camera roll, in Recently Deleted or in a chat is not touched.
Questions
Can I make my iPhone passcode longer instead?
Yes. Apple's passcode options include longer numeric and alphanumeric codes, and a longer code makes guessing, and Erase Data, a smaller part of the story.
Does Erase Data also delete iCloud?
Apple's page says the erase removes content and settings from the device storage. Your iCloud copies are a separate matter; see Apple's pages on erasing a device before selling it.
Sources
Read on 3 December 2026. Listings, prices and policies change; the linked page is the one that counts.
- Apple Platform Security, Optic ID, Face ID, Touch ID, passcodes and passwords
- Apple Platform Security, passcodes
- Apple Support, Lockdown Mode
- Privault, App Store listing
- Inner Gallery, App Store listing
- Vaultaire, developer website
Product names, icons and trademarks belong to their owners and are used only to identify the products. Found something wrong or out of date? Write to support@vaultario.app and we will correct it.
Vaultario isn't out yet
It is an iPhone photo vault where the pattern you draw is the encryption key. Leave your e-mail and we will write once, on the day it opens.