Preprocessor Timestamp

前端 未结 3 886
时光说笑
时光说笑 2021-01-25 09:17

Is it possible to generate an embedded Unix timestamp via a preprocessor macro?

For instance: #define VERSION_EXPIRE __TIMESTAMP__

The reason for th

3条回答
  •  隐瞒了意图╮
    2021-01-25 09:33

    Add a custom build step before preprocessing that uses sed to replace __TIMESTAMP__ with date. The easiest way to do this is to tell Xcode to use a makefile.

提交回复
热议问题