Application security feature

iOS app memory protection

Otukan reduces how long sensitive values sit readable in an iOS app's memory and detects memory reading and editing, so tokens and keys are harder to lift.

  • iOS
Tokens lifted from RAM is met at the plaintext lifetime boundary before it reaches the appTokens lifted from RAMPlaintext lifetimeYour app
  • Readable only when used

    Sensitive values stay encoded while your app holds them and become plaintext only for the moment a function needs them.

  • Reading and editing apart

    Someone copying a token and someone changing a balance need different defences. Otukan handles the two separately.

  • Proven under pressure

    Protection is accepted through backgrounding, memory warnings and termination, the moments iOS apps actually live through.

Memory threats Otukan addresses on iOS

Pick a threat to see how Otukan reduces or detects it, how the app responds and what your backend receives.

Session tokens read from RAM

  1. Detect

    Tokens you mark are kept encoded in memory and decoded only inside the call that sends them.

  2. Respond

    A dump taken between calls yields encoded bytes; if a reading tool appears, marked tokens are cleared per your policy.

  3. Report

    A reading signal names the token involved, so your backend can revoke that session.

Process memory dumps

  1. Detect

    Otukan detects the debugger attachment and task access that dumping tools rely on.

  2. Respond

    Sensitive flows close and marked values are cleared, per your policy.

  3. Report

    A dump-attempt signal travels with the next request.

Edited in-app values

  1. Detect

    Integrity checks on marked values reveal a change that did not come from your code.

  2. Respond

    Per your policy, the edited value is rejected and the action stops before it completes.

  3. Report

    Your backend learns which value was altered.

Injected reading tools

  1. Detect

    Otukan detects injected libraries and instrumentation agents that read memory from inside your process, including in a re-signed copy on a stock iPhone.

  2. Respond

    Marked values are cleared and the sensitive screen closes, as you set for the flow.

  3. Report

    An instrumentation signal names the flow and travels with the next request.

What Otukan iOS memory protection includes

Controls that shorten exposure time and notice those who try to use it.

  • Encoded values in memory

    Keeps marked tokens, keys and flags encoded while stored in your objects, and decodes them only at the point of use.

  • Memory editing detection

    Checks marked values for changes that did not come from your code, the method behind many cheats and balance edits.

  • Embedded secrets

    Protects keys and endpoints shipped inside the binary, so they are not sitting readable the moment the app loads.

  • Tool detection

    Detects debuggers, instrumentation and injected libraries that memory reading and editing depend on.

You choose the response

Set a response for each user flow. Start by observing, then tighten flow by flow as the signals prove themselves.

Observe

Signal sent to your backend

Rolling out a new policy and measuring real-world signals.

Warn

This device looks modified. Continue with care.

Conditions some genuine users create, such as developer settings.

Restrict

Payments are unavailable on this device.

Payments, stored data and account changes.

Terminate

Session closed for your security.

Clear tampering on a high-risk flow.

How it works

  1. Name the values

    List the tokens, keys and state that must not sit readable or be changed.

  2. Mark the code paths

    Identify where each value is created, used and discarded in your app.

  3. Protect and clear

    Values stay encoded between uses, and marked buffers are overwritten after each use.

  4. Accept the lifecycle

    Test on physical devices through backgrounding, memory warnings and relaunch.

Free for app publishers

Check your app's exposure

A passive review of your published app by an Otukan engineer. No files, no access to your systems. Findings go by email to the verified publisher.

You finish the request on the next page.

On iOS, the practical way to reduce exposure of sensitive values during execution is to shorten how long they exist as plaintext and to notice anyone who tries to read or change them. Otukan keeps the tokens, keys and state you mark encoded while your app holds them, decodes each one only inside the call that needs it, overwrites marked buffers afterwards, and detects the debuggers, instrumentation and editing tools that memory attacks depend on. The sandbox already isolates apps on stock iPhones; this protection matters most where that isolation has been removed. For the cross-platform view, see mobile app memory protection.

Transient secrets and plaintext lifetime

Every secret your app uses spends time in memory. The question is how long, and in what form.

Where plaintext appears

