TARGET_IPHONE_SIMULATOR not acting as TARGET_OS_SIMULATOR (true on the device!)

Number:rdar://37822024 Date Originated:23-Feb-2018 12:56 PM
Status:b4d_devel0per Resolved:
Product:Developer Tools Product Version:9.2
Classification:Serious Bug Reproducible:Always
WARNING — Leaving this "as is", just in case someone makes the same mistake but basically I was using "#idfef" instead of "#if". It's interesting though that I somehow saw a problem with #ifdef (I mean different case for IPHONE and OS).

I mistakenly used `TARGET_IPHONE_SIMULATOR`, which is deprecated. I discovered my error when I was in the #ifdef although running on iPhone X!

Steps to Reproduce:
Use the deprecated `TARGET_IPHONE_SIMULATOR`

Expected Results:
Should work as `TARGET_OS_SIMULATOR` or at least if not, be more than not deprecated, but rather not exist. By any means Xcode could say something.

Actual Results:
TARGET_IPHONE_SIMULATOR works on the device as well! This is really wrong.




#include "TargetConditionals.h" doesn't change anything.

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!