【发布时间】:2017-11-26 19:45:14
【问题描述】:
现在不推荐使用 Google cocoapod,我已切换到使用 GoogleAnalytics pod 并修改了我的桥接头以导入以下内容:
#import "GAI.h"
#import "GAIDictionaryBuilder.h"
#import "GAIEcommerceFields.h"
#import "GAIEcommerceProduct.h"
#import "GAIEcommerceProductAction.h"
#import "GAIEcommercePromotion.h"
#import "GAIFields.h"
#import "GAILogger.h"
#import "GAITrackedViewController.h"
#import "GAITracker.h"
现在我的构建总是失败:
GGLContext.sharedInstance().configureWithError(&configureError)
在 Google 文档中找不到任何内容,而且 Google 搜索也被证明是徒劳的。
非常感谢您指出正确方向的观点,或者甚至指出我遗漏的痛苦明显的东西。
【问题讨论】:
-
您需要在 Project - Build Settings - Swift Compiler Code Generation 下添加正确的桥头路径。
-
这不是重复的 - 新的 pod 有问题并且文档尚未更新。我在使用 GoogleSignin 时遇到了类似的问题。通常,您只需“导入 Google”即可获取上下文,但是,新 pod 中不再存在此命名空间。
-
我也刚刚更新到 GoogleAnalytics,我也遇到了同样的问题!你知道如何解决吗?谢谢!
-
@ordinaryman09 我认为 GA 已经被整合到 Firebase 中,尝试使用它可能会更好。
标签: ios google-analytics cocoapods bridging-header