We have the same problem now, fortunately, the only possible values โโfor us are A, B, C, D (4), so we need to request things like A || B, A || C, A || B || C, D, etc.
Like a few months ago, Firebase supports a new array-contains request, so we make an array and pre-process the OR values โโin the array
if (a) { array addObject:@"a" } if (b) { array addObject:@"b" } if (a||b) { array addObject:@"a||b" } etc
And we do it for all 4! values 4! or any number of combinations.
THEN we can just check the query [document arrayContains:@"a||c"] or any other type of condition that we need.
Therefore, if something qualifies only for conditional A from our 4 conditional expressions (A, B, C, D), then its array will contain the following string literals: @["A", "A||B", "A||C", "A||D", "A||B||C", "A||B||D", "A||C||D", "A||B||C||D"]
Then for any of these OR combinations, we can simply search for array-contains on what we might want (for example, "A || C")
Note. This is a smart approach if you have several possible values โโto compare OR.
More information about Array - contains here , as he is new to Firebase docs