我使用了一个pod" Charts(3.0.1)"在我的项目中,我发现它总是在调试窗口中产生很多错误,如:
Feb 2 20:03:01 KeepHealth[1641] <Error>: If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable.
2017-02-02 20:03:01.470339 KeepHealth[1641:449073] CGContextAddLineToPoint: no current point.
Feb 2 20:03:01 KeepHealth[1641] <Error>: CGContextAddLineToPoint: no current point.
2017-02-02 20:03:01.470362 KeepHealth[1641:449073] Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
Feb 2 20:03:01 KeepHealth[1641] <Error>: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
2017-02-02 20:03:01.470377 KeepHealth[1641:449073] If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable.
Feb 2 20:03:01 KeepHealth[1641] <Error>: If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable.
2017-02-02 20:03:01.470393 KeepHealth[1641:449073] CGContextAddLineToPoint: no current point.
Feb 2 20:03:01 KeepHealth[1641] <Error>: CGContextAddLineToPoint: no current point.
2017-02-02 20:03:01.470532 KeepHealth[1641:449073] Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
Feb 2 20:03:01 KeepHealth[1641] <Error>: Error: this application, or a library it uses, has passed an invalid numeric value (NaN, or not-a-number) to CoreGraphics API and this value is being ignored. Please fix this problem.
2017-02-02 20:03:01.470547 KeepHealth[1641:449073] If you want to see the backtrace, please set CG_NUMERICS_SHOW_BACKTRACE environmental variable.
这里有很多,每一次,每一个地方,所以我几乎找不到自己制作的NSLog。但实际上,这个pod功能相当不错,所以我只想隐藏这种由它引起的调试信息,我可以这样做吗?
答案 0 :(得分:0)
答案 1 :(得分:0)
将此添加到您的podfile
并执行pod install
platform :ios
# ignore all warnings from all pods
inhibit_all_warnings!
# ignore warnings from a specific pod
pod 'Charts (3.0.1)', :inhibit_warnings => true
如需进一步清关,请查看this。