I have written the following code:
if (OS_ANDROID) {
function showDialog() {
// Android logic
}
function closeDialog() {
// Android logic
}
}
if (OS_IOS) {
function showDialog() {
// iOS logic
}
function closeDialog() {
// iOS logic
}
}
For some reason when I run on Android it executes the code for iOS. So when I had a look at the generated files in the resources directory I see that generated code just removes the if (OS_ANDROID)
and if (OS_IOS)
blocks and leaves both codes (iOS and Android) on the file.
Currently I'm running on the emulators, but I'm guessing it should work just the same.