Skip to content

Update Apple private framework header files #565

@rgoldberg

Description

@rgoldberg

Description

Improve Apple private framework headers:

  • Remove unnecessary headers
  • Improve importing/including/forward referencing
  • Improve value names
  • Guess parameter & return types
  • Reinstate commented code
  • Make more functions non-nullable (will revert if any fails occur)
  • Rename protocol files as per standards
  • Organize & sort
  • Improve spacing
  • Remove unnecessary comments
  • Add @required & @optional to @protocol definitions
  • Remove redundant ivars
  • Add new members through macOS 15.5 (with guessed introduction macOS versions)
  • Deprecate removed members (with guessed introduction & removal macOS versions)

Note

I used ipsw to extract Apple framework headers for macOS versions:

  • 13.7.2 (build 22H313)
  • 14.7.2 (build 23H311)
  • 15.2 (build 24C101)

ipsw does not extract correct headers on macOS 12.7.6 (build 21H1320) (& presumably for all older macOS versions).

Original issue

Update header files for Apple private frameworks.

Synthesize combined headers that include symbols conditionally included for different macOS versions.

Make a new repo (mas-cli/apple-private-headers?) that contains all private headers that we've extracted. its main branch should contain a merge of all of the headers for all macOS versions, tracking when symbols were added / removed with available / deprecated / whatever appropriate keywords. Each extracted set of headers by a specific tool for a specific version of macOS should have its own branch, so we can diff branches. We could write a script to merge newly extracted headers into the existing main headers.

Presumably use ipsw, possibly the following command line:

ipsw class-dump /System/Library/dyld/dyld_shared_cache_arm64e 'CommerceKit' --headers --output /tmp/CommerceKit_HDRS

Framework libraries are now stored in the DSC, Dyld Shared Cache, from which ipsw can extract them.

ipsw should work on macOS 15, but it doesn't completely work on macOS 12 (not sure about other macOS versions).

On macOS 12, many symbols in the headers it outputs have incorrect truncated names, so they're useless.

If someone can run ipsw on a newer macOS, having new headers would be useful (we should also investigate other Apple frameworks beyond CommerceKit & StoreFoundation).

I might be able to get some other tool to work (I'll later investigate the ones mentioned in #417).

Possible tools:

Investigate:

Metadata

Metadata

Assignees

Labels

🧽 choreAdministrative task: documentation, build, test, release, git, etc.

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions