After three App Store rejections, I built a pre-submit gate. Here is every check, and the bug behind each one

22 November 2026 · First published on dev.to

Last week I wrote about three App Review rejections in one week: an ATT prompt the reviewer never saw, a China publishing-license request, and an ITMS-91064 privacy-manifest error. The week did not stop there. One app then got a 4.3(a), I pulled a build out of the review queue myself, and my own testing showed a tool that "didn't work" when it actually did.

I'm one developer shipping three iOS apps (a prayer-times app in Flutter, a PDF password remover and an expense tracker in SwiftUI). Every rejection costs me a 24–48 hour cycle, so I turned each one into a line in a file called PRE-SUBMIT-GATE.md. Nothing gets submitted until every line has evidence next to it: a commit, a screenshot, or an API read-back. This post walks through the checks and the real bug behind each one.

1. The 4.3(a) nobody warns you about: your account looks like a template factory

Guideline 4.3 is "Spam". Most write-ups about it talk about reskinned template apps. My apps are not templates. The three codebases share almost nothing. But after the prayer app got 4.3(a), I sat down and looked at my three listings the way a reviewer would. I didn't like what I saw:

  • Same screenshot template for all three apps: grey background with a diagonal band, dot grid, one huge uppercase word with a yellow underline, iPhone frame, floating UI cards.
  • Same description skeleton: uppercase section headers, bullet lists, and the same phrases ("one-time purchase, not a subscription", "no account", "stays on your device").
  • Identical sentences in review notes ("Restore Purchases is on the paywall and in Settings…").
  • All three submitted within 8 minutes from a brand-new developer account.

None of these is a problem on its own. Together they make a fingerprint. And once a reviewer flags one app on your account, they are likely to look at the others.

Then I searched the top 10 results for my PDF app's main keywords. One competitor's description already said almost word for word what I had listed as my differentiators: on-device, no subscription, Share → Unlock PDF, "you need to know the password". So my "WHAT IS DIFFERENT" section described the whole category, not my app.

What I changed

  • I pulled PDF Unlock 1.1.2 out of the queue while it was still "Waiting for Review". Cancelling the submission doesn't reject anything. The version just goes back to an editable state and the in-app purchase returns to "Ready to Submit". That cost me a day. Shipping a listing I already knew was weak would have risked much more than a day.
  • I rewrote the listing around the feature that is actually rare: bank statements and payslips that arrive every month locked with the same password. The subtitle became Auto-Unlock Monthly Statements, and the description opens with the password vault, the auto-unlock folder and smart file naming. Those features existed in the code but sat at the bottom of the listing.
  • Review notes now open with WHAT IS DIFFERENT. The section admits that other apps unlock PDFs on-device too, then names what this one does that they don't. It ends with a 60-second test path and a sample password-protected PDF as an attachment.
  • No shared boilerplate between apps. Each app gets its own first three lines, subtitle and first three screenshots.

Gate line: First 3 lines of the description, the subtitle and the first 3 screenshots state something real and specific to this app. No sentence is shared with my other apps. Review notes start with WHAT IS DIFFERENT. Two apps never go out on the same day.

I'll be honest: I broke that last rule this weekend. The expense tracker had been in the queue since the 18th, and I replaced it with a much stronger build on the same day the PDF app went back in. I'm telling you because the rule exists for a reason, and I'll find out whether that was a mistake.

2. "Add Password doesn't work": the bug that wasn't a bug

While testing on my own phone, I added a password to a PDF, opened the file in the Files app, and… no password prompt. I also tried "Allow Print & Copy". Still couldn't print.

I verified the output with Core Graphics (the same framework Files and Quick Look use). The protected file was AES-128 encrypted and wouldn't open with an empty password. The print-and-copy file had both permissions set to true. The encryption was fine.

The real problem: every tool writes a new file (-protected.pdf, -unlocked.pdf) into the app's own Files tab, and leaves the original in iCloud Drive unchanged. The result screen never said so. To a user, and to a reviewer under guideline 2.1, a tool that seems to do nothing looks broken.

The fix

  1. The result screen now says it plainly: "A new copy is saved in the Files tab. Your original file is not changed." It also offers Save to Files and Share buttons.
  2. An optional Replace Original button, behind a confirmation. It only appears for files picked with the system document picker that the app can actually write to. A file that came in through "Open in" or the share sheet is already a copy, so replacing it would change nothing the user can see.
  3. The replace is coordinated with the file provider. Then it reads the file back and compares bytes, so we never claim success we didn't verify:
func replace(with result: URL) -> Bool {
    guard let new = try? Data(contentsOf: result), !new.isEmpty else { return false }
    let scoped = url.startAccessingSecurityScopedResource()
    defer { if scoped { url.stopAccessingSecurityScopedResource() } }

    var err: NSError?
    var ok = false
    NSFileCoordinator().coordinate(writingItemAt: url, options: .forReplacing, error: &err) { dst in
        // Atomic first. Access granted to the file but not its folder can refuse that,
        // so fall back to writing the bytes over it directly.
        ok = (try? new.write(to: dst, options: .atomic)) != nil
          || (try? new.write(to: dst)) != nil
    }
    guard ok, err == nil else { return false }

    var read: Data?
    NSFileCoordinator().coordinate(readingItemAt: url, options: .withoutChanges, error: &err) { src in
        read = try? Data(contentsOf: src)
    }
    return read == new
}

The atomic-then-direct fallback is there because of how security-scoped access works. When the user grants access to one file, you may not have access to its folder, and an atomic write needs the folder to create the temporary file.

