Thanks for your interest in improving AppleTrace! This guide covers how to get set up, what we expect from changes, and how to validate them.
git clone https://github.com/everettjf/appletrace.git
cd AppleTrace
python3 -m pip install -r requirements.txtYou will need Xcode 12+ (macOS 10.15+) to build the framework and samples, and a recent Python 3 for the tooling and tests.
appletrace/— core tracing framework (Objective-C/C++ runtime, public headers).appletrace/appletrace/src/objc/hook_objc_msgSend.m— arm64/arm64eobjc_msgSendhook.loader/,springboard/— loader/packaging projects.merge.py,scripts/appletrace_cli.py,go.sh— tooling (merge + open in Perfetto).tests/— Python regression tests.
See AGENT.md for a deeper map and build/release details, and ROADMAP.md for where the project is headed.
- Keep changes scoped: don't mix instrumentation, tooling, and docs in one PR.
- The
objc_msgSendhook targets arm64 and arm64e. Preserve the authenticated GOT signing and PAC/BTI wrapper behavior, and run the arm64e device smoke test after changing the hook. - Avoid adding work to the tracing hot path; prefer caching/interning and per-thread state over per-event allocation.
- Update
README.md/README_CN.md/AGENT.mdwhen workflows or APIs change.
# Python tooling
python3 -m pytest tests
# objc_msgSend hook smoke tests (run on a Mac)
./scripts/test_objc_msgsend_hook.sh
./scripts/test_objc_msgsend_hook_experimental.sh
# Real-device PAC validation (text + binary trace modes)
DEVICE_ARCH=arm64e ./scripts/test_objc_msgsend_hook_device.sh
# Verify the merge + export pipeline on real data
python3 merge.py -d <path-to-appletracedata>When touching the framework, build the relevant Xcode targets and confirm a trace renders correctly in Perfetto.
- Objective-C: Google Objective-C Style Guide
- Python: PEP 8
- Shell: Google Shell Style Guide
- Fork and create a feature branch.
- Make your change with tests where applicable.
- Run the test commands above and note any manual testing (device, iOS version).
- Open a PR describing the change and its motivation.