OpenRevive guide

Building iOS 6 apps on Apple Silicon with Theos

Build, sign, install and run an ARMv7 UIKit app on an iPhone 5 using a modern Mac, Theos and SDK 6.1.

Applies to

  • iPhone 5 (Global) · iOS 6.1.4 · iPhone5,2

You need

  • An Apple Silicon Mac with full Xcode, Homebrew, Python 3 and Git
  • A USB-connected jailbroken iPhone5,2 on iOS 6.1.4 / 10B350, with existing root OpenSSH, AppSync and appinst

Physical acceptance covers one iPhone5,2 / iOS 6.1.4 and a small UIKit/Foundation example. Complete WakeApp builds, other devices, Swift and stock signing were not tested.

We built an Objective-C UIKit application on an Apple Silicon Mac, installed it over USB, and ran it on a real iPhone 5 with iOS 6.1.4. The old MacBook was not involved in compiling, signing or deploying this example. The working combination was modern Apple Clang, Theos, a native ARMv7-capable ld64, and the iOS 6.1 SDK.

This is a recorded test from 6 November 2026, followed by a reproducible recipe. The source is in OpenRevive's Theos tools, with a complete command guide and small native example.

1. The configuration that actually worked

HostApple M4 Max, native arm64, macOS 26.6.2
Selected XcodeXcode 27.1, build 27A9275; Apple Clang 21.0.0
Build systemTheos 6e7b8c40e0f5f9f5b2377800dc1e42cd2560d24a, GNU Make 4.4.1
Linkercctools 1030.6.3 / ld64 956.6, compiled as a native arm64 host executable from this source revision
SDK and outputiPhoneOS 6.1 SDK; ARMv7 executable; minimum iOS 6.0
Physical phoneiPhone5,2, iOS 6.1.4, build 10B350
Existing phone packagesOpenSSH 6.7p1-13, AppSync Unified 116.0, appinst 2.1.1+openrevive1
Installation routeUSB → loopback iproxy → root SSH → existing appinst → removable user application

The iPhone 5's A6 can execute this ARMv7 build. A separate ARMv7s binary was unnecessary for this test. The dated result belongs to this phone and OS; it does not establish acceptance on every older iPhone or iPad.

Native Theos Probe running on the physical iPhone 5: iOS 6.1 SDK, ARMv7, and a saved app receipt

Actual native screenshot from the connected phone after the final rebuild and installation.

2. Install a separate, pinned environment

Start with Homebrew, Python 3, Git and a full Xcode selected by xcode-select. Run Theos as your ordinary user. Our installer places its own tools under ~/theos and keeps SDKs, generated packages and device credentials outside the source repository.

git clone https://github.com/OpenRevive/legacy-toolkit.git
cd legacy-toolkit
python3 tools/theos/bootstrap.py
. tools/theos/env.sh
python3 tools/theos/doctor.py

The installer obtains pinned Theos sources and submodules, installs missing make and ldid, and builds cctools/ld64 for the current Mac. The compiler runs on arm64; its output targets ARMv7. This is cross-compilation, with no Rosetta or remote compilation in the accepted workflow.

For this run, the SDK came from the three-part archive in the pinned qianjigui/iOS-sdks historical mirror, a fork of Sn0wCooder/theos-sdks. The joined ZIP has SHA-256 7457837f7fe9fce8ec41b524f877b609683edee4998b6d041940cc543b718afb, checked before extraction. That checksum identifies our input; it does not independently authenticate it as an Apple distribution. The SDK is not redistributed by OpenRevive. Copying a licensed original iPhoneOS6.1.sdk out of Xcode 4.6.x is another source route, but was not used in this test.

Set THEOS to another empty directory before setup if necessary. The script preserves and rejects an existing checkout at a different revision. Source env.sh in each shell, or retain export THEOS="$HOME/theos" in your login-shell configuration. Use an installation path without spaces.

