Cuckoo icon indicating copy to clipboard operation
Cuckoo copied to clipboard

#if Import condition is not respected

Open verebes1 opened this issue 3 years ago • 0 comments

We have a framework that has a build condition SWIFT_ACTIVE_COMPILATION_CONDITIONS = APPEXTENSION; And based on that condition, we are importing the following libraries.

#if APPEXTENSION
import CustomAppExtension
#else
import Custom
#endif

The problem we are facing is that the generated mocks do not have this #if statement. They import both libraries (which causes a build fail) like below:

import CustomAppExtension
import Custom

Instead, we would require the imports to happen as in the original file:

#if APPEXTENSION
import CustomAppExtension
#else
import Custom
#endif

Would it be possible to update Cuckoo to recognize that #if block?

verebes1 avatar Aug 19 '21 14:08 verebes1