ios - 使用 TestFairy.begin() 时在 Xcode 9 中使用未解析的标识符 'TestFairy' 错误

标签 ios swift4 xcode9 testfairy

在按照 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/

相关文章:

ios - 无法使用 Alamofire 成功完成带有参数的 GET 请求

ios - 为什么在枚举和开关的情况下需要强制展开?

ios - 在反向 Segue 操作中,选项卡栏在选项卡栏 Controller 上不可见

xcode - 使用 “available but has no defaultDisplay”启动后,iOS Simulator崩溃

ios - xcode 中是否有类似 android 中的任何功能

iphone - 在 iOS 中读取文本文件中的 url 后加载 NSURL?

ios - Swift 将 UIImage 转换为没有 alpha channel 的 24 位 RGB

swift - 我可以在 CLCircularRegion 中设置值吗?

ios - 无法在模拟器 Xcode 9 beta 中安装应用程序

Xcode 9 模拟器看起来很糟糕