【发布时间】:2018-06-30 07:48:54
【问题描述】:
我正在为我的 iOS 应用程序集成 Google 跟踪代码管理器。我下载了所有必需的文件:TAGManager.h、TAGContainer.h、TAGContainerOpener.h、TAGDataLayer.h、TAGLogger.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