The basics of getting LevelDB downloaded and unpacked are the same as in the beginning of Chapter 1, Downloading LevelDB and Building with OS X, but we will be rebuilding the library and need to vary the build steps a bit for iOS. Building for iOS is referred to as cross-compilation as the code being generated is for a different processor architecture from that running the compiler.
To start with, we are going to rebuild the
libleveldb.a file. This time, we are building without snappy and building for multiple architectures: the 32 bit x86 for the simulator and armv6 and armv7 for iOS devices. We'll finish by renaming it for iOS.
First up, remove snappy ...