3. Build an app with explicit legacy settings

python3 tools/theos/build.py
python3 tools/theos/verify.py

The first command builds both a UIKit application and a small diagnostic executable, creates an IPA from the staged application, and verifies the output. The example's essential settings are:

TARGET := iphone:clang:6.1:6.0
ARCHS := armv7
THEOS_PACKAGE_SCHEME :=
TARGET_CODESIGN_FLAGS := -S -Hsha1

ORTheosProbe_USE_MODULES := 0
ORTheosProbe_CFLAGS := -fno-objc-arc
ORTheosProbe_LDFLAGS := \
  -fuse-ld=$(THEOS_LEGACY_PREFIX)/bin/arm-apple-darwin11-ld \
  -mlinker-version=450 \
  -Wl,-sdk_version,6.1 \
  -Wl,-no_data_const -Wl,-no_fixup_chains

Use the complete example Makefile for the framework, resource, tool and signing-tool declarations. The 450 setting selects Clang's older form of linker arguments; the actual linker remains ld64 956.6. It allows the explicit SDK version to survive modern Clang's handling of the old SDK. The verifier requires an iOS 6.0 minimum and SDK 6.1 in the resulting Mach-O header.

The example uses manual Objective-C memory management and APIs present in iOS 6. It therefore does not need an ARC compatibility library. The signature explicitly includes SHA-1 for this legacy device; current ldid prints a compatibility warning for the hash override. No Apple Developer certificate or provisioning profile was used.

The output is examples/theos-probe/build/ORTheosProbe.ipa and examples/theos-probe/packages/org.openrevive.theosprobe_1.0.0_iphoneos-arm.deb. The verifier checks executable architecture, minimum OS, SDK metadata, primary signature hashes for every code page, dynamic-library paths and exact payload bytes in both archives. A deliberately corrupted executable failed the same signature check.

Include Default-568h@2x.png in a classic iOS 6 app to enable the iPhone 5's full-height display. Without it, our first successful launch used the older, shorter application viewport. Adding this original launch asset and rebuilding fixed the layout on the phone.

4. Install and launch over USB

The phone in this case was already jailbroken and had working root OpenSSH, AppSync and appinst. This recipe does not install a jailbreak. The earlier iPhone 5 preservation case describes that device's separate preparation.

Enumerate the current phone and read its identity before starting the forward:

idevice_id -l
UDID='YOUR_CURRENT_USB_DEVICE_ID'
ideviceinfo -u "$UDID" -k ProductType
ideviceinfo -u "$UDID" -k ProductVersion
ideviceinfo -u "$UDID" -k BuildVersion
iproxy -u "$UDID" 2225:22

Keep this loopback-only forward running. Record and verify the SSH host key through the forward bound to the intended USB device, then configure a private alias. Substitute your own private known-hosts path:

Host theos-iphone5
  HostName 127.0.0.1
  Port 2225
  User root
  HostKeyAlgorithms +ssh-rsa
  StrictHostKeyChecking yes
  UserKnownHostsFile /ABSOLUTE/PRIVATE/iphone-known-hosts

Use your existing SSH key, agent or password authentication. Automated execution requires a working key/agent or SSH askpass setup; credentials are not part of the published recipe.

python3 tools/theos/deploy.py \
  --udid "$UDID" --host theos-iphone5 \
  --ssh-config /ABSOLUTE/PRIVATE/ssh-config \
  --output .artifacts/theos-device

The deployer checks both USB and SSH identities and takes the toolkit's cooperating device-command lock. It runs the freshly built diagnostic executable, installs the IPA through the phone's existing appinst, and reads back the installed application binary. The DEB is built and verified, but was not installed in this acceptance run. AppSync registers a user application, so this path needs neither a global uicache rebuild nor a respring.

