Mobile app (Android / iOS)
Note for AI agents: This page is baseline guidance, not an exact prescription. Read it, tell your owner what applies to their project, and get their approval before you change anything. Your project's own rules take precedence. If something important for this project is missing here, suggest it to your owner.
For agents
- A mobile app is installed from a store and runs on the user’s phone. Typical class: L when published in a store (M if only private testing).
- Rule 1: read the store policies from official pages before coding and keep permissions minimal.
- Rule 2: test the release build on real devices and keep a forced-update path.
- Rule 3: store privacy forms must match what the app and its SDKs really collect.
Which class?
- M: a private or internal app, few users, no sensitive data.
- L: published in a store, accounts, sensitive data (health, spending, location), thousands of users.
- XL: millions of users, social features.
- A personal assistant app that is published and stores health or spending data is L even though assistants are listed as M.
Audit checklist
Every project
- Facts are verified from current official documentation
- What: Commands, libraries, APIs and platform policies in the project come from current official documents, not from memory.
- How to check: Open the dependency list and the platform configuration; for each non-trivial choice find the official page it relies on (link in a comment or a decision note).
- Evidence: Decision note or code comment with the official URL and the date it was checked.
- Packages come from official sources, stable versions only
- What: Packages and versions are chosen from official sources; the current stable release is used, not alpha or beta.
- How to check: Read the dependency file for pre-release tags (alpha, beta, rc, next); check each package on its official registry page.
- Evidence: Dependency file without pre-release versions.
- No secrets in code, chat, commits or logs
- What: Passwords, keys and tokens live in environment variables or a secret manager;
.envis ignored by git; the repository has only.env.example. - How to check: Check
.gitignorefor.env; run a secret scanner (for example gitleaks) over the full history; search for key-like strings. - Evidence:
.gitignoreline, scanner report with zero findings,.env.examplepath.
- What: Passwords, keys and tokens live in environment variables or a secret manager;
- Reports separate “written”, “tested” and “works end to end”
- What: Status reports say clearly whether something is written, passed its tests, or was run end to end; skipped or failed steps are stated.
- How to check: Read the last HANDOFF or release notes; look for features reported as done that have no test or run record.
- Evidence: HANDOFF lines or a test log for each feature marked done.
- Project memory files exist and are current
- What: The repository has CLAUDE.md or AGENTS.md (permanent rules) and HANDOFF.md (where we stopped), updated at the end of every work round.
- How to check: Look in the repository root for both files; compare the HANDOFF date with the latest commit date.
- Evidence: File paths and the date of the last HANDOFF update.
- Native packages are installed with the platform tool
- What: Platform-specific packages are installed with the platform’s own tool (for example
npx expo installin Expo) so versions match the SDK. - How to check: Read the dependency file and install notes; run the platform’s doctor/check command.
- Evidence: Doctor command output.
- What: Platform-specific packages are installed with the platform’s own tool (for example
+ If it has users, personal data or API keys (M)
Items for class M: see Mobile app: class M checklist.
+ If it has an admin panel, file uploads, many users or a store app (L)
Items for class L: see Mobile app: classes L–XL checklist.
+ If it targets millions of users (XL)
Items for class XL: see Mobile app: classes L–XL checklist.
Common mistakes
- Requesting broad storage or location permission when the system picker is enough.
- Native packages installed with the wrong tool, so a version mismatch crashes the app only on a real device.
- Store privacy forms filled from memory, not from what the SDKs collect.
- Tokens kept in plain preferences instead of Keychain or Keystore.
- Writing other people’s media to the phone’s gallery.
- No forced-update path, so an unsafe version can never be retired.
- Turning off certificate checks to make a test server work and leaving it.
- Testing only in an emulator.
Example projects
- Personal budget app in stores: mobile app, L, spending data.
- Habit tracker with no accounts: mobile app, M.
- Photo sharing app: mobile app, XL if millions, else L.
- Internal sales app via private distribution: mobile app, M.
- AI assistant with reminders in stores: mobile app, L.
- Fitness app with health data: mobile app, L.
- Delivery app with live location: mobile app, L.
- Language learning game: mobile app, L if accounts and purchases.
- Offline reference app with no data collection: mobile app, M.
- Kids’ app: mobile app, L, review store rules for children.
- Ride-hailing app: mobile app, XL.
- Event check-in app for staff: mobile app, M.
Sources
- OWASP MASVS (Mobile Application Security Verification Standard) — OWASP MAS
- OWASP MASTG (Mobile Application Security Testing Guide) — OWASP MAS
- Mobile Application Security Cheat Sheet — OWASP Cheat Sheet Series
- Security checklist — Android Developers
- Minimize your permission requests — Android Developers
- Request runtime permissions — Android Developers
- In-app updates — Android Developers
- Android Keystore system — Android Developers
- Provide information for Google Play's Data safety section — Google Play Console Help
- User Data policy — Google Play Console Help
- Target API level requirements for Google Play apps — Google Play Console Help
- App Review Guidelines — Apple Developer
- Privacy manifest files — Apple Developer
- App Privacy Details — Apple Developer
- Keychain services — Apple Developer
- PHPickerViewController — Apple Developer
- Pro Build Guide v1.2: compiled team practices — Pro Build Guide