【发布时间】:2018-02-19 12:42:48
【问题描述】:
我正在尝试将Firebase-Analytics 集成到我的Unity 2013.3.1 项目中。
关注integration guide后,我尝试构建项目。
但是,Unity 无法构建。原因好像是cocoapods。
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In Podfile:
Firebase/Analytics (= 4.8.1)
None of your spec sources contain a spec satisfying the dependency: `Firebase/Analytics (= 4.8.1)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
我尝试重新安装 cocoapods 并重新运行 pod setup,并删除 repo 并使用 rm -rf ~/.cocoapods/repos/master 重新设置,但没有成功。
这是生成的 Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
target 'Unity-iPhone' do
pod 'Firebase/Analytics', '4.8.1'
pod 'Firebase/Core', '4.8.1'
end
我尝试的最后一件事是将特定版本标签删除到 Podfile 中(我删除了“4.8.1”)。这修复了 pod install,但是 我找不到从 unity 成功构建的方法,因为 Podfile 是自动生成的。
这是移除版本标签后的 pod install 输出:
Analyzing dependencies
Downloading dependencies
Installing Firebase (4.9.0)
Installing FirebaseAnalytics (4.0.9)
Installing FirebaseCore (4.0.15)
Installing FirebaseInstanceID (2.0.9)
Installing GoogleToolboxForMac (2.1.3)
Installing nanopb (0.3.8)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `Unity-iPhone.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There are 2 dependencies from the Podfile and 6 total pods installed.
看起来FirebaseAnalytics 当前的版本是 4.0.9,而不是 4.8.1。
有没有人遇到过类似的问题?
【问题讨论】:
-
两年后,这仍然是相关的。为什么选择 Google……为什么?
标签: ios firebase unity3d cocoapods firebase-analytics