LibArchive Static Library for iOS
libbz2.dylib are included in the iOS SDK, the header files are not. This means that they are private APIs and cannot be used if you intend to submit to the App Store.
Never fear! This repository contains everything you need to build a static version of
libarchive for iOS.
libbz2 is also included for extra goodness.
To keep naming of things sane, we build the library as
For iOS 4.3+ copy the header files and library from the
build-for-iOS-4.3 directory into your project.
For iOS 4.2 copy the header files and library from the
build-for-iOS-4.2 directory into your project.
If you need to build this for an earlier version of iOS, you can easily modify the
build.sh script to point to whatever SDKs you like. It should build fine on 3.x.
TO GET IT FULLY LINKING you must also include
libz.dylib in your list of linked libraries. To do this in XCode 4, click on your project, choose the
Build Phases tab, go to
Link Binary With Libraries, press
+, and choose
libz.dylib from the (long) list of possible libraries to link against. This is because
libarc.a links dynamically to
libz.dylib -- this is okay since, for whatever reason, AAPL saw fit to include the
libz headers in the iOS SDK.
libarchive version is
bzlib2 version is