Guideline 5.1.1 has ten clauses, so find the roman numeral in your rejection before you change anything. For 5.1.1(v), an app that creates accounts must let people start deleting the account and its data inside the app, with no phone call or email required, and the deletion has to happen on your server. If you offer Sign in with Apple, store the refresh token at sign-in and revoke it when the account is deleted, warn subscribers that billing continues through Apple, and make purpose strings, the privacy policy and any AI data sharing explicit.
A rejection that cites Guideline 5.1.1 tells you less than it seems to, because 5.1.1 has ten separate clauses. One covers privacy policies, one covers permission prompts, one covers login walls and account deletion, and the fix for each is different. The clause number in your message from App Review decides which part of your app you open next.
Apps built with AI tools hit this guideline for a plain reason. A tool like Cursor, Claude Code, Rork or Bolt builds what the prompt describes. "Add login" gets you a sign-up screen in an afternoon, while nobody prompts for the screen that removes the account, the server code that erases the user's rows, or the call that revokes a Sign in with Apple token. Those parts only show up when a reviewer goes looking for them.
This guide goes through the 5.1.1 clauses that catch AI-built apps most often, with what Apple's current text says, the code to add, and how to answer App Review once it is done. Everything here was checked against the App Review Guidelines dated October 16, 2026 and Apple's account deletion page.
Find your clause first
Open the message in the App Review section of App Store Connect and look for the roman numeral after 5.1.1. Then match it here.
| Clause | Topic | What usually triggered it |
|---|---|---|
| 5.1.1(i) | Privacy policy | No link inside the app, or a policy that doesn't say what the app collects |
| 5.1.1(ii) | Permission | Vague purpose strings, or data collected before the user agrees |
| 5.1.1(iii) | Data minimization | Full Photos or Contacts access for a job a picker could do |
| 5.1.1(iv) | Access | The app stops working when someone declines a permission |
| 5.1.1(v) | Account sign-in | Login with no real account features, or no account deletion |
| 5.1.1(ix) | Regulated fields | Banking, health, gambling or crypto exchange apps submitted by an individual |
| 5.1.1(x) | Contact details | Name or email required when it should be optional |
Clause (ix) has no code fix. Apple says apps in those fields should be submitted by a legal entity that provides the service, so the answer there is a change to the developer account. The rest of this article is about the clauses you can fix in a day or two.
What 5.1.1(v) asks for on account deletion
The rule is one sentence: "If your app supports account creation, you must also offer account deletion within the app." Apple's support page spells out how that sentence gets applied, and a few of its answers surprise people.
- The option has to be easy to find, and Apple says it is typically in account settings.
- It has to delete the whole account record and the personal data tied to it. Deactivating or disabling an account is allowed as an extra option, but it doesn't count on its own.
- Deletion has to start in the app. If people finish it on a website, the app must link straight to the page where that happens, so a link to your homepage won't pass.
- Outside highly regulated fields, you can't require a phone call, an email or a support chat.
- Confirmation steps are fine, including re-entering a code sent to the email or phone on the account. Steps that make deletion needlessly hard will fail review.
- Deletion doesn't have to be instant. A manual or slow process is acceptable if you tell people how long it takes and confirm when it is done.
- Guest accounts count. If the app creates an account automatically, people must be able to delete it and its data.
- Content the user shared with others, such as photos, posts and reviews, goes with the account. If a law requires you to keep something, tell the user what stays.
- Deletion must be available to everyone. Limiting it to regions covered by GDPR or CCPA is not enough.
- Sending people to a browser to sign up doesn't get you out of it. In-app deletion is still required.
A real rejection quoted on Apple's developer forums follows this list closely: the app supported account creation, had no option to start deletion, and the reviewer repeated that temporary deactivation is not sufficient.
Build the deletion flow
The screen is the small part. Put a destructive button in account settings, confirm once, call your server, then sign the user out and return to the first screen. Here is a SwiftUI version you can paste in and adapt.
struct DeleteAccountButton: View {
let deleteAccount: () async throws -> Void // calls your server
let onDeleted: () -> Void // clears the session
@State private var confirming = false
@State private var deleting = false
@State private var failed = false
var body: some View {
Button("Delete Account", role: .destructive) {
confirming = true
}
.disabled(deleting)
.confirmationDialog(
"Delete your account?",
isPresented: $confirming,
titleVisibility: .visible
) {
Button("Delete Account", role: .destructive) {
Task { await run() }
}
Button("Cancel", role: .cancel) { }
} message: {
Text("This removes your account and your data. It can't be undone.")
}
.alert("Couldn't delete your account", isPresented: $failed) {
Button("OK", role: .cancel) { }
} message: {
Text("Please check your connection and try again.")
}
}
private func run() async {
deleting = true
defer { deleting = false }
do {
try await deleteAccount()
onDeleted()
} catch {
failed = true
}
}
}
The trap in generated code is the backend. Many apps made with AI tools talk straight to Supabase or Firebase from the client, and the app can't do this job alone.
On Supabase, removing a user with auth.admin.deleteUser() requires a service_role key, and Supabase's reference says the function should only be called on a server and the key must never be exposed in the browser. The same reasoning applies to a key shipped inside an iOS app, so put this in an Edge Function or your own endpoint. The reference doesn't say anything about related rows, so delete your app's own tables yourself. Note the shouldSoftDelete option as well: it keeps a hashed trace of the user in the auth schema, which you would want to think through against Apple's requirement to delete the account record.
// Runs on your server. Never ship the service_role key in the app.
// verifyUser, deleteUserData and revokeAppleToken are your own helpers.
const user = await verifyUser(request); // from the user's JWT
await deleteUserData(user.id); // your tables, your storage
await revokeAppleToken(user.id); // see the next section
await admin.auth.admin.deleteUser(user.id); // last, once the rest worked
return new Response(null, { status: 204 });
On Firebase, user.delete runs from the client, but Firebase warns that the user must have signed in recently. A person who logged in three weeks ago will get an error, so a flow that was only tested right after signing up can fail for the reviewer and for real users. Handle that error by asking the person to sign in again and then retry. That delete also removes the auth user and nothing else, so anything in Firestore or Storage needs its own cleanup. Firebase's privacy documentation has a page on clearing user data if you want a starting point.
Run the order on the server in a way that survives a failure halfway. Delete the data first and the auth user last, because once the auth user is gone you may have no way to find what was left behind.
Sign in with Apple needs one more step
If the app offers Sign in with Apple, Apple's page says to use the REST API to revoke user tokens when an account is deleted. This is the part generated code almost always skips, because signing in works perfectly without it.
Revoking needs a refresh token or an access token, which means planning for it at sign-in. When the user first signs in, your app gets a short-lived authorization code on the Apple credential. Send it to your server and exchange it at Apple's token endpoint:
curl -v "https://appleid.apple.com/auth/token" \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'client_id=CLIENT_ID' \
-d 'client_secret=CLIENT_SECRET' \
-d 'code=CODE' \
-d 'grant_type=authorization_code'
The response includes a refresh_token. Store it on your server against the user. When the account is deleted, call the revoke endpoint:
curl -v "https://appleid.apple.com/auth/revoke" \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'client_id=CLIENT_ID' \
-d 'client_secret=CLIENT_SECRET' \
-d 'token=REFRESH_TOKEN' \
-d 'token_type_hint=refresh_token'
Apple returns a 200 with an empty body when the token is invalidated, or if it was already invalid. The client_secret is a JWT you create and sign with your Sign in with Apple private key, which is one more reason this belongs on a server.
For users who signed in before you added any of this, you won't have a stored token. Apple's documentation says that if you have neither token, you can generate them when validating an authorization code, so ask the user to sign in with Apple once more as the confirmation step before deletion, then use the fresh code.
If you use Firebase, the job is shorter. Get the authorization code from ASAuthorizationAppleIDCredential during that re-authentication and pass it to Auth.auth().revokeToken(withAuthorizationCode:), then delete the user.
Apple can also tell your server when something changes from its side. Set up server-to-server notifications and handle two event types: consent-revoked, when the user stops using their Apple Account with your app, and account-deleted, when they ask Apple to delete the Apple Account. Apple notes that a permanent deletion doesn't send the native credentialRevokedNotification, so on the device use getCredentialState(forUserID:completion:) to find out.
Subscribers need a warning before they delete
Deleting an account does not cancel an auto-renewable subscription, because Apple handles that billing. Apple's page asks you to tell the person that billing continues through Apple and ask them to cancel before going on. A short notice in the confirmation step covers it, with a button that opens subscription management.
// iOS 15 and later
if let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene {
try await AppStore.showManageSubscriptions(in: scene)
}
For refunds, Apple points to beginRefundRequest(in:) on iOS 15 and later. You may schedule deletion for the date a subscription expires, but you must also offer immediate deletion, so a "your account closes at the end of the billing period" flow on its own doesn't meet the rule.
The login wall: when sign-in itself is the problem
The same clause opens with a different rule: "If your app doesn't include significant account-based features, let people use it without a login." AI app templates often start with an auth screen because that is what the template contains. A calculator, a recipe viewer or a habit tracker that keeps data on the phone has a hard time justifying that screen.
Decide which case you are in. If accounts do something real, like syncing across devices or shared content, say so in your App Review notes. If they don't, move the sign-up behind the feature that needs it and let people reach the main screen first. Clause (x) adds that name and email can be requested only if the request is optional and features aren't conditional on it, so a required email field for a newsletter fails too.
If you offer login through a social network and your app isn't built around that network, the clause also says you must provide access without a login or through another mechanism, and the app must include a way to revoke those credentials from within the app.
Permission prompts and purpose strings
Clause (ii) tells developers to make sure purpose strings clearly and completely describe the use of the data. AI tools tend to fill these in with something like "This app needs access to your camera", which says nothing a person can judge.
| Weak | Better |
|---|---|
| This app needs camera access. | Take a photo of a receipt so the app can read the total. |
| We use your location to improve your experience. | Show gyms near you on the map. |
| Access to contacts is required. | Find friends who already use the app. You pick who to invite. |
A missing string is worse than a vague one. Apple's Technical Q&A QA1937 says an app that attempts to access privacy-sensitive data without a usage description will exit, and that App Review rejects apps that do it. If you ship through Expo, these strings live under ios.infoPlist in the app config, and each one must match what the app does today. Strings left over from a template, for a feature you removed, are worth deleting along with the permission code.
Clause (iii) says that where possible you should use the out-of-process picker or a share sheet instead of requesting full access to resources like Photos or Contacts. If the app only needs someone to choose an image, SwiftUI's PhotosPicker does that job without a library permission prompt. Search your project for PHPhotoLibrary.requestAuthorization and ask whether it needs to be there.
Clause (iv) covers what happens after a "no". Apple's example: if a user declines to share Location, offer the ability to manually enter an address. Test this on a clean install by declining every prompt. If any screen turns blank or loops, that is the bug. Guideline 5.1.2(i) goes further and says the app may not require users to enable system functionality such as push notifications, location services or tracking to use the app.
The privacy policy has to match the app
Clause (i) requires a privacy policy link in the App Store Connect metadata field and inside the app in an easily accessible manner. Generated apps usually miss the second one, so add a row in settings.
The content has rules too. The policy must identify what data the app collects, how, and all uses of it. It must confirm that third parties with access to user data, such as analytics tools, ad networks and SDKs, will provide the same or equal protection. And it must explain retention and deletion policies and how a user can revoke consent or request deletion. A template policy copied from another site fails on the first point, since it describes somebody else's app.
List your SDKs before you write a word of it. Open your package file and write down every analytics, crash reporting, payment, ad and AI service in the app. That list feeds the privacy policy and the privacy labels at once.
The clause next door: sending user data to an AI service
This one deserves attention if your app has an AI feature. Guideline 5.1.2(i), right after 5.1.1, says: "You must clearly disclose where personal data will be shared with third parties, including with third-party AI, and obtain explicit permission before doing so."
If a user's text, photo or voice goes to OpenAI, Anthropic, Google or any other model provider, a sentence in the privacy policy gives you the disclosure half and leaves the permission half undone. Show a screen before the first send that names the provider, says what gets sent and why, and has a clear button to agree. Store the answer, and give people a way to change it in settings, because clause (ii) also requires an easily accessible way to withdraw consent. Paid features can't depend on someone agreeing to data collection, as that clause also says, so consider what the app does when they decline. Apple Now Sells $49.99 AI Usage Packs. If Your App Uses Private Cloud Compute, Build the Limit Screen First covers another screen an AI feature needs.
@AppStorage("aiSharingConsent") private var aiSharingConsent = false
func send(_ text: String) async throws -> String {
guard aiSharingConsent else { throw AppError.needsAIConsent }
return try await aiClient.complete(text)
}
Put the check at the one function that makes the network call, so a new screen added later can't skip it.
Line up your App Privacy answers
The privacy details in App Store Connect aren't part of 5.1.1 itself, but a mismatch between them and your policy is an easy thing to catch, so fix them in the same sitting. Apple defines "collect" as transmitting data off the device in a way that lets you or your third-party partners access it for longer than needed to service the request in real time. Data handled only on the device doesn't count.
You answer for code you didn't write, too. Apple's page says you must disclose data collected by third-party partners whose code is in your app, including analytics tools, ad networks and SDKs. You can update the answers at any time without submitting an app update. App Store Connect also has an optional User Privacy Choices URL, a good home for a page explaining deletion.
Test it, then answer App Review
Run this list on a real iPhone with a fresh install before resubmitting.
- Create a new account, then delete it from inside the app. Count the taps and make sure the path is obvious.
- Check your database and auth dashboard to confirm the rows and the auth user are gone.
- Try to sign in with the deleted account.
- Sign in with Apple, delete the account, and confirm the token revocation returned a 200 in your server logs.
- Repeat with an account that signed in days ago, to catch the recent sign-in error.
- Delete an account that holds a sandbox subscription and confirm the billing notice appears.
- Reinstall, then decline every permission prompt and use the app.
- Open the privacy policy link from inside the app.
When you resubmit, reply in App Store Connect and tell the reviewer exactly where to look: "Account deletion is at Settings > Account > Delete Account. It deletes the account and its data immediately." Add a screenshot or a short screen recording, and make sure the demo account in App Review Information can be used for the test. Since a reviewer may delete it, keep a second one ready or restore the demo account after each round. Why Your AI-Built App Sits in Waiting for Review (and What to Do About It) covers what happens after you resubmit.
What was checked on a Mac
Parts of this guide were checked on macOS 26.0.1 with Xcode 26.2. Nothing was sent to Apple, Supabase or Firebase, and no real account was deleted, so the server code and the Sign in with Apple exchange were not run against the real services.
The Swift code compiles. DeleteAccountButton, the subscription management snippet and the AI consent check were type-checked against the iOS SDK for iOS 15.0 and iOS 17.0 targets, in both the Swift 5 and Swift 6 language modes, with no errors or warnings. The snippets needed a small wrapper to compile on their own: the subscription code went inside a @MainActor async function, and the consent check inside a SwiftUI view with a stand-in AppError and aiClient. They were not run inside an app.
The curl commands had a stray word. As first published, both commands began curl -v POST "https://appleid.apple.com/...". curl has no POST argument in that position, so it treats POST as a second URL. Pointed at a small server on the Mac instead of Apple, the revoke command printed this before doing its real work:
curl: (6) Could not resolve host: POST
It then sent the request with the right method, header and form fields, and the stub server answered 200, so curl 8.7.1 still exited with 0. The error line is the visible part. The less visible part is that curl sends the same form data to every URL on the line, which the stub server confirmed with two URLs in one command. A URL with no scheme is treated as plain HTTP, so on a network whose DNS resolves the name POST, through a search domain for example, your client secret and refresh token would go to that host first, unencrypted. Both commands above now start with curl -v followed by the URL. The -d options already make the request a POST; -X POST also works and sent the same request to the stub server.
A missing purpose string ends the app at once. A test app that asked for photo library access with no NSPhotoLibraryUsageDescription in its Info.plist was run in an iOS 26.2 Simulator. Within 40 milliseconds of the request the app was gone, and the system log said:
This app has crashed because it attempted to access privacy-sensitive data
without a usage description. The app's Info.plist must contain an
NSPhotoLibraryUsageDescription key with a string value explaining to the
user how the app uses this data.
The Simulator's launchd recorded the exit reason as OS_REASON_TCC, and a crash report was written, which is what a reviewer would see. This matches QA1937. Because it happens in the Simulator too, you can catch a missing string before review: tap through every feature that asks for access on a fresh install, and look for that message in the Console app if the app disappears.
A prompt to audit your app
If you built the app with an AI coding tool, use the same tool to find these gaps before Apple does. Review what it reports yourself, since it can miss things.
Audit this iOS project against App Store Guidelines 5.1.1 and 5.1.2.
Do not change code yet. Report with file paths:
1. Every place an account is created, and whether in-app deletion exists.
2. What deletion removes on the server, and what it leaves behind.
3. Whether Sign in with Apple tokens are stored and revoked on deletion.
4. Every Info.plist purpose string and whether it matches current code.
5. Every SDK or API that receives user data, including AI providers,
and whether permission is asked before the first send.
6. Screens that break if a permission is declined.
7. Whether the privacy policy is linked inside the app.
If you want this kind of checking to happen on every change, the product I would point to is Claude Code + Xcode: The Production iOS Workflow Kit. It is a copy-ready Claude Code setup for SwiftUI and UIKit projects with 6 commands, 10 agents, 8 rules and a runnable Xcode sample, priced as pay what you want from $18. It won't write your deletion flow for you, but it gives Claude Code the project context and a definition of done before it edits anything.
Keep reading on JR Devhub
- Guideline 2.1 Rejection: Why Your AI-Built App Crashed in App Review
- How to Fix App Store Rejection 4.3 (Spam) When AI Tools Built Your App
- GitHub's Spec Kit Is Trending. How to Add It to an Existing iOS App and Keep App Review in the Spec
- Outlook.com Is Bouncing Mail From Domains With No DMARC Record. Fix Your App's Sign-Up Emails First
Sources
- App Review Guidelines, Apple (last updated October 16, 2026)
- Offering account deletion in your app, Apple
- Account deletion requirement starts June 30, Apple Developer News
- App Review 5.1.1(v) account deletion thread, Apple Developer Forums
- Token revocation, Sign in with Apple REST API
- Token validation, Sign in with Apple REST API
- Processing changes for Sign in with Apple accounts, Apple
- Technical Q&A QA1937, Apple
- App Privacy Details, Apple
- App privacy reference, App Store Connect Help
- deleteUser, Supabase reference
- Manage Users in Firebase, Firebase documentation
- Authenticate Using Apple, Firebase documentation
- Clear and export end-user data, Firebase

Comments