Skip to content

Mirror of LibArchive (and bz2lib) as static libraries for iOS. (iOS4.2 through iOS6)

License

Notifications You must be signed in to change notification settings

EnharmonicHQ/iOS-libarchive

 
 

Repository files navigation

LibArchive Static Library for iOS

Unfortunately, while libarchive.dylib and 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 libarc.a.

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.

The current libarchive version is 2.8.4. The bzlib2 version is 1.0.6.

About

Mirror of LibArchive (and bz2lib) as static libraries for iOS. (iOS4.2 through iOS6)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 98.0%
  • Awk 0.7%
  • XSLT 0.4%
  • Shell 0.3%
  • C++ 0.3%
  • Ruby 0.1%
  • Other 0.2%