Swift: A nicer way to tell if your app is running in Debug mode

from blog Alex Plescan, | ↗ original
Often while working on an iOS app there’s functionality that you want exposed only when the app is running in a Debug build configuration. Previously I would use build environment variables and preprocessor macros to determine this, but thanks to the great answer on this Stack Overflow question I now use a runtime check to tell whether the app is...