EarlGrey icon indicating copy to clipboard operation
EarlGrey copied to clipboard

Cannot find 'EDOHostPort' in scope

Open ken4ward opened this issue 1 year ago • 2 comments

Recently, whenever I want to intsall EarlGrey it always return this errors:

  1. EarlGrey.swift:183:18 Cannot find 'EDOHostPort' in scope
  2. EarlGrey.swift:183:54 'nil' requires a contextual type
  3. EarlGrey.swift:183:79 'nil' requires a contextual type
  4. EarlGrey.swift:184:27 Cannot find 'remoteClassObject' in scope

I'm wondering if anything has changed recently in the installation process?

ken4ward avatar Aug 21 '23 11:08 ken4ward

@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

ganapathy-shan avatar Aug 31 '23 04:08 ganapathy-shan

Nice, thanks for this.

In my case, I am using pods, so: #import "../Pods/eDistantObject/Channel/Sources/EDOHostPort.h"

mcorner avatar Oct 17 '23 14:10 mcorner