While I was in there I found a second silent failure. The in-app viewer showed a blank page for encrypted files instead of asking for the password. Same category of bug: no error, no feedback, just nothing.

Gate line: For every tool, the result screen says where the output file is and whether the original changed. Opening the output outside the app (Files, Quick Look) does exactly what the screen promised.

3. The launch crash, revisited: don't fail the build, fail safe

In part 1, I described a TestFlight build that crashed on launch with GADInvalidInitializationException. The Google Mobile Ads SDK checks GADApplicationIdentifier in Info.plist at launch, even if you never start the SDK, and my archive carried an empty ID. Three archives in a row had this problem.

I've since refined the fix. Failing the build is right for a malformed ID. But I also want a Release build without the real IDs (a fresh clone, CI) to run and simply show no ads. The xcconfig does that with a default value:

// Real IDs live in a gitignored Ads.local.xcconfig.
ADMOB_RELEASE_APP_ID =
ADMOB_RELEASE_NATIVE_UNIT_ID =
#include? "Ads.local.xcconfig"

// Never empty: without a real ID, Release carries Google's sample app ID
// only to pass the SDK's launch check. The unit ID stays empty, so the app
// treats ads as "not configured" and never starts the SDK, UMP or ATT.
ADMOB_APP_ID = $(ADMOB_RELEASE_APP_ID:default=$(ADMOB_TEST_APP_ID))
ADMOB_NATIVE_UNIT_ID = $(ADMOB_RELEASE_NATIVE_UNIT_ID)

// Debug always gets Google's test IDs, whatever the local file says.
ADMOB_TEST_APP_ID = ca-app-pub-3940256099942544~1458002511
ADMOB_APP_ID[config=Debug] = $(ADMOB_TEST_APP_ID)

A Run Script phase still fails the build if ADMOB_APP_ID isn't shaped like ca-app-pub-…~…, and fails a Debug build that carries anything but the test ID.

Gate line: Install the archived Release build (not Debug) on a clean simulator, launch it 3 times, no crash. Check that the real AdMob app ID is in the archive's Info.plist. Debug builds hide this whole class of bug.

4. Debug builds must never talk to production analytics

My Firebase numbers were already polluted, though not by me. On the Android versions of my apps, about 66% of devices in Firebase over 28 days were Google Play's automated pre-launch test devices, not people. Data like that makes funnel decisions worthless. I wasn't going to add my own simulator runs on top.

So each iOS app keeps two plists outside the synced source folder, Config/Firebase/GoogleService-Info-Dev.plist and -Prod.plist (both gitignored), and a build phase copies exactly one into the bundle:

  • Debug copies only Dev and never falls back to Prod. If the Dev file has the same GOOGLE_APP_ID as Prod (someone copied it to "make it work"), the build fails.
  • If the file is missing, nothing is bundled and Firebase stays off. A Release build without Prod still builds, with a warning.
  • Crashlytics dSYM upload runs only when archiving Release with the Prod config.

The ads side follows the same rule: Debug always uses Google's test units.

Gate line: The archive was built from a clean worktree, with the Prod Firebase plist and real AdMob IDs, and no developer flags. Read the TestFlight build state back through the API (VALID) before attaching it to a version.

5. The full gate

This is the checklist, condensed. Every line exists because of a real rejection, crash or near-miss.

Things that already bit me

  • ☐ Release archive launches 3× on a clean simulator; real ad app ID present in the archive's Info.plist
  • ☐ ATT prompt appears on a fresh install right after onboarding, including the "Open in" path, a failed UMP load, and iPad. It doesn't depend on ads or Remote Config
  • ☐ NSPrivacyTracking matches the App Privacy answers; if it's true, NSPrivacyTrackingDomains is not empty
  • ☐ Content that needs a license somewhere (e.g. religious or book text in China mainland) → that territory is removed
  • ☐ 4.3: specific first lines, subtitle and screenshots; no shared boilerplate; WHAT IS DIFFERENT first in review notes; not on the same day as another app
  • ☐ Every tool tells the user where its output went and whether the original changed

Rules Apple commonly enforces

  • ☐ 2.1: no placeholder or "coming soon" screens, no debug menu in Release
  • ☐ 2.3.1: every sentence in the listing, screenshots and review notes is backed by code in this exact build
  • ☐ 3.1.x: prices come from StoreKit; Restore exists; Terms and Privacy links on the paywall and in Settings; the IAP is submitted with the build
  • ☐ 5.1.1: every permission has an accurate purpose string, is asked in context, and the app still works if it's denied
  • ☐ 5.1.2: App Privacy matches the SDKs you actually ship
  • ☐ Support email in the app actually receives mail
  • ☐ Review notes give a 60-second test path for each main feature, plus a sample file if one is needed
  • ☐ AX3 text size, light/dark mode, VoiceOver, iPad, Arabic RTL
  • ☐ Server side is ready: CloudKit Production schema has every field this build uses; Remote Config is set for review

Before pressing Submit

  • ☐ All tests pass (StoreKit tests run separately; they flake when run with the full suite)
  • ☐ The TestFlight build has run on a real iPhone at least for the main flow. If not, write down the risk
  • ☐ After submitting, read it back: version Waiting for Review, correct build, IAP attached

Both apps are in App Review again as I write this. I'll post a follow-up with the outcome, whatever it is.

Which line would you add? I'm especially curious whether anyone has a reliable way to check 4.3 risk before submitting, other than staring at your own listing as if you were a hostile reviewer.

The apps in this post: PDF Unlock and Plainspend, both coming soon on the App Store. On Android, Money Manager and Photo Cleaner are on Google Play. More notes on the engineering page.