EarlGrey
EarlGrey copied to clipboard
Cannot find 'EDOHostPort' in scope
Recently, whenever I want to intsall EarlGrey it always return this errors:
- EarlGrey.swift:183:18 Cannot find 'EDOHostPort' in scope
- EarlGrey.swift:183:54 'nil' requires a contextual type
- EarlGrey.swift:183:79 'nil' requires a contextual type
- EarlGrey.swift:184:27 Cannot find 'remoteClassObject' in scope
I'm wondering if anything has changed recently in the installation process?
@ken4ward I faced similar issues and I found that below changes resolve the issues.
- Add
#import "../eDistantObject/Channel/Sources/EDOHostPort.h"
in the bridging header of Test target. - Replace remoteClassObject with the classObject as below snippet.
guard let remoteClass: T.Type = EDOClientService<AnyObject>.classObject(withName: String(describing: T.self), hostPort: hostPort) as? T.Type
Nice, thanks for this.
In my case, I am using pods, so: #import "../Pods/eDistantObject/Channel/Sources/EDOHostPort.h"