在按照 TestFairy 网站上的所有必要步骤将 TestFairy SDK 集成到 iOS 后,我遇到了一个问题。我将文件拖到我的项目中,我检查了“如果需要复制文件”,我创建了导入 TestFairy 所需的桥接头。
应用程序在模拟器上编译并运行,但当我尝试归档应用程序时出现错误。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Check if the user isn't logged in, make the login screen the launcher
if !userDefaultExists(forKey: "username") {
self.window = UIWindow(frame: UIScreen.main.bounds)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let initialViewController = storyboard.instantiateViewController(withIdentifier: "LoginView")
self.window?.rootViewController = initialViewController
self.window?.makeKeyAndVisible()
}
TestFairy.begin(appToken)
return true
}
错误消息是“使用未解析的标识符‘TestFairy’”。
最佳答案
免责声明:我在 TestFairy 工作
这类问题通常与项目设置问题有关。在将 TestFairy 库复制到您的项目时,您可能已将其添加到存档期间未搜索的路径。 Cocoapods 确实会确保您不会遇到此类问题,但是,如果您想恢复到将库拖到您的项目中,请随时通过 support@testfairy.com 与我们联系
关于ios - 使用 TestFairy.begin() 时在 Xcode 9 中使用未解析的标识符 'TestFairy' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51877344/