Your timers stop when the app leaves the screen, and each platform publishes its own limits for what happens next.
A JavaScript timer in a React Native app lives inside your app's process, and both platforms stop giving that process time once the app is not in front of the user. So the countdown you tested on your desk pauses when someone answers a message, and the poll you set to every minute silently stops. What replaces it is not one rule but two. Apple publishes a five second window when your app enters the background, 30 seconds for a refresh task, and minutes for a processing task the system schedules. Google publishes about 3 minutes for a short service, 6 hours in 24 for data sync, and a 15 minute floor on anything periodic. Those are different numbers for different mechanisms, and nothing on one side is evidence about the other. If you are not sure what sits under your project, start with what React Native is.
Everything below comes from Apple's, Google's and Expo's own documentation, read on 17 October 2026, with each number attributed to the platform that publishes it. Then the part that actually matters: the four patterns that work, and the three requests that cannot be built as asked.
Start hereThe short version
Never count the ticks. Store the deadline and let the system own the clock.
Almost every background bug in a handed-over app comes from code that measures time by counting its own heartbeats. Write down the moment the thing is due, in absolute time, and work out what to show whenever the app wakes up. The screen then reads correctly after five seconds in another app or five hours in a drawer, because nothing had to stay awake to keep score.
Everything the app genuinely has to do while it is away belongs to one of a small number of mechanisms the platforms publish, and each one comes with its own ceiling and its own way of killing you for going over. There is no way to buy your way past them, and no library that changes them. They are rules about processes, not about frameworks.
What happens to a setTimeout when someone leaves your app?
It stops, and not because React Native is doing anything unusual. Your JavaScript runs in a thread inside your app's process, and the operating system decides whether that process gets any processor time at all. Once the app is no longer the thing on screen, the answer is mostly no. Apple's UIKit documentation is specific about the first moment: the delegate method called as your app enters the background has five seconds to perform any tasks and return. Five seconds, in Apple's own words, is enough for most apps to do anything crucial, and after that the app is suspended.
If you need longer, you ask for it before you start the work, not when the app is already leaving. Apple exposes no public number for how much you get. It tells you to read the backgroundTimeRemaining property, described as the maximum amount of time remaining for the app to run in the background, and it is blunt about the penalty: if you do not end your tasks in a timely manner, the system terminates your app. Note what that means in practice. The user does not see a crash dialog. They see your app cold start the next time they tap it, which is the same slow first screen covered in app startup time, except now you caused it.
Google starts from a definition rather than a stopwatch. An app is running in the background, it says, if none of its activities are visible to the user and the app is not running any foreground service, and once that is true the system puts a number of restrictions on it, including that in most cases a background app cannot launch a foreground service. On the same page Google warns that ordinary asynchronous work, which is what a promise or a coroutine in your code amounts to, is not guaranteed to finish if the app stops being in a valid lifecycle stage. Both platforms are telling you the same thing in different vocabularies: work you have not explicitly handed to a scheduler does not survive the app going away.
So the honest framing for a handed-over project is this. You do not have a timer problem, you have a bookkeeping problem. Record when something is due, recompute the display when the app becomes active again, and treat any background execution as an optional extra that may or may not happen. Apps written that way need no permissions, no background modes and no review conversation, and they are the ones that still read correctly after a weekend in a pocket.
Apple, choosing background strategies for your app, read 17 October 2026
What does iOS let you run in the background, and for how long?
Apple sorts this by intent rather than by duration, and publishes a figure where there is one. To keep content up to date you schedule an app refresh task, and Apple states that the system decides the best time to launch it and provides your app up to 30 seconds of background runtime, and that you complete the work in that window and report completion or the system terminates your app. For heavy work there is a processing task, described as one that can take minutes to complete, which you schedule and the system runs during periods of low activity, Apple's own example being overnight while the device charges. For work you started in front of the user and must finish, you ask for extra runtime. For a server-driven wake-up there is the silent background push, where your app has up to 30 seconds once the notification is delivered, and Apple warns that sending them more often than three times per hour brings rate limitations.
Read that list again and notice what is missing. There is no entry for keep my process alive so a number can keep decreasing. The closest thing is a background mode, and background modes are tied to a purpose. App Store Review Guideline 2.5.4 says multitasking apps may only use background services for their intended purposes, and names them: VoIP, audio playback, location, task completion, local notifications and the like. Guideline 2.4.2 adds that apps may not run unrelated background processes, such as cryptocurrency mining. Declaring the audio background mode and playing silence so a timer keeps counting is a well-travelled trick, and it is precisely the behaviour those two lines were written to stop.
Apple did eventually ship a real answer for the specific case of alarms. AlarmKit arrived in iOS 26 and is documented as a way to schedule prominent alarms and countdowns to help people manage their time, handling authorisation and supplying its own presentation. It is worth knowing it exists before you build a workaround, with the caveat that it is a native framework with an iOS 26 floor, so your Expo project needs native configuration to reach it and older phones will not have it.
In an Expo project the deferrable side of this is wrapped for you. The background task module in the Expo SDK uses the system task scheduler on iOS and documents the consequences plainly: you may request a minimum interval, which defaults to once every twelve hours and cannot go below fifteen minutes, but the system may run the task later, and on iOS short intervals are often ignored because these tasks tend to run in windows such as overnight. The module also notes that the background tasks API is unavailable on iOS simulators and works only on a physical device, which is why no preview of any kind proves this feature works. Expo also marks the older background fetch module as deprecated, so a generated project using the newer one is on the right side of that migration.
Apple, choosing background strategies for your app, read 17 October 2026
What does Android let you run in the background, and for how long?
Android gives you more rope and more published ceilings. Google splits the ground into asynchronous work, the task scheduling APIs and foreground services, and says that in most cases the right choice for background work is WorkManager. For periodic work that library has a hard floor: the minimum repeat interval that can be defined is fifteen minutes, matching the platform job scheduler, and Google adds that the exact moment a worker runs depends on your constraints and on optimisations the system performs. On the same overview Google notes that a background task taking longer than ten minutes is highly likely to be interrupted, and suggests breaking it into smaller pieces.
Foreground services are the route for work that must happen now, and they come with a notification the user can see, which is the trade. Google puts numbers on two of them. A short service, the type meant to quickly finish critical work, can only run for a short period of time, which Google states as about three minutes, and if it does not stop itself the app receives an ANR. Separately, for apps targeting Android 15 or higher, data sync and media processing services are permitted a total of six hours in a twenty-four hour period, counted separately per type, after which the system calls a timeout method and the service has a few seconds to stop or the system throws a fatal exception. That figure is on Google's foreground service timeout page, which Google last updated on 16 October 2026, so check it before you design around six hours. Bringing the app to the foreground resets that clock. Google's own advice on that page is to use an alternative API such as WorkManager instead of a data sync service.
Then there is the part that catches people after launch, when the phone has been on a bedside table for an hour. Doze suspends network access, ignores wake locks, defers standard alarms to the next maintenance window, does not perform Wi-Fi scans, does not let sync adapters run, and does not let the job scheduler run, which Google spells out means WorkManager tasks do not run either. The system exits briefly for maintenance windows and schedules them less often the longer the device stays idle. Alarms you are allowed to fire during Doze have their own floor: Google states that neither of the allow-while-idle alarm methods can fire more often than once per nine minutes per app. For a long-idle device, Google says idle apps get network access about once a day.
Exact timing has a store policy attached, which is the one most people meet too late. Scheduling something for an exact wall clock time needs an exact alarm permission, and Google Play's policy restricts the version that is granted without a user prompt to apps whose core, user facing functionality requires precisely timed actions. The two examples Google gives are an alarm or timer app, and a calendar app that shows event notifications. Requests are subject to review, and apps that do not meet the criteria are disallowed from publishing on Google Play. If your app is a timer, this is the clean path. If your app merely has a timer in it, plan on asking for the other one, which Google says is no longer pre-granted to most newly installed apps that target Android 13 or higher on a device running Android 14 or higher, and is set to denied by default.
None of this is a React Native limitation, which is worth saying because the instinct after a week of this is to blame the framework. These ceilings belong to the operating systems and apply to any app on the device, written in anything. Choosing a different toolkit moves nothing here, so a comparison like Flutter against React Native is worth reading for other reasons and not for this one.
Check yours
What are you actually trying to run?
Tick the job. Each platform answers for itself, because the limits are published separately and they do not match.
Nothing ticked. An app with no background work at all is a perfectly normal app, and it is the only kind that never gets killed for overrunning.
So how do you build a countdown, a reminder or a poll that works?
Four patterns cover nearly everything, and three of them involve your app not running at all. The first is the deadline. Save the absolute moment an interval ends, render the difference between then and now, and recalculate when the app becomes active. React Native's app state listener tells you when that happens. This fixes the countdown, the cooking timer, the trial expiry and the cooldown badge all at once, and it needs no permission from anyone.
The second is the scheduled local notification. You tell the operating system the time and the text, and it delivers the notification whether your app is alive or not. This is the correct answer to ring at seven, your parking expires in ten minutes, and your order is ready. On Android, check the exact alarm permission situation above before you promise the word exact to anyone. On iOS, if the app really is an alarm or timer product, AlarmKit on iOS 26 and later is the purpose-built version.
The third is to move the clock to a server. Anything that has to happen at a moment you do not control, for every user, belongs somewhere that is always awake. The server decides and sends a push, and the app reacts when it next runs. This is also the only honest answer to polling every minute, because both platforms refuse that request in writing: fifteen minutes is the floor on Android, and on iOS the system picks the time and hands you up to thirty seconds.
The fourth is the deferrable scheduler, for making the next launch faster rather than for doing anything at a given time. Register one task, keep it short, make it idempotent, and assume it may be skipped. Expo documents the conditions attached to this: the battery needs enough charge or the device needs to be plugged in, and the network needs to be available, or the task simply will not execute. It also notes that killing the app stops these tasks until the app is started again, and that swiping away in the iOS app switcher fully terminates the app while removing an Android app from recents does not, though vendor behaviour on Android varies. Build it so that a week of the task never firing is a slower first screen and not a wrong number.
The thing to hold on to is that every background capability you add has a cost after launch. A foreground service means a visible notification and battery complaints. A background mode means a review conversation. An exact alarm permission means a Play Console declaration. Each one is a line in the running bill described in what an app costs to maintain, which is a good reason to get there with the deadline pattern and a notification if you possibly can.
The same job, and the limit each platform publishes for it
| The job | iOS, from Apple | Android, from Google | Same on both |
|---|---|---|---|
| Finishing work after the user leaves | Five seconds in the delegate, then an extension with no number published | A few seconds of async work, and no guarantee it finishes | No |
| A scheduled content refresh | Up to 30 seconds per run, and the system picks the moment | Periodic work, 15 minute minimum repeat interval | No |
| The longest immediate background run | Minutes, on a processing task the system schedules for you | About 3 minutes on a shortService, 6 hours per 24 on data sync | No |
| What happens when you overrun | The system terminates your app | A timeout callback, then an ANR or a fatal exception | No |
| Work is deferred while the device is idle | Yes | Yes | Yes |
| Firing at an exact wall clock time | A scheduled local notification, and AlarmKit from iOS 26 | An exact alarm permission, restricted on the store by app category | No |
| A timer that ticks while the app is not in the foreground | No | No | Yes |
Where this lands if Newly generated the project
Nothing above changes because an agent typed the code. Newly generates a real React Native and Expo project that you own, uploads iOS builds to TestFlight, publishes to Google Play internal testing and builds a standalone Android APK, with two-way GitHub sync so the project is yours to read and change. It is $25 a month and there is no free tier. What it cannot do is lift a platform limit, because the limits are enforced by the operating system against your process after the app is installed.
Two practical consequences of being handed an Expo project rather than a bare React Native one, both worth knowing. First, the native configuration for background tasks is generated for you. Expo documents that the iOS side needs a processing entry in the background modes array and a permitted task identifier listed in the app's property list, and that with continuous native generation both are applied automatically during prebuild. You are not editing Xcode project settings by hand to turn this on. Second, Expo documents that the background tasks API does not work on iOS simulators at all, only on a physical device. A simulator run in any tool cannot show you this feature working, so the TestFlight build on your own phone is the first honest test, left overnight rather than watched for two minutes.
One more thing that is specific to generated apps, and is about review rather than about timers. Apple's guideline 4.2.6 means apps created from an app generation service are rejected unless the provider of the content submits them, so you are the one who presses submit on the App Store, and you are the one answering if a reviewer asks why your app declares a background mode. Pick capabilities you can justify in one sentence. A timer that counts on the server, or counts nothing and reads a stored deadline, is a sentence you never have to write.
Questions people ask about timers and background work
No, and you should not design around it ever doing so. A JavaScript timer runs inside your app's own process, and both platforms stop giving that process time once the app is not in the foreground. Apple's UIKit documentation says the delegate method called when your app enters the background has five seconds to perform any tasks and return, and that the app is then suspended. Google defines an app as running in the background when none of its activities are visible and it is running no foreground service, and says asynchronous work is not guaranteed to finish if the app leaves the foreground. A timer that survives a lock screen is not something either platform offers.
Describe the app, then decide what has to happen while it sleeps
Write down every moment your app has to react to, and which of them the user is present for. Most lists come back with nothing on the background side, and that is the cheapest app to run and the easiest one to get through review.
Start building