【问题标题】:Google Tag Manager Implementation谷歌标签管理器实施
【发布时间】:2018-06-30 07:48:54
【问题描述】:

我正在为我的 iOS 应用程序集成 Google 跟踪代码管理器。我下载了所有必需的文件:TAGManager.hTAGContainer.hTAGContainerOpener.hTAGDataLayer.hTAGLogger.h

当我在我的项目中添加这些时,代码会编译,但是当它开始链接时,它会抛出如下错误:

Undefined symbols for architecture arm64:
"OBJC_CLASS$_TAGContainerOpener", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我在 AppDelegate.swift 文件中添加了以下代码:

TAGContainerOpener.openContainer(withId: "GTM-PT3L9Z",
tagManager: GTM, openType: kTAGOpenTypePreferFresh,
timeout: nil,
notifier: self)

谁能告诉我为什么会出现此链接错误。

【问题讨论】:

    标签: ios swift3 google-tag-manager


    【解决方案1】:

    我相信您可能正在使用旧的实现。最新版本是 v5 (Firebase + GTM),这里是 docs

    【讨论】:

    • 我安装了 pod 文件,但仍然遇到同样的问题。请帮帮我
    • @XamarinDev 您能否对错误更加具体?我过去处理过这个实现,你需要逐步阅读文档上的所有内容并丢弃你在以前的实现中所做的任何事情,这并不容易。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-08-26
    • 2018-04-13
    • 1970-01-01
    • 1970-01-01
    • 2014-07-15
    • 2015-07-28
    • 2015-12-29
    相关资源
    最近更新 更多