I am trying to exclude some parts of the Swift file for a specific purpose. However, I did not find a replacement for the #ifndef objective-c directive, and also, if I use this form:
#if taxi_coops
func pippo(){
println("pippo");
}
#else
func triggerActiveLocationUpdate(entering:Bool){}
#endif
The preprocessor completely ignores the directive and tries to compile triggerActiveLocationUpdate. Note that the #if taxi_coops directive is respected in other parts of the same file.
Is there a way to just exclude some code snippets in Swift and / or why my fix does not work?
source
share