Disabling NSLog For Production In Swift Project

前端 未结 8 2033
遥遥无期
遥遥无期 2020-12-23 10:26

So this answer Do I need to disable NSLog before release Application? gives a great way to disable NSLog in a production environment, but unfortunately, this solution does n

8条回答
  •  隐瞒了意图╮
    2020-12-23 10:40

    #if DEBUG
    #else
    public func NSLog(_ format: String, _ args: CVarArg...)
    {
        // noop
    }
    #endif
    

    The quest leading to this: swift debugPrint vs print

提交回复
热议问题