在不使用GoogleService-Info.plist的情况下使用Google Service for iOS [英] Using Google Service for iOS without using GoogleService-Info.plist
问题描述
我可以使用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"];
You can check the reference docs for Analytics and Sign In for more.
这篇关于在不使用GoogleService-Info.plist的情况下使用Google Service for iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!