Hacker News new | past | comments | ask | show | jobs | submit login

Probably because "how do I detect simulator" is one of the most asked questions about swift. So Apple uses the leverage they have over the language.

I hope though that the way the targetEnvironment condition is implemented is that the 'simulator' exists only in the iOS library.

Applications are open for YC Summer 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact