After a data leak you cut off the access, measure what left, then tell the people it belonged to.
In order: revoke whatever is still open, write down when you found out, work out which records actually left and whose they were, rotate every credential the app holds, notify the people affected, and only then write the post mortem. Apple puts one of those steps in its contract with you. Its Developer Program License Agreement says you agree to notify your users, in accordance with applicable law, in the event of a data breach in which user data collected from your application is compromised. What neither store asks for is a report to them. Every clause and figure below is quoted from Apple's and Google's own current documents, read on 16 October 2026.
What follows is the first hour, how to find out what really left, who you owe a notice to and by when, and what to rotate in what order. Then the detail nobody plans for: one of the two stores reserves the right to tell your users before you do.
Start hereThe short version
Containment is an hour of work. The rest is finding out what is true.
A leak has two halves and they run at different speeds. Closing the hole is fast and you should do it badly rather than late: revoke the key, close the bucket, turn the endpoint off behind a flag. Finding out what left is slow, and every number you give anybody afterwards depends on it. Teams get this backwards. They spend the first hour drafting an email and the next week discovering the email was wrong.
Two rules make the slow half survivable. Do not delete anything, because logs you wipe during clean-up are the logs you needed, and a server with no history gives you no way to bound the damage. And count records rather than estimating them. Names and addresses for two hundred and eleven people is a sentence you can stand behind. Some customer data may have been affected is a sentence that invites everyone to assume the worst.
What do you do in the first hour?
Write down the time and the source before you touch anything. The hour you became aware is the fact every deadline is counted from, and the person who told you is the person who can tell you more. A screenshot in a group chat is not a record. Put it in one document, with timestamps, and keep adding to it as you go. By the end of the week that document is the only thing standing between you and reconstructing the whole thing from memory.
Then cut off the access, choosing the blunt option over the elegant one. Revoking a key takes a minute and a careful audit of which calls used it takes a day, so revoke first. If a whole endpoint is the problem, a read-only outage you control is better than an open door you are still thinking about. Resist the urge to take the entire app down unless the app itself is the hole: an app that cannot start generates support tickets that compete for the people you need on the incident.
Keep your own credentials out of the next mistake. Apple's Developer Program License Agreement, in section 2.1, puts this on you in plain terms: you are fully responsible for safeguarding your Apple Account and authentication credentials from compromise. That matters in an incident because people start pasting keys into chat windows and sharing logins to move faster. Section 2.9 adds the other half. Any action taken by a third-party service provider you retained is deemed to have been taken by you, and you are responsible to Apple for it. A leak at your vendor is still your leak.
Finally, do not write to users yet. You have no numbers, and a notice you have to correct does more damage than a notice that arrives a day later with the correct count in it. Use the hour to decide who is doing what instead. One person owns containment, one owns the log analysis, one owns the written timeline and talks to everybody else. Three people with clear jobs beat nine people on a call.
Apple Developer Program License Agreement, last updated 13 October 2026, read 16 October 2026
Triage
What leaked, and what it costs you
Tick what you know left. Tick more than one if you are not sure yet, because the first version of the story is usually too small.
Nothing ticked yet. If you genuinely do not know what left, that is the first thing to fix, and the logs answer it faster than a meeting.
How do you find out what actually left?
From the logs, in a specific order, and before anybody theorises. Find the one request you already know about, then widen outwards from it: the same token, the same address, the same hour. Four places hold the answer in most app stacks. Your server access logs, your database audit log, your object storage access log, and your auth provider. Pull the window from a day before the earliest sign to the moment you closed the hole, and keep the raw export rather than a summary of it. The habit is the same one that works when debugging a crash: read what happened before you decide what happened.
Two mobile-specific traps catch people here. The first is the app binary. Anybody can take your shipped build off a device and read the strings in it, so a key you compiled into the app has been public since the day that version went out, and every installed copy still carries it. The second is talking to the database straight from the phone. If the client holds a per-user key, then your row rules were the only thing protecting anything, and the real question is not whether the key leaked but what that key was permitted to select. Read the policy, not the intention.
Be generous about what counts as personal data, because the law usually is. Device identifiers, push tokens, IP addresses and whatever you derived from them are in scope in most places. Free text fields are worse than structured ones: people type their allergies, their address and their phone number into a notes box regardless of what the label said. Open a handful of real rows and look. The schema tells you what you intended to collect, and the rows tell you what you collected.
The clean-up usually turns up a field nobody declared, and that is its own obligation rather than a footnote. Google Play's User Data policy requires every developer to complete a clear and accurate Data safety section for every app, and puts the accuracy of the label and keeping it up to date on the developer. The same policy tells you to handle all personal and sensitive user data securely, including transmitting it using modern cryptography, and to protect all user data with appropriate security measures. If you discover a field you never disclosed, fixing the declaration is part of closing the incident.
Google Play Developer Program Policy, User Data, read 16 October 2026
Do Apple or Google have to be told?
No. Searched on 16 October 2026, the phrase data breach appears exactly once in the whole Apple Developer Program License Agreement, and the sentence points away from Apple. Section 3.3.3(C), Disclosures to Users, says you agree to notify your users, in accordance with applicable law, in the event of a data breach in which user data collected from your application is compromised. Its own worked example is sending an email to tell them there has been an unintentional disclosure or misuse of their user data. The same section says you must take appropriate steps to protect such data from unauthorized use, disclosure or access by third parties. The agreement has plenty of clauses telling you to notify Apple about other things, from a change of address to a regulatory complaint about your app, and not one of them is about a security incident.
Google Play's User Data policy is the same answer reached a different way: it carries no breach notification duty at all. The one email address in it belongs to a different situation. If you access, use or process personal information that Google made available to you and that originated in the European Economic Area, the United Kingdom or Switzerland, you have to implement appropriate organizational and technical measures to protect it against loss, misuse and unauthorized or unlawful access, disclosure, alteration and destruction, and monitor your own compliance regularly. If at any time you cannot meet those conditions, or there is a significant risk you will not, the policy says you must immediately notify Google by email and either stop processing that information or take reasonable and appropriate steps to restore an adequate level of protection. That is about losing the ability to comply, not about reporting an incident, and it only bites on personal information Google handed you.
So the clause that actually sets your deadline is the one inside Apple's sentence: in accordance with applicable law. In the European Union the GDPR gives you seventy two hours from becoming aware to notify your supervisory authority where feasible, and requires telling the affected people themselves without undue delay when the risk to them is high. United States rules are set state by state and the thresholds differ. This is the point in an incident to pay a lawyer rather than read a forum thread, and the hour you wrote down at the start is the number they will ask for first.
There is one more party who may decide to speak. Section 5.4 of the same Apple agreement says Apple may notify end users of products signed with Apple Certificates when it believes that is necessary to protect the privacy, safety or security of end users, or is otherwise prudent in Apple's reasonable judgment. You do not get a veto on that. Writing your own notice early is partly about being the first version your customers read.
As for the notice itself, keep it boring and specific. What happened, when it started and when it stopped, exactly which fields were exposed, how many people, what you have already done, what they should do now, and one address that reaches a human. Name the thing. An incident involving a third-party provider is a sentence that tells a reader you are hiding something, and it is usually also untrue, because Apple's section 2.9 already made your provider's actions yours.
Apple Developer Program License Agreement, sections 3.3.3(C) and 5.4, read 16 October 2026
What do you rotate, and in what order?
Revoke before you rotate, and work inwards from the data. A fresh key protects nothing while the old one still answers, so the first action on every item is killing the old value, and issuing the replacement is the second. Then order by distance from the records: the database first, then the keys your server holds, then anything a client could be holding, then your users' own sessions. Pick one person to do it and have them tick items off a written list, because the item everybody assumed somebody else had done is the one that is still live in a month.
Code signing is the part worth reading before you need it. Section 5.4 of Apple's agreement says you may revoke Apple Certificates issued to you at any time, and that for Pass certificates and for macOS applications distributed outside the App Store you can ask Apple to revoke them by email. It also lists when Apple will act without being asked, including your certificates or their corresponding private keys having been compromised, or Apple having reason to believe your products adversely affect the security of Apple-branded products or any other software, data, systems or networks. Apple publishes its certificate policy and practice statements on its certificate authority pages. Your Google Play signing setup is the opposite case: do not improvise there, ask Google, because it is not a self-service rotation.
| What leaked | Where the rotation happens | Needs a new app build | Users have to act |
|---|---|---|---|
| A key only your server holds | Your host environment, then a redeploy | No | No |
| A secret compiled into the app | Revoke it on the server side first, then ship a build | Yes | No |
| Database credentials | At the database, then a redeploy | No | No |
| Passwords or password hashes | Force a reset and invalidate what you still hold | No | Yes |
| Sessions and refresh tokens | Your auth provider, every session in one go | No | Yes |
| An Apple Certificate or its private key | Revoke it, then reissue and rebuild before you ship | Yes | No |
Notice how much of that column is a No. Most of a leak is fixed on your own servers, in minutes, with nobody waiting on a store. The rows that need a new build are the slow ones, and on iOS review stands between the fix and your users, the same queue you went through when publishing to the App Store. That is the argument for keeping your secrets server side in normal times, not an argument to make during an incident.
Android gives you a release lever worth using deliberately here. a staged rollout on Google Play is the right default for a normal release and the wrong one for a security fix: holding the patched build at a small percentage leaves most of your users on the version with the hole in it. Push a security release wide, and keep the staged rollout for the feature work that follows it.
Then the uncomfortable one. If the leaked credentials belonged to an agency, a contractor or an old team account, rotation is not the end of it, because the account itself is the exposure. Moving the app onto a developer account you control is the only clean end state, and transferring an app to another account is a defined process rather than a favour you have to negotiate. Apple's section 2.9 is the reason to bother: whatever that provider did counts as something you did.
Where this lands if a builder generated your app
Nothing in any of the above changes because an AI wrote the code. You hold the developer account, you signed the agreement, and the notice goes out over your name. The thing that does change is whether you can read the code that leaked. An incident you cannot read is an incident you cannot close, and that is the question to ask any builder before you need the answer.
Newly is an AI app builder. You describe an app in plain English and it writes a real React Native and Expo project that you own, with two-way GitHub sync, so the files are in your repository and the query that exposed the rows is one you can open and fix. It uploads iOS builds to TestFlight, publishes to Google Play internal testing and builds a standalone Android APK. It does not submit to the App Store for you, which is not a gap: Apple requires the content owner to submit, and section 2.9 of the agreement says in as many words that you may not use a service provider to submit an application or use TestFlight on your behalf. It is $25 a month, with no free plan.
Where a new app starts is the useful part. Local-first, data on the phone, no accounts and no server, which is an app with no leak surface worth the name. The surface arrives the moment you ask for accounts, shared data, syncing or payments, because the agent then adds a backend: sign-in, an API service, a Postgres database per environment and file storage. That is the day to write down where your secrets live and who can rotate them. The honest limit is that generating an app does not give you an incident plan, and no tool can, because only you know who your users are and what you promised them.
Questions people ask after a data leak
Four things, in this order. Write down the time you found out and how, because that timestamp starts every legal clock you are about to be measured against. Cut off the access that is still open, which usually means revoking a key or closing a bucket rather than taking the app down. Stop deleting things, because the logs are now evidence and a tidy server is a server with no answers. Put one person in charge of the written timeline and have everyone else send facts to them. Do not email your users in the first hour. The first version of the story is almost always too small, and a correction reads worse than a slower, accurate notice.
Write the rotation list while nothing is on fire
One page: every key the app holds, where it lives, who can revoke it, and whether killing it needs a new build. It takes an afternoon now and saves the worst day you will have later.
Start building