How to Add Face ID to an iPhone App Without Code (2026)

Add Face ID to an iPhone app without code: what it protects, the passcode fallback, Apple's permission sentence, testing, and the steps with Borel.

By Sigsten Gustavii· · 8 min read

To add Face ID to an iPhone app, decide what it should protect (the whole app or one screen), use Apple's LocalAuthentication framework to ask for a check, fall back to the passcode when Face ID fails or isn't set up, add a purpose sentence for the permission prompt, and test it on a real iPhone. With Borel, you say what to lock and it writes the Swift.

What Face ID can and can't do in your app
QuestionAnswer
What does the app learn?Only whether the check passed; the face data never leaves the iPhone's Secure Enclave
What if Face ID fails?The iPhone's passcode opens the app instead
What if the phone has no Face ID or passcode?A Borel app still lets the owner in
Does it need a permission?Yes, iOS asks once, with a sentence the app provides
Is it an account login?No: it protects data on this phone; accounts are separate
Does it work on iPhones with Touch ID?Yes, the same framework uses Touch ID there

Face ID is the quickest way to make a private app feel private. A diary, a notes vault, a spending tracker or a parent's settings screen opens with a glance for the owner and stays shut for anyone who picks up the phone. It costs nothing to run, works offline, and is one of the features a website simply can't offer.

How Face ID works in an app

When an app asks for Face ID, iOS shows its own Face ID animation, checks the face against what the iPhone stored in its Secure Enclave, and tells the app only "yes" or "no". The app never sees an image or a measurement of the face; Apple describes this in its platform security guide. On iPhones with Touch ID, the same framework, LocalAuthentication, checks a fingerprint instead.

What to protect with Face ID

Ideas for a Face ID lock
AppWhat to lockWhen to ask
Private diaryThe whole appEvery time it opens
Notes vaultA Locked folderWhen the folder is opened
Spending trackerBalances and historyWhen the app opens
Family appThe grown-up settingsWhen Settings is opened
Password hints or codesThe listEvery time, and again after a minute away

Lock the smallest thing that needs it. An app that asks for Face ID to show a shopping list gets annoying; an app that locks only the diary entries feels thoughtful.

Face ID is not a login

This is the most common misunderstanding. Face ID proves that the person holding the phone is its owner. It doesn't tell the app who they are, and it doesn't move their data to a new phone. If an app needs accounts so data syncs between devices or is shared with others, it needs a real sign-in as well; see how to add login to an iPhone app. Many apps use both: an account for the data, and Face ID so a borrowed phone can't open it.

The permission sentence

Before an app can use Face ID, iOS asks the person once, using a short sentence the app provides. Apple's Guideline 5.1.1(ii) asks that the sentence clearly describes how the app uses it. Good examples:

  • "Use Face ID to keep your diary entries private."
  • "Unlock your spending history with a glance."
  • "Make sure only you can change the family settings."

Borel writes this sentence for each app and fills it in if it would ever be missing, so the app never crashes on the prompt.

Designing the lock screen

  1. Ask straight away when the locked part opens, rather than making people tap a button.
  2. Show a calm cover, such as the app's icon on its colour, while the check runs, so nothing private flashes on screen.
  3. Offer Try again after a failed check, next to the passcode option iOS already provides.
  4. Let people turn it off in settings, after a successful check.
  5. Lock again when the app comes back from the background after a while, for apps with sensitive data.

Common Face ID mistakes

  • Locking everything. Asking for Face ID to read a recipe teaches people to turn it off.
  • No way back in. An app that refuses the passcode after a failed scan locks out a person wearing a mask or a bandage. Keep the fallback.
  • Showing data behind the prompt. If the private screen is visible for a moment before the check, it isn't private. Cover it until the check passes.
  • Treating it as security for the server. Face ID protects what is on the phone. Data in the cloud is protected by the account's sign-in and the database's rules.
  • A vague permission sentence. "This app uses Face ID" tells people nothing; say what it protects.

Face ID together with other protections

Face ID is one layer. For a truly private app, pair it with the others a native app gets: keep the data on the phone with SwiftData when it doesn't need to sync, so it never leaves the device; if it does sync, keep it behind an account whose rows only that person can read; and lock again after a short time away. Each is a sentence to Borel. Together they make an app people trust with a diary or their spending.

