EarlGrey icon indicating copy to clipboard operation
EarlGrey copied to clipboard

EarlGrey 2.2.0 | Cocoapods | Can't build UI Tests target when use use_frameworks! flag in Podfile

Open kwlx opened this issue 4 years ago • 2 comments

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. Zrzut ekranu 2020-11-24 o 08 30 02

Xcode 12.2 Cocoapods 1.10.0

kwlx avatar Nov 24 '20 07:11 kwlx

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?

tirodkar avatar Nov 24 '20 16:11 tirodkar

Yes, unfortunately I need a different library in my tests and it needs the use_framework flag.

kwlx avatar Nov 25 '20 06:11 kwlx