google / EarlGrey

:tea: iOS UI Automation Test Framework
http://google.github.io/EarlGrey/
Apache License 2.0
5.61k stars 740 forks source link

Using EG2 Direct Project Copy while using Cocoapods for other frameworks. #1660

Open larry1thumb opened 2 years ago

larry1thumb commented 2 years ago

I know this isn't as much an EarlGrey2 specific issue, but rather the way Cocoapods Active Compilation Flags works, but I was wondering if anybody knows of a work around for this situation.

Our app is using white box testing through earlgrey2's direct project copy. I also would like to use Cocoapods to add in other testing frameworks for UI Testing. This issue is, once I add in cocoapods, earlgrey will think that i'm using cocoapods for everything and compilation will fail due the conditional compilation portions of earlgrey being wrong.

Example:

#if COCOAPODS
#import <eDistantObject/EDORemoteVariable.h> // This gets called even though I'm using direct copy installation.
#else
#import "EDORemoteVariable.h" // Without cocoapods this gets called successfully and everything is fine.
#endif  // COCOAPODS

Thanks for the help!

douglasmkim commented 2 years ago

@larry1thumb were you able to figure out a solution for this? I'm running into the same situation