ValueWhere it comes fromWhen it is plaintext without protectionWith Otukan
Session and refresh tokensYour login responseFor the whole session, in every object that holds themEncoded between requests, decoded inside the sending call
Keys read from the KeychainKeychain queryFrom the read until the object is releasedDecoded for the operation, buffer cleared afterwards
One-time codes and PINsUser input or pushUntil the view and its model are releasedCleared once verification returns
Card or account dataAPI responseUntil caches and view models are releasedEncoded in models, decoded only for display
Game or reward stateLocal logicFor the life of the processStored with integrity checks against editing

Shorter exposure, fewer copies

Reducing lifetime is only half the job. Swift strings, collections and bridged Objective-C objects can quietly copy a value. Otukan’s approach is to keep secrets in buffers you control, decode into them for the shortest possible span, and clear them when the protected call returns. The Keychain and Secure Enclave remain the right place to store keys; key storage itself is covered on iOS app secrets protection.

Memory reading versus modification

Two different attackers target memory, and each needs a different answer.

Reading

The goal is to copy something valuable: a token to replay, a key to decrypt traffic, card data. On a jailbroken phone, a tool can obtain access to your process and dump its memory. Otukan reduces what a dump yields, because marked values are encoded between uses, and detects the debugger attachment and task access such tools rely on. When reading is detected, marked values are cleared and your backend can revoke the session.

Modification

The goal is to change something: a balance, a limit, a score, a feature flag. Editing tools search memory for a value and overwrite it. Otukan keeps integrity data for marked values and rejects a value that changed without your code changing it, so the app refuses to carry an edited balance into a transaction. Game-specific cases are covered on memory editing detection.

Matching the response to the value

Not every memory signal deserves the same answer. Reading tools near a session token call for revoking the session on your server, because the token may already be copied. An edited reward balance calls for rejecting the action and flagging the account, while the rest of the app keeps working. A dump attempt during onboarding may only need recording. Otukan lets you set these responses per flow, and the signal names the value involved so your backend can act precisely rather than end every session.

Application workflow and memory-pressure validation

iOS apps are suspended, woken and terminated constantly. Memory protection has to behave correctly through all of it.

What acceptance covers

  1. Sign in and complete your most sensitive flow on a physical device with the protected, distribution-signed build.
  2. Send the app to the background mid-flow and return, confirming values decode correctly.
  3. Trigger memory warnings and confirm cleared caches do not leave plaintext behind.
  4. Let iOS terminate the app, relaunch and confirm the session restores without exposing secrets.
  5. On a jailbroken lab device, attempt a dump and a value edit, and confirm the expected signals and responses.
  6. Repeat the journeys on a stock device and confirm nothing fires.

Each run records the iOS version, device, build and reviewer. For the platform overview, return to iOS app security; walkthroughs are in iOS app security guides.

Common questions

  • Doesn't the iOS sandbox already stop other apps from reading our memory?

    On a stock iPhone, yes: one app cannot read another's memory. The risk appears when the device is jailbroken or your app runs under a debugger or instrumentation, because then a tool can read and write your process directly. Otukan shortens how long secrets sit readable and detects those tools, so the sandbox's protection is backed up where it has been removed.

  • Why not just keep secrets in the Keychain or Secure Enclave?

    You should, and Otukan builds on both. But a value read out of the Keychain becomes plaintext in your process so you can use it. A session token is in memory for every request. Secure Enclave keys never leave the chip, but they cover specific key types and operations. Memory protection covers the plaintext moments those stores cannot.

  • Can Swift strings be wiped after use?

    Not reliably. Swift strings are value types that can be copied and bridged without you seeing it, so an old copy may linger. For secrets, keep bytes in a buffer you control and let Otukan overwrite it after use. Your team marks those buffers during scoping, and acceptance checks that no plaintext copy remains afterwards.

On the mobile engineering team?

How protection fits your build, signing and release, platform by platform.

Keep secrets readable only while in use

Tell us which values your iOS app handles in plaintext, such as tokens, keys, card data or game state, and in which flows. We never ask for source code, IPA files, the secrets themselves or production credentials.

Or request a technical demo