Launch uses uiopen as the mobile user with a fresh openrevive-theos:// URL. The app records that run's nonce in Documents/theos-probe.json. The deployer then checks the persistent receipt, reads the foreground bundle through SpringBoardServices, and captures a native screenshot. Its private output contains the installer log, deployment checkpoint, installed executable and screenshot. On failure, inspect that checkpoint and actual device state before retrying; installation and launch are not automatically replayed.

5. What proved the result

  • The compiler and linker executed on the modern Mac; no old Mac was contacted for the accepted build or deployment.
  • The installed ARMv7 executable matched the local application's SHA-256: 90bd3d22013db3252c9668278e6eeff12ddd49a7ef40fd9b4bbb54a0e38f5325.
  • The diagnostic executable returned OPENREVIVE_THEOS_DEVICE_OK, the expected hardware identifier, the running OS and a newly supplied nonce.
  • The application independently saved the final launch nonce, iPhone5,2, 6.1.4, SDK 6.1 and minimum 6.0 in its own Documents receipt.
  • The foreground identifier was org.openrevive.theosprobe; the final native screenshot showed the working app at 640 × 1136 pixels.
  • A second local build and installation accepted the full-height launch asset and produced a fresh app receipt.

The verified interaction was a real app URL callback. The automated run did not press the on-screen button; the receipt correctly recorded event: url and button_taps: 0. A successful installer exit alone was not used as proof of application behavior. The public acceptance record retains the build and runtime facts without device pairing data or credentials.

6. What the first attempts taught us

A modern compiler can still emit ARMv7 object files while the selected linker or SDK combination prevents a usable executable. Treat compilation, linking, signing, installation and native execution as separate checks.

Our initial attempt with the current Theos iOS 9.3 SDK archive reached TAPI parsing, then failed because libSystem re-exported a missing liblaunch.dylib. The accepted configuration uses the archived SDK 6.1 binary stubs and ld64 built without TAPI. No SDK headers or stubs were patched. Do not solve a device-linking failure by adding the host Mac's libraries.

AFC2 was unavailable on this phone, so the toolkit's AFC2 root-command route could not be used. Root SSH over the explicit USB forward worked. The native screenshot helper also made this acceptance independent of a mounted Xcode developer disk image.

This result establishes a working development loop for the small UIKit/Foundation example. Complete WakeApp builds and toolkit UI bridges have their own build systems and still need a separate migration. ARMv6, separate ARMv7s output, other devices and OS builds, stock-device signing, Swift, and ARC backports were not tested here.

7. Repeat or remove this setup

Run the build and deploy commands again to update this probe. A fresh nonce distinguishes each new launch from an older saved result. Remove Theos Probe with normal Home-screen application deletion when finished; its bundle identifier is org.openrevive.theosprobe. The deployer removes only its own temporary UUID staging directory after verified success.

Stop the task's iproxy with Ctrl-C. To remove the host environment, first remove its THEOS shell export and identify the exact directories created by this installation. Preserve any earlier Theos installation, other source work, SDKs, keys and unrelated Homebrew packages.

References: Theos macOS installation, Theos variables, cctools-port, AppSync, and the exact input revisions.

Recorded checks

iPhone 5 (Global) · 6.1.4

Device
iPhone5,2
System
iPhoneOS / iOS 6.1.4 / 10B350
Component
Theos 6e7b8c4; Clang 21; ld64 956.6; SDK 6.1; MRC ARMv7 app
Date of test record
2026-11-06
Observed
Local arm64-host build, SHA-1 signatures and archive verification; IPA installed through existing AppSync/appinst over USB SSH; installed binary hash matched; Fresh nonce in persistent native app receipt, foreground bundle check and full-height 640x1136 screenshot
Not verified
Physical button input, other hardware/OS builds, ARMv6, separate ARMv7s or Swift output; Complete WakeApp build migration, ARC backports or stock-device signing
Evidence
Dated source record · OpenRevive local build and physical-device acceptance, 6 November 2026

Devices and systems