Last login: Wed Sep 18 11:07:41 on ttys000
king@kingdeMac-mini ~ % cd /Users/king/Desktop/QianXunDemo
king@kingdeMac-mini QianXunDemo % pod install
Analyzing dependencies
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Command
/Users/king/.rubies/ruby-3.3.5/bin/pod install
Report
What did you do?
What did you expect to happen?
What happened instead?
Stack
CocoaPods : 1.15.2
Ruby : ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [arm64-darwin23]
RubyGems : 3.5.16
Host : macOS 14.4 (23E214)
Xcode : ()
Git : git version 2.39.3 (Apple Git-146)
Ruby lib dir : /Users/king/.rubies/ruby-3.3.5/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
Plugins
cocoapods-deintegrate : 1.0.5
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.1
cocoapods-trunk : 1.6.0
cocoapods-try : 1.2.0
Podfile
# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'
target 'QianXunDemo' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
pod 'KRProgressHUD'
pod 'SnapKit'
pod 'Toast-Swift', '~> 5.0.1'
pod 'PullToRefreshKit'
pod 'HandyJSON'
pod 'Alamofire'
pod 'RxSwift'
pod 'RxCocoa'
pod 'IQKeyboardManagerSwift'
pod 'lottie-ios'
pod 'Kingfisher'
pod 'Google-Mobile-Ads-SDK'
pod 'FirebaseRemoteConfig'
pod 'FBSDKCoreKit'
target 'QianXunDemoTests' do
inherit! :search_paths
# Pods for testing
end
target 'QianXunDemoUITests' do
# Pods for testing
end
end
Error
JSON::ParserError - Failed to parse JSON at file: '/Users/king/.cocoapods/repos/trunk/Specs/9/b/5/FBSDKCoreKit/13.1.0/FBSDKCoreKit.podspec.json'.
unexpected token at '{
"name": "FBSDKCoreKit",
"version": "13.1.0",
"summary": "Official Facebook SDK for iOS to access Facebook Platform core features",
"description": "The Facebook SDK for iOS CoreKit framework provides:\n* App Events (for App Analytics)\n* Graph API Access and Error Recovery\n* Working with Access Tokens and User Profiles",
"homepage": "https://developers.facebook.com/docs/ios/",
"license": {
"type": "Facebook Platform License",
"text": " Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved.\n\n You are hereby granted a non-exclusive, worldwide, royalty-free license to use,\n copy, modify, and distribute this software in source code or binary form for use\n in connection with the web services and APIs provided by Facebook.\n\n As with any software that integrates with the Facebook platform, your use of\n this software is subject to the Facebook Platform Policy\n [http://developers.facebook.com/policy/]. This copyright notice shall be\n included in all copies or substantial portions of the software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
},
"authors": "Facebook'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/specification/json.rb:66:in `rescue in from_json'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/specification.rb:759:in `from_string'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/specification.rb:733:in `from_file'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:188:in `specification'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/3.3.0/delegate.rb:348:in `block in delegating_block'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/3.3.0/delegate.rb:349:in `block in delegating_block'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/resolver.rb:178:in `dependencies_for'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:18:in `block in dependencies_for'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:17:in `dependencies_for'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:809:in `block in group_possibilities'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:808:in `reverse_each'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:808:in `group_possibilities'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:779:in `possibilities_for_requirement'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:761:in `push_state_for_requirements'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:696:in `attempt_to_filter_existing_spec'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:672:in `attempt_to_activate'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:422:in `analyze'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:162:in `install!'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Users/king/.rubies/ruby-3.3.5/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
/Users/king/.rubies/ruby-3.3.5/bin/pod:25:in `load'
/Users/king/.rubies/ruby-3.3.5/bin/pod:25:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil
king@kingdeMac-mini QianXunDemo %
解决方法:可能是某些第三方sdk库需要指定的xcode版本才能pod,
可以先把podfile文件中的第三方库注释起来,然后逐个解开注释去pod,当你你发现pod报错时就可以找到是哪个第三方库指定了xcode或者macos或者pods版本要求,在cocoapods官网找到这个第三方库,查看限定pod条件,
所以
要么更新xcode版本,更新cocoapods版本,或者指定第三方库的pod版本