Added macro check when building for simulator.