Engineering

Mobile SDK protection

How SDK providers protect their code inside other companies' Android and iOS apps with Otukan: obfuscation, self-checks and signals, host-safe.

  • Android
  • iOS
  • Your code, protected

    Otukan obfuscates the internals of your SDK while the public interface host developers call stays exactly as documented.

  • A good guest

    Your SDK protects itself without taking over the host app. Decisions that affect the whole app stay with the host.

  • Signals to your backend

    Runtime findings travel with your SDK's own server calls, so your service decides without needing the host's cooperation.

What Otukan protects in an SDK

Protection sized for code that runs inside someone else's app.

  • Internal obfuscation

    Renames and reshapes the classes, strings and logic behind your API, leaving the documented entry points untouched.

  • SDK self-integrity

    Checks that your SDK's own code and resources are the ones you shipped before sensitive operations run.

  • Scoped runtime checks

    Looks for hooking, debugging and emulation when your SDK's sensitive calls run, and reports only what concerns your SDK.

  • Per-version mappings

    Each protected SDK release comes with a private mapping, so crash frames from host apps can be translated back.

How SDK protection works

  1. Draw the boundary

    We agree which code, data and decisions belong to your SDK and which to the host.

  2. Protect the release

    Your SDK build is protected inside your existing pipeline, with its public interface preserved.

  3. Test in hosts

    Sample host apps exercise the protected SDK across the configurations your customers use.

  4. Publish and version

    You publish to your usual repository and keep the mapping for that version.

An SDK provider protects code inside third-party host apps by hardening what it owns and leaving the host’s decisions to the host. Otukan obfuscates your SDK’s internals while its public interface stays as documented, checks that your SDK’s code has not been altered, watches for hooking, debugging and emulation around your SDK’s own calls, and sends findings to your backend with your SDK’s normal traffic. It does this for SDKs shipped to Android and iOS host apps. What your SDK cannot control is the host’s signing, its other libraries and whether the whole app shuts down; this page sets out that boundary.

Boundary

What your SDK owns and what the host owns

An SDK runs inside a process it did not build, signed by a company it does not control. Clear ownership keeps protection effective and keeps host developers willing to ship your update.

AreaYour SDKThe host app
Internal code and stringsObfuscated by OtukanCannot read them in clear form
Public interfaceKept stable and readableCalls it as documented
Integrity of SDK codeChecked by the SDK itselfNot involved
App signing and store releaseNo controlSigns, submits and rolls out
Response for the whole appReports the findingDecides whether the app reacts
Server-side decisionsYour backend decides on your serviceIts backend decides on its own service

Secrets deserve a word of their own. An API key embedded in an SDK can be read from any host app that includes it, however well the code around it is protected. Otukan protects code and strings that must ship; credentials that grant real access belong on your server, issued per host or per session.

Distribution

Packaging

Android SDKs usually ship as an Android Archive and iOS SDKs as an XCFramework, each published to the repository your customers already pull from. Otukan protects the SDK before you publish, inside your existing build and release pipeline, and your signing keys stay with you. Host developers add the protected SDK exactly as they added the unprotected one.

Host compatibility

Host apps apply their own build steps to your code. On Android, a host with minification enabled runs R8 across every library, including yours, so your SDK ships consumer keep rules that stop the host from renaming its public interface. Otukan’s protection respects those rules. On iOS, an XCFramework built with library evolution enabled ships a stable module interface that hosts can build against with the same or a newer Swift compiler, and Otukan’s protection keeps that module interface intact.

Otukan tests the protected SDK in sample host apps that reflect how your customers build: with and without host minification on Android, across the Xcode versions your customers use on iOS, and alongside other common SDK categories such as analytics and payments.

Versioning

Each protected SDK version is a separate release with its own private mapping. Host companies update on their own schedule, so several SDK versions run in production at once. Keeping a mapping per version, and recording which version a host runs, lets your support team translate crash frames from any of them. Protection changes ship like any other SDK change, in a new version with release notes host developers can read.

Runtime controls

What works without the host

Some controls live entirely inside your SDK. Obfuscation protects your logic whatever the host does. Self-integrity checks confirm your own code and resources before a sensitive operation. Runtime checks around your SDK’s calls look for hooking frameworks, debuggers and emulators. Findings travel to your backend with your SDK’s own requests, so your service can refuse a request from an altered environment without asking the host for anything.

What needs the host’s cooperation

Other behaviour affects the whole app and needs the host’s agreement. Ending the app, blocking a screen outside your SDK or changing the host’s sign-in flow are host decisions. Otukan’s approach is for your SDK to decline its own sensitive operation, report the finding, and expose it through your API so the host developer can choose a wider response. Checks on the app’s signing certificate also need care: on Android the host’s certificate, or the one Google applies with Play App Signing, is what devices receive, and on iOS the host’s team re-signs your embedded framework. Otukan’s engineers agree with you which of those facts your SDK should rely on.

Setup detail sits in the SDK security integration guides. For how Otukan fits a build, see mobile app security integration. For app-level protection, return to mobile app security. For a structured way to evaluate options, see the SDK protection solution guide.

Common questions

  • Can an SDK terminate the host app when it detects an attack?

    Technically yes, but it should not decide that alone. Ending the app affects the host company's users and its own flows. Otukan's approach is for your SDK to refuse its own sensitive operation, report the signal to your backend and expose the finding to the host through your API, so the host developer chooses whether the whole app reacts.

  • Will host developers need to change their build settings?

    Usually only what they already do for any SDK. On Android, the keep rules your SDK ships with protect its public interface from the host's own shrinking. On iOS, a framework built with library evolution keeps a stable module interface for hosts on the same or a newer Swift compiler. Otukan's engineers review your packaging with you so host developers follow the same integration steps as before.

  • How do we debug crashes that happen inside host apps?

    Host developers send you stack traces that show obfuscated names from your SDK. You keep the private mapping for each SDK version and translate those frames yourself, so crash analysis works without giving the mapping to anyone else. Recording which SDK version each host runs makes the right mapping easy to find.

Ship an SDK that defends itself

Tell us the platforms your SDK ships for, how host apps consume it and which logic or data inside it you most want to protect. We do not ask for source code, binaries, signing keys or production credentials.

Or request a technical demo