gpt4 book ai didi

ios - googleSignIn 的 XCUITest 编译错误

转载 作者:行者123 更新时间:2023-11-29 05:43:46 25 4
gpt4 key购买 nike

我已使用 pod 配置了 GoogleSignIn。

我的 Pod 文件
目标‘MyApp’做 # 如果您不使用 Swift 并且不想使用动态框架,请注释下一行 使用_frameworks!

  # Pods for MyApp
pod 'p2.OAuth2'
pod 'GoogleSignIn'

target 'MyAppUITests' do
inherit! :search_paths
# Pods for testing
pod 'p2.OAuth2'
pod 'GoogleSignIn'
end
end

我能够登录 Google。对于XCUITest,我收到错误

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_GIDSignIn", referenced from:
objc-class-ref in Myclass.o
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

在这些类(class)中,我导入了“GoogleSignIn”。

如何解决这个问题?

位码关闭,添加其他类轮标志 -ObjC。

最佳答案

我已经检查了测试目标的build设置。

测试目标->build设置->其他链接器标志

我添加了“-framework”及其旁边的“GoogleSignIn”。它起作用了。

关于ios - googleSignIn 的 XCUITest 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56336541/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com