Compiler directives mismatch

  

I have an application which is supposed to run on MACOS and IOS.
Somehow both codes are executed when compiling for IOS and it drives me crazy:

procedure TForm1.Button1Click(Sender: TObject);
begin

{$IfDef MacOs}
ShowMessage(‘MACOS’);
{$Endif}

{$IfDef IOS}
ShowMessage(‘IOS’);
{$Endif}

end;

When running on any IOS device, both of the messages are displayed.

In other words, IOS application execute any codes defined for MACOS

Any idea?

Comments are closed.