在不使用GoogleService-Info.plist的情况下使用Google Service for iOS [英] Using Google Service for iOS without using GoogleService-Info.plist

查看:733
本文介绍了在不使用GoogleService-Info.plist的情况下使用Google Service for iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用GoogleService-Info.plist同时使用Google SignIn和Google Analytics。

I am able to use both Google SignIn and Analytics using GoogleService-Info.plist.

但是,为了减少依赖性,我想从GoogleService移动信息-Info.plist到另一个包含我的其他信息的.plist。

However, to reduce dependency, I want to move the information from the GoogleService-Info.plist into another .plist that contains my other information.

这可能吗?如果是这样,我该怎么做?

Would this be possible? If so, how can I do this?

推荐答案

您可以 - 两个库都允许您手动配置它们。您将要删除对 GGLContext 的任何引用,并直接设置库:

You can - both libraries allow you to configure them manually. You'll want to drop any references to GGLContext, and just setup the libraries directly:

[GIDSignIn sharedInstance].clientID = @"YOUR_CLIENT_ID";

[[GAI sharedInstance] trackerWithTrackingId:@"UA-XXXX-Y"]; 

您可以查看 Analytics 登录了解更多信息。

You can check the reference docs for Analytics and Sign In for more.

这篇关于在不使用GoogleService-Info.plist的情况下使用Google Service for iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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