Hi all! We're happily using GB in our company. Lat...
# ask-questions
m
Hi all! We're happily using GB in our company. Lately we came across an issue that we can't figure out on our own, thus Im reaching to you && the community over here. We have FF that's shared for our apps (iOS, Android). What we want: • We want to run single A/B test that will be run against particular app versions per platform onwards, eg.: iOS >= a.b.c, Android >= x.y.z Where's the problem: • When setting the A/B test we figured out there's no easy way to target the experiment for both platforms in single mode • So we opted into advanced mode when setting the target attributes. • We learned we can use mongoDB notation so we leveraged
"$or"
in the advanced mode as follows:
Copy code
{
  "$or": [
    {
      "client_type": "iOS",
      "version_major": {
        "$gte": 2
      },
      "version_minor": {
        "$gte": 3
      }
    },
    {
      "client_type": "Android",
      "version_major": {
        "$gte": 4
      },
      "version_minor": {
        "$gte": 5
      }
    }
  ]
}
☝️ However the above just doesnt work. The experiment is run on eg iOS versions < 2.3.0 or Android < 4.5.0. Had we removed the
"$or"
everything seems to work, well at that point we loose the ability to target only users using specific app versions across both mobile platforms. == Q: Did anybody got through similar struggle in the past? Could somebody help me here? I found this older issue on the GH repo, well that exact solution doesn't work for us.
r
It looks like this should work. Are you able to confirm that the attributes you identified are coming through correctly (client and version). Additionally, you can check that you get the results you'd expect by using the feature flag tester, on the feature flag page. I used that to confirm that the logic behaved as expected: