8

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

播客文件:

# 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 install上遇到错误

[!] 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)
4

2 回答 2

6

终于 Google 发布了 Google Tag Manager Pod 7.0.0 版本,这个问题解决了

于 2018-06-11T14:05:14.833 回答
5

更新:此问题已在 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"
}

播客文件

pod 'GoogleTagManager', podspec: './GoogleTagManager.podspec.json'
于 2018-06-04T10:10:07.103 回答