Do we still need to hide/remove print statements in Xcode 8.2 and Swift 3 when releasing app?
After doing some more research it still seems that we need/should hide print statements for release. As mentioned in my question its best done via a global print function
func print(_ items: Any...) {
#if DEBUG
Swift.print(items[0])
#endif
}
import Foundation
class print {
@discardableResult init(_ Item: Any) {
print(Item)
}
private func print(_ item: Any) {
#if DEBUG
Swift.print("HI + \(item)")
#endif
}
}
-> Open Build settings -> Swift compiler-Custom flag -> Other swift flag. -> expand the Other swift flag -> Add -D DEBUG before debug. create new class name print and just add the code. It will bypass the prints.