step a:
在Swift Compiler - Custom Flags的Other Swift Flags的Debug裏添加-DDEBUG
在Release裏添加-DRELEASE
step b:
在代碼裏這麼使用
#if DEBUG
print("debug")
#endif
#if RELEASE
print("release")
#endif
step a:
在Swift Compiler - Custom Flags的Other Swift Flags的Debug裏添加-DDEBUG
在Release裏添加-DRELEASE
step b:
在代碼裏這麼使用
#if DEBUG
print("debug")
#endif
#if RELEASE
print("release")
#endif