Conditional Compilation - Check Scheme

前端 未结 1 1145
独厮守ぢ
独厮守ぢ 2020-12-20 06:28

In a Swift project before I\'ve been able to perform a simple compiler check to see which scheme is running, then conditionally include code or not. For example:

<         


        
相关标签:
1条回答
  • 2020-12-20 07:00

    Use #ifdef

    //example for debug scheme
    #ifdef NDEBUG
       Add code here
    #endif
    

    And you can define your preprocessor macros here

    Hope this helps

    0 讨论(0)
提交回复
热议问题