I knew that
ditto
(with the right parameters) was able to handle the necessary cases. But I'd much rather have an API rather than needing to use
NSTask
for compression and decompression.
So what zip archive API are you currently using?
The method used by
ditto
to encode Mac metadata in a zip archive is pretty straightforward — it creates a
__MACOSX
directory at the root and then builds a parallel tree of AppleDouble files in there — so updating your current zip code to do that shouldn’t be too hard. Indeed, you can use
COPYFILE_PACK
to do the heavy lifting. See the
copyfile
man page for more info.
Oh, and if you’d like Apple to provide a proper API for working with zip archives, please do file an enhancement request along those lines.
I'm not sure why I need that to happen, because the apps being compressed have individually been notarized and stapled.
OK, at this point I need to get a better understanding of the big picture. What is your app doing with these nested, archived apps?
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
ps DTS is closed 25…29 Nov in observance of the US Thanksgiving holiday.