I am trying to determine if program is running on desktop and it seems system.getInfo(“platform”) returns nil on desktop instead of “macos”…
example from forum :
local isRunningOnDesktop = false
if (system.getInfo(“environment”) == “device”) then
local platformName = system.getInfo(“platform”) --(platformName Deprecated)
if (platformName == “Win”) or (platformName == “macos”) then
isRunningOnDesktop = true
end
end
in this case platformName is nil
I can use nil as workaround but is anyone else seeing this or am I doing something wrong ?
Corona build 2016.3007