[XCTestDriver sharedTestDriver]: unrecognized selector sent to class 0x108a64e68'

在 xcode 12 版本以上, appium 修改错误后,运行报这个错误.

+ (id)retrieveTestRunnerProxy
{
  if ([[XCTestDriver sharedTestDriver] respondsToSelector:@selector(managerProxy)]) {
    return [XCTestDriver sharedTestDriver].managerProxy;
  } else {
    return ((XCTRunnerDaemonSession *)[FBXCTRunnerDaemonSessionClass sharedSession]).daemonProxy;
  }
}

找到以上代码,修改成

+ (id)retrieveTestRunnerProxy
{
//  if ([[XCTestDriver sharedTestDriver] respondsToSelector:@selector(managerProxy)]) {
//    return [XCTestDriver sharedTestDriver].managerProxy;
//  } else {
    return ((XCTRunnerDaemonSession *)[FBXCTRunnerDaemonSessionClass sharedSession]).daemonProxy;
//  }
}

你可能感兴趣的:([XCTestDriver sharedTestDriver]: unrecognized selector sent to class 0x108a64e68')