You made it to the finish line: your app is ready for the App Store. And then Apple rejects it over something you didn't even know about. Since June 2022, if your app lets users CREATE an account, it must also let them DELETE it from within (rule 5.1.1 v) — and deactivating doesn't count. The advice going around social media to \"comply fast\" (hiding the user's data) is a double trap: it violates Europe's GDPR and California's CCPA, and Apple rejects it anyway. Here's the only correct way to do it: truly delete the personal data without breaking your database, with the button where Apple requires it, a ready-to-paste prompt, and how to handle the subscription case so you don't lose money along the way.
The moment is always the same and it always hurts: you finish your app, submit it for App Store review… and it gets rejected over rule 5.1.1. It catches you off guard because the AI, while building, focuses on the flow to create an account and use the app — it almost never thinks about the flow to delete it. It's a legal and an Apple requirement that you have to ask for yourself, explicitly, before publishing.
Here's the balance that actually works. The real technical problem is: if you delete the user "the brute-force way," your database breaks (their orders, comments, etc. end up pointing to a user that no longer exists). The professional solution: you truly delete the personal data (name, email, photo, phone) but you leave an anonymous shell in its place so the relationships don't break. The personal stuff is gone forever; your database integrity stays intact.
This prompt asks your AI for everything needed to comply with the rule and the law, without breaking your database. Copy it and paste it in:
Implement account deletion for my app, complying with Apple's rule 5.1.1 and GDPR/CCPA. My stack: [tell it your stack, e.g. Supabase + Next.js]. 1. Create the "Delete my account" button inside Settings, easy to find. 2. Before deleting, show a clear confirmation (this is irreversible) and, if you want, ask to verify identity (a code via email/phone). 3. Do a SOFT DELETE with irreversible ANONYMIZATION of the personal data: name, email, photo, phone. Don't hide them: replace them with anonymous values (e.g. "deleted user") or NULL. 4. Leave a shell so the foreign keys don't break (their orders/comments must not blow up). 5. Delete the identity in the auth system too (e.g. Supabase Auth admin deleteUser), not just in my table. 6. If the user has an active SUBSCRIPTION, warn them BEFORE deleting and tell me how to handle the cancellation so you don't keep charging them or lose the billing record the law requires you to keep. 7. Log in an audit trail that the account was deleted (without personal data) in case the law requires proof. Give me the migration, the anonymization function and the button component, and explain in simple steps what each part does.
Join 4,200+ builders. No credit card. Build your first app with AI in minutes.