#if B4A
'Code only for Android
#else if B4i
'Code only for iOS
#End If
'or version 2:
If xui.IsB4A Then
'Code only for Android
Else If xui.IsB4i Then
'Code only for iOS
End If
'only in version 1 the OS foreign code is ignored by compiler. (if you use classes in the other OS, that the compiler don't know)