Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
brunodecarvalho edited this page Mar 31, 2013 · 3 revisions

Setting up your project to use BBHTTP

Setting up BBHTTP as a submodule

  1. Start by configuring your submodule:

    $ git submodule add git@github.com:brunodecarvalho/BBHTTP.git your/submodule/path/BBHTTP
  2. On Xcode's project navigator, right click and select "Add files to YourProject..."

  3. Browse to your/submodule/path/BBHTTP and select the folder BBHTTP

  4. Again on the navigator, right click and select "Add files to YourProject..."

  5. Browse to your/submodule/path/BBHTTP/External and select libcurl.iOS (replace iOS for OSX if you're building for OSX)

For iOS, you'll notice that there are two libcurl binaries:

  • libcurl.iOS.dev.a is built with i386, armv7 and armv7s support which means it's aimed at development (i386 is required to run on the simulator);
  • libcurl.iOS.appstore.a is built only with armv7 and armv7s support which means it's smaller (2/3 of the size) and aimed for App Store distribution.

If you have a single target, just go with the dev binary but you should consider having two targets and configuring them to link against the appropriate libcurl library, like this:

Additionally, you'll need the following frameworks:

  • libz.dylib
  • Security.framework
  • CoreServices.framework on OSX, MobileCoreServices.framework on iOS
  • AppKit.framework on OSX, UIKit.framework on iOS

Setting up BBHTTP as a static library

  1. Clone this project
  2. Open up the project file at Project/BBHTTP.xcodeproj
  3. Select one of Hotpotato.iOS or Hotpotato.OSX from the available schemes
  4. Hit Build
  5. On the project navigator, open the Products group to reveal the static library
  6. Right click the static library and click "Show in Finder"
  7. Copy that file over to your project
  8. Copy all the headers in the Classes folder
  9. Perform steps 4 and 5 of the submodule setup instructions above.

Building your own curl binaries

If you'd like to build your own curl binaries — to apply patches, build against a specific version, against master branch, or just because it suits your fancy — you should try this out.