All credit to @sahrens for sharing fb's internal implementation.
clone rocksdb from https://github.com/facebook/rocksdb.
edit MakeFile inside rocksdb. Search for
Platform-specific compilationaround line 1122. Make th next few lines to look like this:
ifeq ($(PLATFORM), IOS) # For iOS, create universal object files to be used on both the simulator and