Swift学习02:判断是否是Debug环境

张建 lol

build setting 配置

target -> builf setting -> swift flags -> other swift flags 下 点击 debug 添加 -D DEBUG,注意 release 下不添加

调用

1
2
3
4
5
#if DEFBU
// debug
#else
// release
#endif
  • Post title:Swift学习02:判断是否是Debug环境
  • Post author:张建
  • Create time:2023-02-07 11:09:34
  • Post link:https://redefine.ohevan.com/2023/02/07/Swift/Swift学习02:判断是否是Debug环境/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
On this page
Swift学习02:判断是否是Debug环境