ios 架构 arm64 的未定义符号“_OBJC_CLASS_$_SFSafariViewController”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32880661/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Undefined symbols for architecture arm64 "_OBJC_CLASS_$_SFSafariViewController"
提问by iBug
I am trying to integrate Google sign in into my iOS app. I have followed instructions mentioned by Google.
我正在尝试将 Google 登录集成到我的 iOS 应用程序中。我已按照 Google 提到的说明进行操作。
I have added SafariService.framework as well.
我也添加了 SafariService.framework。
Still I am getting this error:
我仍然收到此错误:
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_SFSafariViewController", referenced from:
objc-class-ref in GoogleSignIn(GIDSignIn.o)
How to fix this issue?
如何解决这个问题?
Any ideas?
有任何想法吗?
Thanks
谢谢
回答by ezefire
I had the same issue. But my problem was i haven't included the SafariServices framework.
我遇到过同样的问题。但我的问题是我没有包含 SafariServices 框架。
I added it as required and it worked fine.
我根据需要添加了它,它运行良好。
Make sure you have the next configuration:
确保你有下一个配置:
- Disabled BITE_CODE
- Added all needed frameworks
- The linker flag -ObjC (not -Objc)
- Added the needed url types
- Imported GoogleSignIn.h
- GoogleServices-Info.plist imported in your target
- 已禁用 BITE_CODE
- 添加了所有需要的框架
- 链接器标志 -ObjC(不是 -Objc)
- 添加了所需的 url 类型
- 导入的 GoogleSignIn.h
- 目标中导入的 GoogleServices-Info.plist
In my configuration i'm using 7.0 as deployment target
在我的配置中,我使用 7.0 作为部署目标
Hope it helps. Regards
希望能帮助到你。问候
回答by Rony Rozen
Since the SafariServices framework is only available on iOS9 and above, is it possible that you are trying to run this on a device with iOS lower than that? If so, is it possible that when you added the framework, you added it as required (making it impossible for the app to run on older versions of iOS)? Try setting it as optional (attaching an image to better explain what I mean).
由于 SafariServices 框架仅在 iOS9 及更高版本上可用,您是否有可能尝试在 iOS 低于此的设备上运行它?如果是这样,是否有可能在您添加框架时根据需要添加它(使应用程序无法在旧版本的 iOS 上运行)?尝试将其设置为可选(附加图像以更好地解释我的意思)。