开发者

objective-c preprocessor directives

开发者 https://www.devze.com 2023-01-22 11:10 出处:网络
How do I write the following in 开发者_开发知识库the preprocessor directive language? if (isfullversion and isproduction)

How do I write the following in 开发者_开发知识库the preprocessor directive language?

if (isfullversion and isproduction)

else if (isliteversion)

end if


You should be able to write the conditions you already have for the preprocessor if you want, rather than just checking if they are defined.

#if (isfullversion && isproduction)

#elif (isliteversion)

#endif


You create separate targets. one for the lite version, one for the full version, then add compiler flags like -DLITE then check #ifdef LITE in your code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号