【发布时间】:2017-12-27 21:44:17
【问题描述】:
我正在尝试在 podspec 中的 lib 项目中安装“Google/Analytics”。
我的项目库是使用 Swift 的 pod lib create 创建的。
这是我的 podspec:
s.source_files = 'Pod/类/**/*' s.resource_bundles = { 'LibPSLoginResources' => ['Pod/Resources/**/*.{xib,png,json}'] } s.dependency 'FBSDKCoreKit' s.dependency 'FBSDKLoginKit' s.dependency '谷歌/分析' s.dependency 'Firebase/Auth' s.dependency 'Firebase/Core' s.dependency 'Firebase/数据库'我的 Pod 文件:
源'https://github.com/CocoaPods/Specs.git' 平台:ios,'8.0' 禁止所有警告! 使用_frameworks! 目标'LibPSLogin_Example'做 pod 'LibPSLogin', :path => '../' 目标'LibPSLogin_Tests'做 继承! :search_paths 结尾 结尾但是当总是运行 pod install 我得到这个: 目标具有传递依赖项,包括静态二进制文件: (/Users/macpr/Documents/Projects/iOS/LibPSLogin/Example/Pods/Google/Libraries/libGGLAnalytics.a 和 /Users/macpr/Documents/Projects/iOS/LibPSLogin/Example/ Pods/Google/Libraries/libGGLCore.a)
我已经尝试将此代码放入我的 PodFile 中,但无法通过 .swift 文件导入 Google Analytics。
pre_install 做 |安装程序| def installer.verify_no_static_framework_transitive_dependencies;结尾 结尾据我所知,库项目无法导入静态库。但是我能做些什么来解决这个问题呢? 谁能帮帮我?
谢谢
【问题讨论】:
-
您可能想尝试GoogleReporter,它是一种开源替代方案,可让您在 iOS 9+ 中集成 Google Analytics(分析)
标签: ios swift google-analytics cocoapods firebase-analytics