iOs:Swift Google 分析

iOs: Swift Google Analytics

我是 iOs 开发新手,想实施 Google Analytics (swift)。

swift Google 分析中似乎缺少一些关于实施 Google 分析的信息 Google's instruction page:

上面的导入语句似乎不正确,谁能帮我解决missing/correct语句?

额外信息:

如果您查看 Xcode 中的 Pods 文件夹,您可以在那里看到可用的 pods。他们中的大多数通常有一个文件,其中包含所需文件的所有导入语句。在这种情况下,它是 Pods/Google/Analytics/

中的 Analytics.h 文件

我猜想,要在桥接 header 中导入此文件(我希望你有,如果没有让我知道),你可以使用 #import "Google/Analytics.h".

它还在页面下方说了一点,将<Google/Analytics.h>导入header。

在您的 Objective-C 桥接头文件中,您应该导入 GA 头文件:

#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"

我不确定我是否遗漏了一些导入。