Skip to content

Repository files navigation

PrivateHeaderKit

日本語

Generate searchable private headers from this Mac or an installed iOS or watchOS Simulator runtime.

Requires macOS 14 or later. Prebuilt releases require Apple Silicon. iOS and watchOS generation require Xcode and a matching installed Simulator runtime; physical devices are not generation sources. Source installation requires Swift 6.3 and Xcode with iOS and watchOS Simulator SDKs.

Quick Start

curl -fsSLO https://github.com/lynnswap/PrivateHeaderKit/releases/latest/download/install.sh && sh ./install.sh

If the installer prints a Next steps block, follow it instead of the command below. Otherwise run:

privateheaderkit

Choose a source, then generate all targets or enter specific framework, bundle, or dylib names. PrivateHeaderKit writes to ~/PrivateHeaderKit by default and prints the exact Headers directory for the generated files. Generated headers are grouped by platform and exact source, for example generated-headers/iOS/27.0_beta_24A5390f.

The installer does not edit shell profiles.

Build from Source

Build and run the source installer from the checkout:

git clone https://github.com/lynnswap/PrivateHeaderKit.git
cd PrivateHeaderKit
swift run -c release privateheaderkit-install

The installer builds privateheaderkit and three internal helpers from the same checkout. It accepts the same --prefix and --bindir options as install.sh.

Install Options

Custom directories

Install the command in ~/bin:

curl -fsSLO https://github.com/lynnswap/PrivateHeaderKit/releases/latest/download/install.sh && sh ./install.sh --bindir ~/bin

Automation

The no-argument command is the recommended interactive path. For scripts, pass all generation inputs explicitly:

privateheaderkit \
  --platform macOS \
  --version "$(sw_vers -productVersion)" \
  --build "$(sw_vers -buildVersion)" \
  --system-root / \
  --out ~/PrivateHeaderKit \
  --target AppKit,Foundation
privateheaderkit \
  --platform iOS \
  --version 27.0 \
  --out ~/PrivateHeaderKit \
  --target SwiftUI,UIKit
privateheaderkit \
  --platform watchOS \
  --version 27.0 \
  --out ~/PrivateHeaderKit \
  --target WatchKit

Use privateheaderkit --help for the complete option list. Replace each example version with an installed runtime version. If more than one runtime for the selected platform matches a version, add --build <build>.

Documentation

License

PrivateHeaderKit is available under the MIT License.

About

Generate private framework headers for iOS simulator runtimes and macOS system frameworks (dyld shared cache aware).

Topics

Resources

Contributing

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages