gpt4 book ai didi

ios - GoogleTagManager 警告 : No default container found. Container needs to be added to a container folder and added to the target

转载 作者:可可西里 更新时间:2023-11-01 03:26:50 34 4
gpt4 key购买 nike

在我的 Swift 应用程序中尝试实现 Google Tag Manager v5 时,我遇到了以下警告,这给我带来了一些麻烦:

GoogleTagManager warning: No default container found. Container needs to be added to a container folder and added to the target.

我花了比应该多的时间,而且由于我的问题的答案很难找到而且不在 SO 上,我决定创建这个问答,以防有人遇到和我一样的情况!

最佳答案

首先,确保您使用的是正确的 GTM 容器类型:它应该显示为 iOS,而不是此处的 iOS(旧版):https://tagmanager.google.com/?hl=en#/home

然后,在您的项目中创建一个名为container 的文件夹,并在其中下载您的实际容器。 Download the container into a container folder in your project

现在,您只需导入刚刚创建的文件夹:

  • 右键单击 Xcode 文件树
  • “将文件添加到‘MyProject’”
  • 点击容器文件夹
  • 然后是选项按钮
    • 选择创建文件夹引用
    • 如果需要,还选择复制项目
    • 选择您的目标
  • 点击添加按钮。

Add files options view

现在一切都应该按预期工作了!为了确保您做对了,容器文件夹在 Xcode 文件树中应显示为蓝色文件夹,而不是黄色文件夹。

关于ios - GoogleTagManager 警告 : No default container found. Container needs to be added to a container folder and added to the target,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41807340/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com