mas-cli / mas

:package: Mac App Store command line interface
MIT License
10.95k stars 274 forks source link

Update Apple private framework header files #565

Open rgoldberg opened 1 month ago

rgoldberg commented 1 month ago

Update header files for Apple private frameworks.

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

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 https://github.com/mas-cli/mas/issues/417).