AppleArchive : Obj-C API? C sample code? Documentation?

3 questions on the AppleArchive.h APIs:

  • Are there Obj-C APIs? I see Swift APIs but I'm not looking forward to using them.

  • Is there sample code showing how to use the C APIs?

  • Is there any plan to fix the documentation on Apple Developer web page for this library? It's not really useful right now and the CSS is broken for sample code (the sample code frame is clipping code on the right). Same problem with the Compression documentation.

Replies

Are there Obj-C APIs?

Apple Archive has a Swift and a C interface. Objective-C users can import and use the C interface directly.

Is there sample code showing how to use the C APIs?

There’s no official sample code written in C. Having said that, the Swift and C interfaces are very similar at the concept level, so you can grab the Swift sample, learn the concepts from there, and apply them to your C code.

For example, the first step in the Compressing Single Files article is to create an archive byte stream. In Swift you do that using ArchiveByteStream.fileStream(…) and in C you use AAFileStreamOpenWithPath.

Is there any plan to fix the documentation on Apple Developer web page for this library?

I had a quick look at the documentation and didn’t see the problem you’re reporting. The best thing to do here is to file a bug against the docs. Please:

  • Note which browser you’re using, and its version.

  • Include a URL to the page in question.

  • Include a screen shot of the misrendering.

Post your bug number, just for the record

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

OK. I will try to figure out how to use the C API.

Display problem with the documentation -> FB9956926. If you use Google Chrome, it's a bit better.