Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iPhone OS 1 SDK Generator

This is a work-in-progress compatibility SDK reconstruction tool for iPhone OS 1. Contributions are welcome, as the headers in this SDK do not fully correspond to what is actually present on iPhone OS 1.

Warning

This project does not include Apple's SDK files. Users must provide their own copies of any required SDK components.

Warning

This project is not affiliated with Apple and should not be treated as such. No claim is made over Apple trademarks or SDK components.

A brief history

iPhone OS 1 never had official third-party app support. Since all apps were first-party, Apple never published a public iPhone OS 1 SDK. The first iPhone OS (iOS) SDK came out for iPhone OS 2 with the release of the App Store, allowing third-party developers to publish apps. Every major release version since then has had a public SDK available for developers.

That brings a question - how were old .PXL apps developed for iPhone OS 1? This was done by mangling together the Mac OS X SDK with custom headers at the time, allowing for a workable SDK that allowed apps to be made.

This project aims to simplify the process of the creation of that SDK. For convenience, shim .tbd files are provided in order to link correctly.

How does it work?

Instead of bundling binaries straight from iPhone OS 1, this tool follows the same approach that modern Theos SDKs take. We use the .tbd format to provide linker interfaces without providing actual binaries. This saves quite a bit of space. They can be generated using my fork of tbd if necessary (additional info found here).

We then do have to mangle together headers, since those were never available for iPhone OS 1. The tool takes headers from the user-downloaded Mac OS X 10.5 Leopard SDK and the iPhone OS 2 SDK and mangles them together (with known exceptions accounted-for) in order to produce a working iPhone OS 1 SDK.

We also include manually written and reverse-engineered compatibility headers to fill missing or incomplete interfaces required for compilation.

Additionally, we use the csu runtime files by Patrick Walton from the iphone-dev project, licensed under GPL v2. This is required for built binaries to run correctly on the device without running into bus errors.

This, by all means, is not a perfect solution. For example UIColor, present since iPhone OS 2, does not seem to be present in the iPhone OS 1 SDK. However, the header will still get copied. This can theoretically be solved using .patch files to fine-tune the headers for iPhone OS 1. Again, contributions are welcome!

How do I use it?

Make sure Python 3 is installed on your system.

Clone this repo:

git clone <TODO>
cd iPhoneOS1-SDK

Make sure you see the generate.py file, the include folder, and the shim_sdk folder.

You, as the user, are responsible for providing the iPhone OS 2 and Mac OS X 10.5 SDK files for this tool.

Running the script

We will now run the script to generate the SDK. The script requires the following inputs:

  • --include-path: Local header overrides
  • --osx-sdk-path: Mac OS X 10.5 SDK path
  • --iphoneos-2-sdk-path: iPhone OS 2 SDK path
  • --shim-sdk-path: iPhone OS 1 shim SDK containing the .tbd files (already present at shim_sdk)
  • --csu-path: Path to csu C runtime folder (already present at csu)
  • -o: Optional output path

On macOS and Linux

You can make the script executable:

chmod +x generate.py
./generate.py

Then run:

./generate.py --include-path "path/to/local/headers" --osx-sdk-path "path/to/osx/sdk" --iphoneos-2-sdk-path "path/to/iphoneos2/sdk" --shim-sdk-path "./shim_sdk" --csu-path "./csu"

Windows (PowerShell)

python generate.py --include-path "path\to\local\headers" --osx-sdk-path "path\to\osx\sdk" --iphoneos-2-sdk-path "path\to\iphoneos2\sdk" --shim-sdk-path ".\shim_sdk" --csu-path ".\csu"

License

This project is licensed under GPL v2.

Copyright (c) 2026 Nightwind

About

An unofficial SDK generator for iPhone OS 1.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages