Is Your Xcode Project Leaking Secrets? A Pre-Submission Security Checklist

Check your own app — free, in about a minute.

The free mini-scan checks your live homepage for TLS/HTTPS basics, response security headers, cookie flags, exposed sensitive files, Firebase/Supabase backend rules, and the WordPress plugin versions your site exposes. You get a score and the finding titles — no account, no card.

Run the free mini-scan →

Is Your Xcode Project Leaking Secrets? A Pre-Submission Security Checklist

Short answer: probably in at least one of the usual places, because Xcode projects collect secrets in files that feel like configuration, not code — and anything that ships inside your app binary or sits in your git history is effectively public. Work through the five spots below before you submit. This is the same set of places PreShipIt's project upload scan checks automatically, but every item here is something you can verify yourself in a few minutes.

1. .xcconfig files with real keys in them

Build configuration files are where iOS projects quietly accumulate credentials: one for Debug, one for Release, values substituted into the app at build time. The failure mode is boring and common — a real API key goes into Debug.xcconfig "temporarily," the file gets committed, and the key is now in git history forever.

Why it matters even if the file never ships: values from .xcconfig files are frequently referenced into Info.plist via variable substitution ($(API_KEY)), and whatever lands in the shipped Info.plist — or gets compiled into the binary as a string — can be extracted from the .app bundle by anyone with a copy of your app. Treat every key that reaches the binary as published.

2. Hardcoded keys in Swift source

Same problem, different file. A key pasted into a Swift file as a string literal is compiled into the binary, where the strings command pulls it back out in seconds. Client apps cannot keep embedded secrets — it's an architecture fact, not a tooling gap. The fix is structural: real secrets live on a server you control, and the app calls your server with a short-lived token.

3. GoogleService-Info.plist — public by design, dangerous when unrestricted

This file contains a Google API key because Firebase needs one in the app. Its presence alone isn't a critical leak — but an unrestricted key can be called from anywhere, and Firebase project identifiers in the file hand an attacker a map of your backend. The control that matters is in Google Cloud Console: restrict the key to your app's bundle ID and to only the APIs you actually use.

4. App Transport Security switched off

If your Info.plist sets NSAllowsArbitraryLoads to true, your app can talk plain HTTP to anything — every API response readable and modifiable on hostile networks. It usually gets added to silence one failing request early in development and is never removed.

5. Dependencies you haven't looked at

Your Package.resolved pins the exact third-party code you ship. A pinned version with a known vulnerability is your vulnerability once it's in the binary.

And the one that undoes all the others: git history

Deleting a secret from the current version of a file does not remove it from history. If a real key was ever committed, rotate it — history rewriting is a cleanup, not a rescue.

Running the whole pass at once

Checking these by hand takes an afternoon the first time. PreShipIt's project upload scan runs this exact list — .xcconfig and source secrets, ATS state, cleartext URLs, SPM pins against OSV, a GoogleService-Info.plist note, and a CocoaPods inventory — as static analysis over a .zip of your project. Honest limits: it's a read of the snapshot you upload, not a build and not a runtime test, and it can't see your backend at all. The uploaded file is deleted after the scan. $49 one-time.

Related: .env exposure works the same way on the web side — a file that feels like configuration, served to anyone who asks.

The PreShipIt Brief — a short weekly email for people shipping vibe-coded apps: the week's important vulnerabilities and launch-safety checks, in plain English.

New and free. Double opt-in: we email you a confirmation link before anything else arrives. Unsubscribe any time.

Check your own app — free, in about a minute.

The free mini-scan checks your live homepage for TLS/HTTPS basics, response security headers, cookie flags, exposed sensitive files, Firebase/Supabase backend rules, and the WordPress plugin versions your site exposes. You get a score and the finding titles — no account, no card.

Run the free mini-scan →

← Back home · Run a free mini-scan · Scan my app — $29 · See a sample report