我正在尝试使用 Fastlane 使用快照工具截取我的应用程序的屏幕截图。但是,转换为 Objective-C 似乎无法正常工作。我已将 Project-Swift.h 导入到我的 ProjectUITests.m 文件中,并且包含以下代码:
SnapshotHelper *snapshotHelper = [[SnapshotHelper alloc] init];
[snapshotHelper setLanguage:app];
[snapshotHelper snapshot:@"01Homescreen" waitForLoadingIndicator:YES];
但是,当我在命令行中运行命令“快照”时,出现以下错误:
Testing failed:
Use of undeclared identifier 'SnapshotHelper'
Use of undeclared identifier 'snapshotHelper'
(1 failure)
[12:14:52]: Exit status: 65
[12:14:52]: Tests failed - check out the log above
所以我的问题是,如何让 SnapshotHelper.swift 文件在我的 ProjectUITests.m 文件中成功运行?