1

在 Genexus 中,如何知道 Smart Device 是为 Android 还是 IOS 编译?

例子:

一个程序:

If platform = ‘IOS’
   &Variavel = 1
Else if platform = ‘ANDROID’
   &VARIAVEL = 2
endif
4

1 回答 1

2

在编译时无法知道,但您可以在运行时检查。

您可以DeviceTypeClientInformation

&deviceType = ClientInformation.DeviceType
if &deviceType = SmartDeviceType.iOS
    &variavel = 1
else // if &deviceType = SmartDeviceType.Android
    &variavel = 2
endif

在官方文档中查看更多信息:ClientInformation 外部对象

于 2018-10-04T13:27:22.590 回答