EarlGrey
                                
                                 EarlGrey copied to clipboard
                                
                                    EarlGrey copied to clipboard
                            
                            
                            
                        EarlGrey 2.2.0 | Cocoapods | Can't build UI Tests target when use use_frameworks! flag in Podfile
After updating EarlGrey to 2.2.0, I cannot build a UI Tests target. This build failed with an error:
Include of non-modular header inside framework module 'EarlGreyTest.GREYHostApplicationDistantObject': '/xxx/Library/Developer/Xcode/DerivedData/XXX-fwetoamgsahlylbaeymzuyfiookw/Build/Products/Debug-iphonesimulator/eDistantObject/eDistantObject.framework/Headers/EDOClientService.h'
This only happens when use_frameworks! flag is used in Podfile in UI Tests target. Unfortunately I have to use this flag because of a different library.
It can be reproduce in EarlGreyExample from earlgrey2 branch.

Xcode 12.2 Cocoapods 1.10.0
You only need EarlGreyTest in the test component of your PodFile. Can you not remove use_frameworks from it? My guess is that you have a global Podfile config from where use_frameworks is added. Do you need the different library in your tests?
Yes, unfortunately I need a different library in my tests and it needs the use_framework flag.