Melina
Melina

Reputation: 1463

objective-c preprocessor directives

How do I write the following in the preprocessor directive language?

if (isfullversion and isproduction)

else if (isliteversion)

end if

Upvotes: 2

Views: 1833

Answers (2)

Stew
Stew

Reputation: 1921

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

Upvotes: 3

jer
jer

Reputation: 20236

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.

Upvotes: 2

Related Questions