google/EarlGrey

'eDistantObject/EDORemoteVariable.h' file not found

yongjun-python opened this issue · 1 comments

#import "AppFramework/Action/GREYActions.h"
^
/Users/yongjuwa/Desktop/cbdmobile/ios/../../shared/Earlgrey/AppFramework/Action/GREYActions.h:23:9: error: 'eDistantObject/EDORemoteVariable.h' file not found
#import <eDistantObject/EDORemoteVariable.h>
^
1 error generated.
:0: error: failed to emit precompiled header '/Users/yongjuwa/Library/Developer/Xcode/DerivedData/CBDMobile-gfssoqseupovomajrakqibbecrgu/Build/Intermediates.noindex/PrecompiledHeaders/EG2Header-swift_57OHYXJF0H8J-clang_219ISBKZ2L257.pch' for bridging header '/Users/yongjuwa/Desktop/cbdmobile/ios/CBDMobileUITests/EG2Header.h'
/Users/yongjuwa/Desktop/cbdmobile/ios/CBDMobileUITests/EG2Header.h:3:9: note: in file included from /Users/yongjuwa/Desktop/cbdmobile/ios/CBDMobileUITests/EG2Header.h:3:
#import "AppFramework/Action/GREYActions.h"
^
2 errors generated.

This is a bug that breaks setting up Earlgrey using this method https://github.com/google/EarlGrey/blob/earlgrey2/docs/setup.md. The problem here is that Earlgrey now is expecting Earlgrey setup via cocopods from the macros if statement. however if we are not using cocopods then our setup will fail with above error message. if you are not using cocopods, then workaround can be editing those files that gives error by commenting out the cocopods if statement and leave only the direct EDORemoteVariable.h import like below:

//#if COCOAPODS
//#import <eDistantObject/EDORemoteVariable.h>
//#else
#import "EDORemoteVariable.h"
//#endif // COCOAPODS

and then you should be able to compile your project fine. Hopefully this gets fixed.