I would like to globally ignore all println() calls in my Swift code if I am not in a Debug build. I can\'t find any robust step by step instructions for this a
Varun Naharia has the better solution so far. I would combine his answer with Rivera's ...
-D DEBUG flag on the compiler directives, build settings.then add this code:
#if !DEBUG
public func print(_ items: Any..., separator: String = " ", terminator: String = "\n") {
}
#endif
This code will convert every print into nothing for release.