Conditional Compilation

I know about the #If Target... conditional compilation options for ensuring that certain code runs or does not run on different platforms.

Does Xojo offer a way to set the conditional compilation at a class level? For instance, let’s say I have a Xojo module that contains two classes, both for serialising YAML files. One class is faster because it uses the String and Variant types, the other is slower and more verbose because it uses the Text and Auto types. The slower class only exists to allow YAML parsing on iOS. Trust me, I would rather use String.

Is there a way (other than cutting the faster class for desktop use out of the Xojo module) to be able to drop the module into an iOS project and have it compile? Currently the compiler just complains about a lack of the String class (I understand that, Strings are unavailable on iOS). It strikes me as odd that there isn’t some way in the IDE to tell the Xojo compiler - “hey, ignore these classes, they aren’t used in the project so don’t bit my head off that they contain types you don’t recognise”.

Does anyone have any thoughts on this?

I only know Delete in this case.

@Ian Kennedy has suggested that if you click the cog icon in the class inspector it might be possible to do this although apparently class names must still be unique. I’ll take a look.