cherry pick e6bbb23e14e9 from couchbaselite-ios

per Jen's suggestion, cherry pick e6bbb23e14e9 from couchbaselite-ios