无法找到“GoogleService-Info.plist"在尝试将 Google Sign-in 集成到我的应用中时 [英] Unable to find "GoogleService-Info.plist" while trying to integrate Google Sign-in in my app

查看:47
本文介绍了无法找到“GoogleService-Info.plist"在尝试将 Google Sign-in 集成到我的应用中时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循了:将 Google Sign-In 集成到您的 iOS 应用中

但是,当我执行应用程序时,它会在应用程序委托本身中停止 - 甚至在我看到我的第一个视图控制器之前.

However when I execute the app, it halts in the app delegate itself - even before I can see my first view controller.

原因是因为我在application didFinishLaunchingWithOptions withOptions"中写的这几行代码,分别是:

The reason is because of these few lines of code I wrote in the "application didFinishLaunchingWithOptions withOptions", which are:

"NSError* configureError;
[[GGLContext sharedInstance] configureWithError: &configureError];
    NSAssert(!configureError, @"Error configuring Google services: %@", configureError);

 [GIDSignIn sharedInstance].delegate = self;"

在调试中,当它到达此代码时,它说

In the debug, when it reaches this code, it says

由于未捕获的异常而终止应用程序'NSInternalInconsistencyException',原因:'配置谷歌时出错服务:错误域=com.google.greenhouse 代码=-200无法配置 GGL." UserInfo=0x7ff9c2e1d000{NSLocalizedRecoverySuggestion=检查格式和位置GoogleService-Info.plist., NSLocalizedDescription=无法配置GGL., NSLocalizedFailureReason=无法解析提供的GoogleService-Info.plist.有关详细信息,请参阅日志.}'".

"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error configuring Google services: Error Domain=com.google.greenhouse Code=-200 "Unable to configure GGL." UserInfo=0x7ff9c2e1d000 {NSLocalizedRecoverySuggestion=Check formatting and location of GoogleService-Info.plist., NSLocalizedDescription=Unable to configure GGL., NSLocalizedFailureReason=Unable to parse supplied GoogleService-Info.plist. See log for details.}'".

我将 GoogleService-Info.plist 放在我的目录中,但它仍然无法正常工作.

I put the GoogleService-Info.plist in my directory, but it still isn't working.

推荐答案

我遇到了同样的问题.而且,实际上,当我在 cocoapods 文件中放置pod 'Google/SignIn'"而不是pod Google"时,我解决了这个问题.希望它也能帮到你.

I faced the same problem. And, actually, I solved it when in cocoapods file I placed "pod 'Google/SignIn'" instead of "pod Google". Hope it could help you too.

这篇关于无法找到“GoogleService-Info.plist"在尝试将 Google Sign-in 集成到我的应用中时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