How to Add Login and User Accounts to an iPhone App (2026)

Add sign-up, login, password reset and account deletion to an iPhone app without a backend: Apple's rules, the choices, and the steps with Borel.

By Sigsten Gustavii· · 8 min read

To add login to an iPhone app, decide whether the app really needs accounts, choose how people sign in, connect a backend that stores accounts and each person's data, build the sign-up, login, reset and delete screens, and give Apple's reviewer a demo account. In a Borel app, you ask for accounts and the backend and screens come with them.

What adding accounts involves, by route
PartBy handWith Borel
An auth serviceSign up for one and configure itBorel Cloud, already set up
Sign-up and login screensDesign and code themBuilt in SwiftUI
Email confirmationSet up an email senderA confirmation code by email
Password resetBuild the flow and emailsReset with an emailed code
Each person's data kept privateWrite database security rulesDeclared per table by Borel
Account deletionBuild it, and delete their dataDelete account in settings removes their data too

Accounts are one of those features that looks like two text fields and turns out to be a week of work: email checks, forgotten passwords, sessions that expire, data that must stay private, and Apple's rule that people can delete what they made. This guide explains the choices and Apple's rules, then shows the steps in Borel.

Does your app need accounts at all?

Apple's Guideline 5.1.1(v) starts with a question: if your app doesn't include significant account-based features, let people use it without a login. Many apps don't need one:

When an app needs accounts
AppNeeds accounts?Why
A habit tracker used on one phoneNoData can stay on the phone
A recipe app with a shared family listYesSeveral people see the same list
A social or dating appYesPeople post and talk to each other
A shop with order historyYes, at checkoutBrowsing can stay open; orders belong to someone
A game with a leaderboardOptionalPlay without one; sign in to post a score

When data only lives on one phone, Apple's SwiftData keeps it there, and the app works offline; see offline data. Add accounts when data has to move between devices or between people. Stamp, Borel's reviewer, also flags sign-in placed in front of things that don't need it.

Ways to sign people in

Sign-in methods compared
MethodHow it worksIn a Borel app today
Email and passwordPeople choose a password and confirm their emailYes, with a confirmation code and reset by code
Email code onlyA one-time code by email, no passwordCodes confirm sign-up and reset passwords
Sign in with AppleApple's own button, can hide the emailNot in Borel's Swift apps today
Google, Facebook and othersA third-party accountNot in Borel's Swift apps today

This matters for Apple's Guideline 4.8. An app that uses a third-party or social login, like Google, for its main account must also offer an equivalent login that limits data to name and email and lets people keep their email private, which in practice usually means Sign in with Apple. An app that uses its own email and password accounts, as Borel apps do, is not using a third-party login service, so 4.8 doesn't ask for a second option.

Where each person's data lives

An account is only useful if the app keeps each person's data apart. In a Borel app, data lives in Borel Cloud, a Postgres database Borel runs, and every row records who owns it. Borel declares an access rule for each table:

  • Private: only its owner reads it, like a journal entry.
  • Everyone signed in reads, the owner writes: like a public profile or a post.
  • Followers read: posts for the people who follow someone.
  • Members of a conversation read: messages.
  • A shared group reads: a family list people join with an invite code.

These rules run in the database itself, not only in the app, so one person can't read another's data even by calling the database directly. You never write a security policy; Borel writes it from what the app needs. More on databases and backends in the glossary.

Apple's rules for apps with accounts

Apple's rules that apply to apps with login
GuidelineWhat Apple asksIn a Borel app
5.1.1(v) Login only when neededNo login for apps without significant account-based featuresAsk for accounts only where data must be shared or synced
5.1.1(v) Account deletionOffer account deletion within the appDelete account in settings; it removes the person's data and files
5.1.1(iii) Data minimisationCollect only what the task needsEmail and password; ask for more only with a reason
4.8 Login servicesAn equivalent option alongside third-party loginsNot triggered: Borel apps use their own email accounts
2.1 App completenessDemo account details for reviewCreate one and add it in the publish flow

Delete account must really delete. In a Borel app it removes the rows the person owns and the files they uploaded, then the sign-in itself, and it works even if the app owner's balance is empty. Read the full rules on Apple's App Review Guidelines page.