Testing Face ID

The iOS Simulator can't scan a face. In Borel's simulator in your browser you can test everything around the lock: the cover, the flow and the settings switch. To try the real Face ID prompt, install the app on your iPhone with Borel Companion, which comes with Pro; a free Apple ID is enough for that. Try it with your face, with your face covered, and with the passcode.

Apple's rules for Face ID

Apple's rules that apply to Face ID in an app
RuleWhat Apple asksIn a Borel app
5.1.1(ii) PermissionA clear purpose sentence for Face IDWritten for your app and filled in if missing
Human Interface GuidelinesUse Apple's own prompt and wording for Face IDiOS draws the prompt itself
FallbackDon't lock people outThe passcode opens the app; a phone with neither still lets the owner in

Read the full rules on Apple's App Review Guidelines page.

What it costs

The cost of adding Face ID with Borel
ItemCost
Building the lockCredits, from 5 credits a day on the free plan
Running itNothing: the check happens on the phone
Installing on your iPhoneBorel Pro, from $20 a month
PublishingBorel Pro and Apple's $99 a year

See pricing for every plan.

How to choose the right way to add Face ID

  • Borel, if you want a Face ID lock in a native iPhone app from a sentence, with the fallback and permission handled.
  • LocalAuthentication by hand in Xcode, if you are a Swift developer and need to tie Face ID to keychain items or custom policies.
  • [CatDoes](/compare/catdoes) or [a0](/compare/a0), if you build React Native apps; Face ID there goes through Expo's modules.

How to do it with Borel, step by step

Step 1: Say what to lock

A message to an existing app
Lock the diary with Face ID. When the app opens or comes back after more than a minute, cover the screen with the app icon on our background colour and ask for Face ID. If it fails, offer Try again, and let the passcode open it. Add a Face ID switch in Settings that can only be turned off after a successful check.

You can also pick Face ID from Device in the chat's + menu. Rivet writes the lock with LocalAuthentication and the permission sentence.

Step 2: Check the flow in the simulator

On the live iPhone in your browser, check the cover, the settings switch and what happens when the check doesn't pass.

Step 3: Try your face

Install the app on your iPhone with Companion (Pro) and open it a few times: with your face, with a hand over it, and with the passcode.

Step 4: Publish

Stamp checks that every permission has a clear reason, and Publish builds and uploads the app under your Apple Developer account. More on the Face ID feature page and in the glossary entry on Face ID.

The Bottom Line

Face ID makes a private app feel private, costs nothing to run and never shares a face with anyone. Lock the smallest thing that needs protecting, keep the passcode as a backup, and remember that it guards the phone, not an account. Borel adds all of it from one sentence. Open your app in Borel and lock it with a glance.

Questions people ask

How do I add Face ID to an iPhone app?

Use Apple's LocalAuthentication framework to ask for a check, with a passcode fallback and a purpose sentence. In Borel, say what to lock, or pick Face ID from Device in the + menu, and it writes the Swift.

Does my app see the person's face?

No. iOS does the check in the iPhone's Secure Enclave and tells the app only whether it passed.

What happens if Face ID fails?

The iPhone's passcode opens the app instead, so the owner is never locked out. A phone with neither Face ID nor a passcode still lets the owner in.

Can Face ID replace a username and password?

Not on its own. Face ID proves the owner is holding this phone; an account is what keeps data across devices. Many apps use both.

Can I test Face ID in the simulator?

You can test the flow around it, but the real face check needs an iPhone. Install the app with Borel Companion, on Pro, to try it.

Does Face ID work on iPhones with Touch ID?

Yes. The same LocalAuthentication framework uses Touch ID on those iPhones.

Does Face ID need an internet connection?

No. The check happens entirely on the phone, so a Face ID lock works offline and costs nothing to run.

Can people turn the Face ID lock off?

Yes, if you ask for a switch in settings. A good pattern is to require a successful check before the lock can be turned off, so someone else can't simply switch it off.

Can Face ID protect only part of an app?

Yes. Lock a single screen or folder, like a Locked notes folder or the settings, and leave the rest open.

Face ID is the quickest way I know to make a private app feel private. Lock the smallest thing that needs it.

– Sigsten

Make your iPhone app in Borel

Describe the app you want and see its first screens before you pay anything.

See your app free

Keep reading