How theiphoneos1project/preferenceloader-iphoneos1 works
Purpose and Deployment
This repository reimplements PreferenceLoader for iPhone OS 1: an injected Settings extension framework that discovers third-party preference bundles and exposes their plist-defined panes in the native Settings app. It is packaged as a PXL for installation alongside MicroInjector.
Key deployment metadata:
• PreferenceLoader.plist
• PxlPkg.plist
• Makefile
Injection Entry Point
The runtime hook is centered in Tweak.m, loaded through MicroInjector into the Settings process. It extends legacy Preferences framework behavior so external preference definitions can be discovered and instantiated without native platform support.
• Tweak.m
• PreferenceLoader.plist
Preference Controller Integration
The project augments Apple’s PSListController to load PreferenceLoader-managed specifiers and route navigation into custom preference panes. This is the primary boundary between injected code and the private legacy Preferences APIs.
• libprefs/PSListController+PreferenceLoader.m
• libprefs/PSListController+PreferenceLoader.h
• libprefs/PSSpecifier+PreferenceLoader.m
Specifier Loading and Compatibility
Preference panes are represented by PSSpecifier objects sourced from plist data. The compatibility layer adapts plist-to-specifier construction to the iPhone OS 1 Preferences framework, which lacks later PreferenceLoader conveniences.
• libprefs/SpecifiersFromPlist+Compatibility.m
• libprefs/SpecifiersFromPlist+Compatibility.h
• libprefs/PSSpecifier+PreferenceLoader.h
Custom Pane Controllers
External preference bundles can name custom controller classes. PLCustomListController provides the base list-controller behavior for those panes, including loading their declared specifiers and participating in Settings navigation.
• libprefs/PLCustomListController.m
• libprefs/PLCustomListController.h
• Firmware/Firmware.m
Localization-Aware Controllers
PLLocalizedListController specializes the custom controller path for localized preference resources, separating locale-aware plist/string resolution from generic pane loading.
• libprefs/PLLocalizedListController.m
• libprefs/PLLocalizedListController.h
• libprefs/Constants.h
Runtime and Build Boundaries
The code is Objective-C for the fragile Objective-C runtime in the unofficial iPhone OS 1 SDK. It depends on MicroInjector’s dynamic library for process injection and links against legacy system/private Preferences APIs. The Makefile builds the injected binary and packages a distributable PXL via Python 3.
• Makefile
• Firmware/Firmware.h
• PxlPkg.plist
Main entry points: PSListController+PreferenceLoader.m PSListController integration · Tweak.m Injection hook · PLCustomListController.m Custom list controller · SpecifiersFromPlist+Compatibility.m Plist specifier compatibility
Components 14
Build & Deployment
- Build & package · Builds the injected binary and PXL package.
Makefile - PXL package metadata
PxlPkg.plist - MicroInjector · Loads the tweak into the Settings process.
- Injection manifest
PreferenceLoader.plist
Injected Integration
- Settings process
- Injection hook · Extends legacy Preferences behavior for external panes.
Tweak.m - PSListController integration · Loads managed specifiers and routes pane navigation.
libprefs/PSListController+PreferenceLoader.m - PSSpecifier extensions
libprefs/PSSpecifier+PreferenceLoader.m - Plist specifier compatibility · Adapts plist-to-specifier construction for iPhone OS 1.
libprefs/SpecifiersFromPlist+Compatibility.m - Legacy Preferences APIs
Preference Pane Runtime
- Third-party preference bundles · Provide plist-defined panes and optional controller classes.
- Custom list controller · Loads declared pane specifiers and joins Settings navigation.
libprefs/PLCustomListController.m - Localized list controller · Resolves localized preference plists and strings.
libprefs/PLLocalizedListController.m - Firmware integration
Firmware/Firmware.m
Connections 16
- Build & package → PXL package metadata: packages
- Build & package → Injection hook: builds
- PXL package metadata → Injection manifest: includes
- Injection manifest → MicroInjector: declares load target
- MicroInjector → Settings process: injects into
- Settings process → Injection hook: hosts
- Injection hook → PSListController integration: activates
- Injection hook → Third-party preference bundles: discovers
- PSListController integration → Plist specifier compatibility: loads specifiers through
- Plist specifier compatibility → PSSpecifier extensions: constructs
- Third-party preference bundles → Plist specifier compatibility: supplies plist definitions
- PSListController integration → Custom list controller: routes navigation to
- Third-party preference bundles → Custom list controller: names controller classes
- Custom list controller → Localized list controller: specialized by
- Custom list controller → Firmware integration: uses
- PSListController integration → Legacy Preferences APIs: augments