Formula to check if device is Apple or Android?

Is there a formula to check if a device is android or apple, e.g

IF( device = android), true, false) ???

need to change values based on the output.

SystemVars.os == “ios” or “android”

thanks will check it out