port over commit affa8d75a25f4ca0090e4651001bd1e70823ec5d from couchbase...

... lite ios