Engineering

Swift app security

Otukan fits app protection to a Swift app and its dependencies: modules, packages, frameworks and extensions, keeping your Xcode, signing and crash reports.

  • iOS
  • Swift
  • Your code, not the vendor's

    Otukan protects the modules you write, whether linked statically or shipped as your own framework, and leaves vendor binaries signed as delivered.

  • Both runtimes in view

    Swift types exposed to Objective-C are dispatched differently from pure Swift code, and Otukan protects each path in the way it actually runs.

  • Toolchain upgrades included

    Each new Xcode and Swift release is part of acceptance, so a compiler change is tested before it reaches production.

What Otukan brings to a Swift codebase

Controls scoped to how Swift compiles, links and runs on iOS.

  • Swift metadata hardening

    Makes type names, mangled symbols and reflection metadata in your modules far less informative, keeping the names Codable, storyboards and reflection need.

  • Embedded value protection

    Encodes the string literals and constants you mark, such as endpoints or configuration keys, so they do not sit readable in the binary.

  • Interception signals

    Detects hooks on sensitive Swift functions, including those exposed to the Objective-C runtime, and reports the function affected.

  • Integrity across modules

    Checks that the executable, your frameworks and chosen extensions still match the build you signed.

How it works

  1. Inventory the targets

    List app, framework and extension targets, and how each dependency is linked.

  2. Mark what matters

    Choose sensitive modules, functions and values; reflection-dependent types keep their names.

  3. Protect in your pipeline

    Protection fits your existing build and release pipeline, and signing keys stay with your team.

  4. Prove with a crash

    Force a test crash in the protected build and confirm it symbolicates with the build's dSYM.

  5. Repeat per toolchain

    Rerun acceptance whenever Xcode or the Swift compiler changes.

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.

Application protection fits a Swift app by following how the app is built: which code is compiled into your executable, which ships as your own frameworks, which arrives signed by a vendor, and which runs in app extensions. Otukan protects the Swift you write and the dependencies linked into it, hardens the metadata Swift leaves in a binary, and adds runtime checks for the paths where Swift and Objective-C meet. Vendor binaries stay as delivered. Everything is accepted on physical iPhones with your toolchain and your crash reporting. Objective-C-heavy code has its own page, Objective-C app security.

Native binary and framework coverage

A Swift app is rarely one binary. How each dependency is linked decides where it ends up and who can protect it.

Dependency formWhere its code ends upHow Otukan treats it
Your app targetThe main executableProtected, including the Swift metadata of your types
Swift packages built from sourceLinked statically into the target that imports themProtected with that target, like your own code
Your own dynamic frameworksA separate signed binary in the bundleProtected, keeping the public interface other targets call
Vendor XCFrameworks and binary packagesA separate binary signed by the vendorLeft as delivered, so its signature stays valid
Code shared with extensionsUsually an embedded framework loaded by bothProtected once and covered wherever it loads

What Swift leaves readable

Swift keeps more in the binary than many teams expect. Type descriptors carry type names. Mangled symbols encode module, type and function names. Reflection metadata lists stored property names so Mirror and debuggers can use them. String literals sit in plain form. Otukan hardens this surface in your modules and keeps the parts features rely on: Codable keys, @objc names used by storyboards and anything you declare as reached dynamically.

Objective-C interoperability and extensions

Most Swift apps still talk to the Objective-C runtime. Any class that inherits from NSObject, and any member marked @objc, is registered there and dispatched by message. Members marked @objc dynamic are dispatched through that runtime even when called from Swift.

Two dispatch paths, two kinds of hook

Pure Swift calls are resolved statically or through type tables, so an attacker has to patch code or rebind symbols to intercept them. @objc members can be swapped through the Objective-C runtime with a few lines of code. Otukan watches both paths for the functions you mark as sensitive and reports which one was used. Detection detail is on iOS hooking detection.

App extensions

Widgets, notification service extensions and share extensions are separate executables with their own entitlements and tighter memory limits. They often reach the same Keychain access group and App Group container as the app. Otukan covers the extensions you choose, and acceptance confirms that each protected extension runs within the memory limit iOS gives it.

Compiler compatibility, signing and crash diagnosis

Toolchain changes

Swift’s compiler changes how it lays out metadata and optimises code from one Xcode release to the next. Otukan treats a toolchain upgrade as a trigger for acceptance: the protected build is rebuilt, run on physical devices and compared with the unprotected one before your team adopts the new Xcode for release.

Build settings worth reviewing

A few Swift settings change what the binary exposes, and your team should know how they interact with protection. Whole-module optimisation changes which functions are inlined and which remain as separate symbols. Library evolution, used when you ship a framework to other teams, keeps extra metadata so clients stay compatible across versions. Reflection metadata settings decide whether Mirror can read property names. Otukan reviews these settings with your engineers during scoping, so the protected build keeps the behaviour your modules rely on and hardens everything else.

Signing

You archive and sign exactly as today. Protection fits your existing build and release pipeline, and your distribution certificate, provisioning profiles and private keys stay with your team. Each embedded framework and extension keeps its own valid signature after protection.

Crash diagnosis

A protected build produces dSYM files that match the binaries you ship. Your team forces a crash in a test build, confirms it symbolicates to original Swift function names, and confirms async stack frames still read correctly. Protected crash reports then flow into your existing tooling unchanged.

Return to iOS app security for the platform view, and see iOS app security guides for step-by-step material.

Common questions

  • Swift compiles to machine code. Why does it need protection?

    Machine code is harder to read than bytecode, but a Swift binary still carries type descriptors, mangled symbol names, field names for reflection and every string literal. Together they tell an analyst which type handles payments and which function checks a licence. Otukan reduces that readable surface in your modules and adds runtime checks so changes to the running app are noticed.

  • Do Swift packages get protected too?

    Swift packages are usually linked statically into the target that uses them, so their code ends up inside your executable or framework and is protected with it. Binary packages that arrive as a vendor XCFramework remain separate signed binaries, and Otukan leaves those as delivered unless you own them.

  • Will Codable, storyboards or reflection break if names change?

    Only if a name that is read at run time changes, which is why Otukan keeps those names. Codable uses property names as keys unless you define coding keys, storyboards find `@objc` classes by name, and code that calls `NSClassFromString` or `Mirror` reads names directly. Otukan keeps what these features read, hardens the rest, and acceptance runs your real screens on physical devices to confirm behaviour.

Related

Ship Swift that gives nothing away

Tell us your Xcode and Swift toolchain, how dependencies arrive (packages, XCFrameworks or vendored code), which extensions you ship and how crash reports are collected. We do not need your source, your IPA, your signing identities or any production credentials.

Or request a technical demo