GTM(Google跟踪代码管理器)6.0和Firebase Analytics 5.0版本发生冲突

问题描述 投票:6回答:2

新的Firebase版本5.0导致版本与Google跟踪代码管理器发生冲突。有人有解决方案吗?

Podfile:

# Analytics
pod 'Firebase/RemoteConfig', '~> 5.0.0'
pod 'Firebase/Core', '~> 5.0.0'
pod 'GoogleTagManager', '~> 6.0'
pod 'GoogleIDFASupport'
pod 'GooglePlaces', '~> 2.7.0'

安装pod安装时出错:

[!] CocoaPods could not find compatible versions for pod "FirebaseAnalytics":
  In Podfile:

Firebase/Core (~> 5.0.0) was resolved to 5.0.0, which depends on
  FirebaseAnalytics (= 5.0.0)

Firebase/RemoteConfig (~> 5.0.0) was resolved to 5.0.0, which depends on
  FirebaseRemoteConfig (= 3.0.0) was resolved to 3.0.0, which depends on
    FirebaseAnalytics (~> 5.0)

GoogleTagManager (~> 6.0) was resolved to 6.0.0, which depends on
  FirebaseAnalytics (~> 4.0)
swift cocoapods google-tag-manager firebase-analytics xcode9.3
2个回答
4
投票

更新:此问题已在GoogleTagManager 7.0.0中得到解决。

过时的答案:似乎Firebase Analytics 5.x中没有向后不兼容的更改,主要版本崩溃是由于iOS 7支持的下降。这不是我的项目的问题,所以我刚刚为GoogleTagManager创建了修补的podspec。

GoogleTagManager.podspec.json

{
  "authors": "Google, Inc.",
  "dependencies": {
    "FirebaseAnalytics": "~> 5.0",
    "GoogleAnalytics": "~> 3.17",
    "GoogleUtilities": "~> 1.3"
  },
  "description": "Google Tag Manager is a tool to easily deploy analytics and marketing tags.",
  "frameworks": [
    "AdSupport",
    "CoreTelephony",
    "JavaScriptCore",
    "SystemConfiguration",
    "UIKit"
  ],
  "homepage": "https://www.google.com/tagmanager",
  "libraries": [
    "sqlite3",
    "z"
  ],
  "license": {
    "text": "Copyright 2017 Google",
    "type": "Copyright"
  },
  "name": "GoogleTagManager",
  "platforms": {
    "ios": "7.0"
  },
  "resources": [
    "Frameworks/frameworks/GoogleTagManager.framework/Resources/TagManagerResources.bundle"
  ],
  "source": {
    "http": "https://dl.google.com/dl/cpdc/07041f585a34f209/GoogleTagManager-6.0.0.tar.gz"
  },
  "summary": "Google Tag Manager - create and update tags easily",
  "vendored_frameworks": [
    "Frameworks/frameworks/GoogleTagManager.framework"
  ],
  "version": "6.0.0"
}

Podfile

pod 'GoogleTagManager', podspec: './GoogleTagManager.podspec.json'

3
投票

最后Google发布了Google跟踪代码管理器Pod版本7.0.0,此问题已解决

© www.soinside.com 2019 - 2024. All rights reserved.