I have a framework written in Swift and it has 2 versions. In 1st version it has class “NewClass” and in 2nd it has NOT.
Now when I import that class into my Objective-C project I need to check if that “NewClass” exists or not. If yes - then compile the block of code if not - to skip it.
But I need to do that by using precompile macros, not runtime, as in runtime case the project does not see the class and not compiles.
How can I achieve that?
Can I check like this, but for the class itself, not header file?
#if __has_include(<MyFramework/MyFramework-Swift.h>)
Like if has_include NewClass?