Mobile app security basics: what a business buyer should ask for
Why the phone is not a safe place for secrets
An app is a package that people download, and it can be unpacked and inspected. Any API key, password or private setting placed in the code can be found by a determined person. Treat the phone as a place where anyone can see what you ship.
Real secrets, such as payment keys, admin credentials and third-party access tokens, belong on your server. The app calls the server with a limited login that belongs to one user, and the server uses the secrets on its behalf.
Secure storage, login tokens and sign-in
The app must remember that a user has signed in, and it does that with a token. Store the token in the platform's secure storage, which is the Keychain on iPhone and iPad and the Keystore system on Android. Keep tokens short-lived, refresh them through a separate process, and clear them at sign-out.
- Store tokens in secure storage, never in plain settings files or in logs.
- Set a sensible expiry, and ask for a fresh sign-in before sensitive actions.
- Revoke tokens on the server when a user signs out or reports a lost device.
- Offer passkeys or biometric sign-in where they suit your users.
- Use the platform's current sign-in libraries rather than writing your own password handling.
Encrypted connections and what the server must check
All traffic between the app and your server should use encrypted connections. iOS and Android block unencrypted connections by default, but an app can be configured to weaken that, so review the network settings before each release. The server must check every request as if the app were hostile, because a modified app can send anything.
- Check permissions on every API call, not only on the screens the app shows.
- Validate all input on the server, since the app's own checks can be bypassed.
- Rate limit login and other sensitive endpoints to slow down guessing attacks.
- Log requests and failures, so you can trace what happened during an incident.
Jailbroken and rooted devices
Some apps try to detect devices that have been jailbroken or rooted, because the owner of such a device can inspect an app more easily. Detection helps a little, can be bypassed and can wrongly block legitimate users. Use it as one signal at most, and never rely on it to protect data. Protect the data with the server checks described above.
Libraries, third-party code and updates
Most apps include libraries for analytics, crash reporting, payments and advertising. Each one runs inside your app with the same access, so each is part of your security surface. Keep a list of libraries, update them on a schedule and remove any you no longer use.
Ask what data each third-party component collects, and make sure your store privacy disclosures reflect it. A disclosure that misses a library is a common source of trouble at review.
What to ask your builder before you sign
A short set of questions shows whether a builder has thought about security. Ask for written answers, and make them part of the scope.
- Where are the API keys stored, and does the app ever contain a secret?
- How are login tokens stored, and how long do they last?
- Which checks run on the server for every request?
- How is the connection encrypted, and who reviews the network settings?
- Will there be a security review or an independent test before launch, and who pays for it?
How Hundred Seas helps
Hundred Seas is a product studio in Taipei that builds native iOS and Android apps, along with AI agents and custom business software. Our apps sit in front of a backend, so we design the sign-in flow and the server checks together with the app, and agree them in the scope rather than adding them later.
The scope step takes about one week at a fixed price and ends in a written plan, a clickable prototype and a firm quote. The build runs in weekly releases over two to four weeks, and a monthly run plan covers updates, library changes and the server after launch.
Questions
- Can a mobile app be fully secure?
- No software is fully secure, and a mobile app runs on devices you do not control. The practical goal is to keep valuable data and secrets on the server, limit what each login can do, and find problems early through reviews and monitoring. Ask any builder to explain the controls in plain terms, and be wary of anyone who promises perfect safety.
- Where should API keys go?
- Not inside the app, if the key can cost money or reveal data. Keep those keys on your server, which calls the third-party service on behalf of the app. Some keys are meant to be public and only identify the app, but check each provider's documentation before you assume a key is safe to ship.
- Do I need a penetration test before launch?
- For an app that handles payments, health information or personal records, an independent test is worth discussing, and some buyers require one. The cost and depth depend on the data and the risk. Ask the builder what the test covers and whether it is repeated after major changes.
- What must my store privacy disclosure show?
- The data your app and its third-party libraries collect, and how that data is used. Apple and Google each publish a form for this in their developer consoles, and their requirements change. Read the current instructions for App Store privacy details and Google Play data safety, and check each library's own disclosure.
- How often should we update libraries?
- Regularly, and quickly when a security advisory names a library you use. Keep a list of dependencies, run an update check at least monthly and test each update before release. A monthly run plan is a practical way to make this routine rather than an emergency.