← All use cases
device.os
iPhone to the Store, Android to Play
A link points either to the App Store or to Play, never to both. Two rules and one mandatory rule solve it. A desktop in front of the shop window is the honest case for the last rule — not “other”.
- Where it hangs
- Sticker on the shop door, flyer, business card, packaging.
- Why the paper stays
- Two printed codes, and the wrong one is always the one on top of the display.
Live resolution
device.os = iosgeo.country = CHlang.primary = descan.count_total = 5310
- 1iOS
- 2Android
- alwaysOtherwise
https://apps.apple.com/app/hof
Operating system of the device

The ruleset
Valid, storable, mandatory rule last.
Not a description of what the engine could do — this is the text a code carries. The first matching rule wins, and the last one always matches.
ruleset · version 1
{
"rules": [
{
"when": { "device.os": { "eq": "ios" } },
"then": { "type": "redirect", "url": "https://apps.apple.com/app/hof" }
},
{
"when": { "device.os": { "eq": "android" } },
"then": { "type": "redirect", "url": "https://play.google.com/store/apps/hof" }
},
{
"when": "always",
"then": { "type": "redirect", "url": "https://hof.app" }
}
]
}