Cocoa Pods 不安装 Firebase 的依赖项(不创建 .xcworkspace 文件)
Cocoa Pods Not Installing Dependencies for Firebase (Not creating the .xcworkspace file)
大家好,
我是应用程序开发的新手,我正在尝试为我正在构建的应用程序安装 Firebase 身份验证。
我已经安装了 xcode 11.6 并通过命令提示符下载了 cocoa pods 文本文件 (sudo gem install cocoapods ) 到我的项目文件。
然后我使用 Firebase 依赖项(库)编辑文本文件并使用以下命令:
pods 初始化
然后:
pods 安装
它返回了以下错误:
admins-MBP-2:Clean Wheels lyndon$ pod install
分析依赖关系
――― 降价模板 ――――――――――――――――――――――――――――――――――――― ――――――――――――――――――
命令
/usr/local/bin/pod install
举报
你做了什么?
你预计会发生什么?
发生了什么?
堆栈
CocoaPods : 1.9.3
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.6 (19G73)
Xcode : 11.6 (11E708)
Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
插件
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
播客文件
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Clean Wheels' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Clean Wheels
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
end
错误
JSON::ParserError - 416: unexpected token at '{
"dependencies": {
"Firebase/CoreOnly": [
],
"FirebaseD'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
―――模板结束―――――――――――――――――――――――――――――――――――― ―――――――――――――――――――――――
[!]哦不,发生错误。
搜索与您的问题类似的现有 GitHub 问题:
https://github.com/CocoaPods/CocoaPods/search?q=416%3A+unexpected+token+at+%27%7B%0A++++++%22dependencies%22%3A+%7B%0A++++++++%22Firebase%2FCoreOnly%22%3A+%5B%0A%0A++++++++%5D%2C%0A++++++++%22FirebaseD%27&type=Issues
如果 none 存在,请使用上面显示的模板在以下时间创建工单:
https://github.com/CocoaPods/CocoaPods/issues/new
请务必先阅读投稿指南,了解有关如何正确提交票证的详细信息:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
不要忘记匿名化任何私人数据!
正在 cocoapods/cocoapods...
上寻找相关问题
Pod Headers 由 :path 引用未更新
https://github.com/CocoaPods/CocoaPods/issues/2329 [关闭] [1 条评论]
2014 年 9 月 8 日
在没有演示项目的情况下创建 pod lib 时崩溃
https://github.com/CocoaPods/CocoaPods/issues/2337 [关闭] [5 条评论]
2014 年 9 月 8 日
pod lib create:为什么我被迫使用测试框架?为什么也没有 XCTest?
https://github.com/CocoaPods/CocoaPods/issues/2338 [关闭] [1 条评论]
2014 年 7 月 26 日
[!] 在目标 Clean Wheels
上自动分配版本 13.6
的平台 iOS
,因为未指定平台。请在 Podfile 中为此目标指定一个平台。参见 https://guides.cocoapods.org/syntax/podfile.html#platform
。
这看起来像是损坏的 CocoaPods 缓存:
pod cache clean --all
sudo rm -rf ~/.cocoapods/repos
详情见 https://github.com/CocoaPods/CocoaPods/issues/9672#issuecomment-632810885
大家好,
我是应用程序开发的新手,我正在尝试为我正在构建的应用程序安装 Firebase 身份验证。
我已经安装了 xcode 11.6 并通过命令提示符下载了 cocoa pods 文本文件 (sudo gem install cocoapods ) 到我的项目文件。
然后我使用 Firebase 依赖项(库)编辑文本文件并使用以下命令:
pods 初始化 然后: pods 安装
它返回了以下错误:
admins-MBP-2:Clean Wheels lyndon$ pod install 分析依赖关系
――― 降价模板 ――――――――――――――――――――――――――――――――――――― ――――――――――――――――――
命令
/usr/local/bin/pod install
举报
你做了什么?
你预计会发生什么?
发生了什么?
堆栈
CocoaPods : 1.9.3
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.6 (19G73)
Xcode : 11.6 (11E708)
Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
插件
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
播客文件
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'Clean Wheels' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for Clean Wheels
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
pod 'Firebase/Auth'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
end
错误
JSON::ParserError - 416: unexpected token at '{
"dependencies": {
"Firebase/CoreOnly": [
],
"FirebaseD'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
―――模板结束―――――――――――――――――――――――――――――――――――― ―――――――――――――――――――――――
[!]哦不,发生错误。
搜索与您的问题类似的现有 GitHub 问题: https://github.com/CocoaPods/CocoaPods/search?q=416%3A+unexpected+token+at+%27%7B%0A++++++%22dependencies%22%3A+%7B%0A++++++++%22Firebase%2FCoreOnly%22%3A+%5B%0A%0A++++++++%5D%2C%0A++++++++%22FirebaseD%27&type=Issues
如果 none 存在,请使用上面显示的模板在以下时间创建工单: https://github.com/CocoaPods/CocoaPods/issues/new
请务必先阅读投稿指南,了解有关如何正确提交票证的详细信息: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
不要忘记匿名化任何私人数据!
正在 cocoapods/cocoapods...
上寻找相关问题Pod Headers 由 :path 引用未更新 https://github.com/CocoaPods/CocoaPods/issues/2329 [关闭] [1 条评论] 2014 年 9 月 8 日
在没有演示项目的情况下创建 pod lib 时崩溃 https://github.com/CocoaPods/CocoaPods/issues/2337 [关闭] [5 条评论] 2014 年 9 月 8 日
pod lib create:为什么我被迫使用测试框架?为什么也没有 XCTest? https://github.com/CocoaPods/CocoaPods/issues/2338 [关闭] [1 条评论] 2014 年 7 月 26 日
[!] 在目标 Clean Wheels
上自动分配版本 13.6
的平台 iOS
,因为未指定平台。请在 Podfile 中为此目标指定一个平台。参见 https://guides.cocoapods.org/syntax/podfile.html#platform
。
这看起来像是损坏的 CocoaPods 缓存:
pod cache clean --all
sudo rm -rf ~/.cocoapods/repos
详情见 https://github.com/CocoaPods/CocoaPods/issues/9672#issuecomment-632810885