Good sign-in screens

  1. Let people look before signing up, so they know what the app is.
  2. Ask for an account at the moment it matters: saving, posting, syncing.
  3. Show password rules up front, not after a failed try.
  4. Write errors in plain words: "That email and password don't match."
  5. Put Forgot password next to the password field.
  6. Keep Delete account findable in settings, next to the privacy policy.

What accounts cost

Costs of adding accounts with Borel
ItemCostNotes
BuildingCredits, from 5 credits a dayPro from $20 a month for more
Running accounts and dataPay as you goFrom your app's balance
PublishingPro plus $99 a year to AppleNeeded for the App Store

There is no separate auth service subscription. See pricing.

Keeping accounts safe

Most account problems are small habits, not clever attacks:

  • Never put secret keys in the app. Anything inside an iPhone app can be read out of it. Borel apps hold no keys; they reach Borel Cloud with each person's own session.
  • Enforce rules in the database. A check in the app's code can be skipped; a rule in the database can't. Borel's access rules live in the database.
  • Confirm emails. A confirmation code stops people signing up with someone else's address.
  • Collect less. Every extra field is something to protect. Apple's Guideline 5.1.1(iii) asks for the same thing.
  • Protect private apps on the phone too. For a journal or a finance app, a Face ID lock keeps a borrowed phone from opening it.

How to choose the right way to add login

  • Borel, if you want accounts, private data rules and account deletion in a native iPhone app without setting up a backend.
  • An auth service wired by hand, such as Firebase or Supabase, if you write Swift in Xcode and want to manage the service and its rules yourself.
  • [CatDoes](/compare/catdoes), if you need the same accounts on Android; it has its own cloud for React Native apps.
  • No accounts at all, if the app's data can stay on one phone. Often the right answer.

How to do it with Borel, step by step

Step 1: Decide what needs an account

List what a signed-out visitor can do and what needs an account. For a recipe app: browse recipes signed out; save favourites and share a shopping list signed in.

Step 2: Ask for accounts

A message to an existing app
Add accounts. People can browse recipes without signing in. To save a favourite or join a family shopping list, ask them to sign up with email and password, confirm with the emailed code, and pick a display name. Add Forgot password. Favourites are private to each person; a shopping list is shared with family members who join with an invite code. Put Sign out and Delete account in Settings.

Rivet adds the screens and the tables with their access rules, and Borel creates the app's database if it doesn't have one yet.

Step 3: Test with two accounts

In the iOS Simulator in your browser, create two accounts. Save a favourite in one and check the other can't see it. Join the shared list from both. Reset a password. Then delete one account and check its data is gone.

Step 4: Publish with a demo account

Create a demo account with some data in it for Apple's reviewer and add it in the publish flow. Stamp checks that Delete account is there before you submit.

The Bottom Line

Accounts are worth adding when data must move between devices or people, and not before. When you do need them, Borel adds sign-up, login, confirmation and reset codes, private data rules in the database and a Delete account that really deletes, all from one message and with no backend to run. Open your app in Borel and ask for accounts.

Questions people ask

How do I add login to an iPhone app without a backend?

Use a builder or service that brings one. Borel apps get Borel Cloud, with accounts, a database and file storage, so you ask for accounts in plain words and nothing needs setting up.

Does Apple require Sign in with Apple?

Only when an app uses a third-party or social login, like Google, for its main account (Guideline 4.8). Apps with their own email and password accounts, like Borel apps, don't need it.

Do I have to let people delete their account?

Yes. Guideline 5.1.1(v) says an app that supports account creation must offer account deletion within the app. Borel puts Delete account in settings and removes the person's data with it.

Can people reset a forgotten password?

Yes. In a Borel app, Forgot password emails a code, and the person sets a new password with it.

Is each person's data private?

Yes, by rule. Borel declares who may read each table, and the database enforces it, so one person can't read another's private data.

Does my app need accounts to work offline?

No. Data that stays on one phone can live in SwiftData on the device and work offline. Accounts are for syncing and sharing.

Can I add Google sign-in?

Not in Borel's Swift apps today; they use email and password. If you add a social login another way, Apple's Guideline 4.8 asks for an equivalent privacy-focused option too.

What does Apple need to review an app with login?

Working demo account details and a back end that is switched on, under Guideline 2.1. Add the account in Borel's publish flow so the reviewer can sign in.

I started Borel because I wanted to make iPhone apps without a Mac or a team behind me. If this helped you build something, I would love to see 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