◉RORK LABJP
●STEER — Since 12/5 you can choose whether a message sent while Rork is working takes effect right away or waits in the queue●EXPO 58.1 — Expo is still at expo@58.1.1 (12/2, Metro 0.88.1). Worth checking your own build before upgrading●PRICE — Intro pricing for Gemini 3.8, 3.7 and 3.6 Flash ends 12/31, 25 days out. A good time to re-estimate in-app AI costs●SPLASH — Some developers see the splash screen stay up after a reload, with taps passing straight through●SDK 27 — From April 2027, App Store Connect uploads need the iOS 27 SDK or later. Plan the switch early in the new year●DEV MODE — Before the first run on a real device, check Developer Mode on the phone and the Apple ID your build uses●STEER — Since 12/5 you can choose whether a message sent while Rork is working takes effect right away or waits in the queue●EXPO 58.1 — Expo is still at expo@58.1.1 (12/2, Metro 0.88.1). Worth checking your own build before upgrading●PRICE — Intro pricing for Gemini 3.8, 3.7 and 3.6 Flash ends 12/31, 25 days out. A good time to re-estimate in-app AI costs●SPLASH — Some developers see the splash screen stay up after a reload, with taps passing straight through●SDK 27 — From April 2027, App Store Connect uploads need the iOS 27 SDK or later. Plan the switch early in the new year●DEV MODE — Before the first run on a real device, check Developer Mode on the phone and the Apple ID your build uses
Articles/Business
⟐ Business/2026-10-21Advanced

My Launch Counter Went Up by Two on Every Launch — Why New Users' Ad-Free Grace Ended Early

New users' ad-free grace ended early because two callers each advanced the launch counter. A counter that moves once per launch, tested in Node.

launch countads3AsyncStorage11race conditionops log

✦ Premium Article

As an indie developer, I run several wallpaper apps. In one of them, new users get a short ad-free grace: no ads for their first few launches. I had set the threshold to three.

Ads started appearing sooner than that. The cause had nothing to do with the ad setup. The code that counts launches was called from both app startup and the first screen's startup, so the counter moved by two on every launch.

With a threshold of three, the counter reads 2 after the first launch and 4 after the second. The grace covered one launch, not three.

What I want to share first is that the fix lived in where the counting happens, not in any ad setting. What follows is that idea re-built for Expo (the React Native that Rork exports) and actually run on Node 22.

When "three launches" stops adding up

The arithmetic, on paper:

LaunchCounter moves by 1 per launchCounter moves by 2 (the bug)
After launch 11 (grace)2 (grace)
After launch 22 (grace)4 (ads shown)
After launch 33 (grace)6 (ads shown)
After launch 44 (ads shown)8 (ads shown)

The grace rule is only "is the counter at or below the threshold?" That rule was fine. The number fed into it was wrong.

Looking back, I spent far too long suspecting the ad logic itself. Bugs like this are quietly annoying. Nothing crashes and no error appears. New users just get a slightly colder first week than the design intended. Whether a number is right is something you only learn by going to look at the number, so that became the first line of my checklist.

Two callers, each with a good reason

On the Android version, the counter was advanced from both the app-wide startup and the first screen's startup. Each call was written for a sound reason ("we launched, so count it"), and each looks correct alone. Only the overlap was wrong.

An Expo app can grow the same shape easily:

Where the call livesHow many times it runs per launch
Module top level (runs when imported)Depends on how many times the module is evaluated
useEffect in the root layoutNormally once; twice in development with StrictMode on
useEffect in the first screenNormally once; once more each time the screen is recreated
Right after ad SDK initializationTwice, if initialization itself is called twice

Effects also re-run when Fast Refresh picks up a saved file. If you only look at numbers on your dev machine, you will not notice how production differs.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦You can find every place in your app that advances the launch counter, and measure with a test how far it really moves in a single launch
✦You will understand why an async read-add-write ends up as +1 or +2 depending on call spacing, so you can spot the same bug before shipping
✦You can drop in a counter for AsyncStorage that moves once per launch no matter how many callers it has, and test it separately from the grace rule
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

⟐ Business2026-11-21
Before you reply to a review that says the app is stuck on the splash screen, check these three clues
When a store review or support email says your app never gets past the launch screen, there are three things worth checking before you write back: which update the app is running, what you shipped just before, and whether the code that hides the splash screen is waiting on something forever.
⟐ Business2026-11-17
When Age Checks Fail on iOS 27, Sort the Errors Into Wait, Continue Without a Signal, or Fix
The three errors Apple added to the age range API in iOS 27 (onboarding not finished, ineligible account, network) still reach JavaScript without a code in expo-age-range. Here is a first implementation that sorts them into retry, no age signal, or developer bug without reading message strings, plus how to word each screen.
⟐ Business2026-10-28
If You Want to Rename an App After Release, Sort What the Store Keeps From What You Redo. Before Choosing a Name, Look at a Trademark Search
Being able to save a name in App Store Connect is not the same as being allowed to use it. Here is what Apple and Google Play documentation actually says about renaming after release, a small script that finds the old name left inside your project, and the order I check things before settling on a name.