◉ANTIGRAVITY LABJP
Articles/App Development
▣ App Development/2026-05-24Advanced

Running iOS Push Notification A/B Tests Weekly With Antigravity Agent — A Self-Improving Loop For Copy, Timing, And Segments

Drawing on years of indie iOS development across wallpaper and wellness apps, this article walks through a weekly Push Notification A/B loop powered by Antigravity Agent — the FCM bridge, BigQuery measurement, segment design, a D7 retention recovery story, and a dependency-free simulation that made me cut the number of arms and add a significance rule before declaring any winner.

antigravity464ios38push-notificationfirebase11ab-testindie-dev20admob17

✦ Premium Article

import { TerminalBox } from "@/components/article/TerminalBox";

One week I changed a single phrase in a wellness app's notification copy. Open rate went up. D7 retention went down. Reading that Monday digest, I stopped and wondered how many of the wins I had been stacking up were wins at all.

I ship wallpaper, wellness, and manifestation apps as an indie developer, and no feature moves the numbers as quickly — or punishes mistakes as harshly — as Push Notifications. One notification too many at the wrong hour can undo two weeks of retention work. Running A/B tests by hand across several apps was eating about four hours of my week, so I moved copy generation and the weekly review onto Antigravity Agent. What follows is the architecture, the failure I walked into, and how I finally measured what a winner has to clear before I call it one.

Push notification A/B testing is an old topic, but the moment you let an agent loop on it the practice changes meaningfully. The agent can suggest hypotheses no human would surface, but it has no sense of distribution discipline. If you do not build the guardrails in the right layer it will optimize for short-term open rate and quietly burn long-term retention. Everything below is shaped by that tension.

Why I Started Letting An Agent Handle The Weekly Push Loop

Running multiple wallpaper apps in parallel, push-related work kept growing. Each app needed a fresh copy hypothesis, a send time, and a careful post-send review of open rate and D7 retention. With one app this is fine. With five it is four hours every Monday.

I also do not consider wellness copy a personal strength. A small change in the ending particle of a sentence can swing open rate by something like 1.4x, and brainstorming a fresh angle every week wore me down. Once I gave Antigravity twelve weeks of A/B results and asked it to suggest the next five candidates, it began surfacing angles I would not have written. That is what convinced me to lean in.

There are two traps in delegating. First, the agent has no sense of how much volume is reasonable, so without a hard cap it tends to push more often. Second, if you let it optimize only against open rate, the punchy clickbait copy wins every time and your audience erodes quietly. I will spend the rest of the article on how I structure around both.

What Changed In My Hours

Before the loop, push-related work cost me about four hours a week. After, it is closer to thirty minutes: fifteen reviewing copy candidates, ten reading the weekly Slack digest, and five double-checking the scheduled queue. The recovered hours go into producing new wallpaper art and tuning my AdMob mediation. As an indie developer time is the single most expensive line item, so this delta matters.

The Three Layers — Copy Generation, Delivery, And Measurement

I keep three layers separate so the agent's responsibility is clear:

  1. Copy generation — Antigravity proposes five to ten weekly copy candidates by reading the last twelve weeks of A/B results and an app-specific worldview note.
  2. Delivery — A thin Cloudflare Workers bridge over the FCM HTTP v1 API, exposed to Antigravity as an MCP, takes only {segment, title, body, scheduled_at, ab_arm}.
  3. Measurement — Firebase Analytics streams into BigQuery and the agent runs read-only SQL during the weekly review.

Splitting these is deliberate. If the agent can dispatch sends directly, one bad call could blast every user simultaneously. Instead delivery always goes through propose → human approve → schedule → cron-execute.

Architecture Sketch

The iOS clients store FCM tokens in Firestore. The Workers worker has both a Cron Trigger and a webhook that Antigravity can invoke. Copy candidates are committed as YAML in a GitHub PR; I review and merge; the worker pulls the latest YAML during its scheduled run. Routing copy through GitHub means change history is preserved and a runaway agent can be physically halted by closing PRs.

✦

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
✦Concrete architecture connecting FCM HTTP v1 API with Antigravity Agent so the loop — copy generation, scheduling, measurement, next-week recommendations — runs without daily babysitting
✦Segment design grounded in real data from wallpaper and wellness apps, plus a recovery story where over-pushing dropped D7 retention by 4.8 points and how I clawed it back
✦BigQuery SQL templates and prompt patterns for weekly Antigravity reviews that compressed 4 hours of weekly work into 30 minutes
✦A dependency-free simulation over 200,000 trials showing how often the weekly winner is actually the best arm — and why cutting arms from four to two beat doubling the send volume
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

Antigravity 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

▣ App Dev2026-04-19
Building a Fully Automated iOS App Release Pipeline with Antigravity — From Screenshot Generation to App Store Review Management
Use Antigravity, App Store Connect API, and GitHub Actions to automate every step from build to App Store submission. A complete advanced guide covering AI screenshot captions, metadata optimization, and rejection analysis.
▣ App Dev2026-08-29
A Green Build Is Not Proof That Your pbxproj Edit Was Correct
When an agent edits project.pbxproj, the build stays green while resources and script phases quietly fall out. Four structural checks and an audit script that finishes in 0.1 seconds on a 1,200-file project, drawn from running iOS apps in production.
▣ App Dev2026-05-17
Where Is the Source of Truth for Billing State? Designing the ad-free Pattern with Antigravity
A billing-state design pattern proven in a long-running indie Android app: centralizing state with AdFreeManager, BillingManager, and ModalGate — designed and implemented using Antigravity IDE.