'Installing cocoapods on Mac with M1 chip issues
I've been trying to install cocoapods
and I managed to do that but now I'm getting this issue.I've gone through home-brew
to install the latest version of ruby
and cocoapods
onto my Mac.
% pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Command
/usr/local/bin/pod update
Stack
CocoaPods : 1.11.3
Ruby : ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]
RubyGems : 3.3.11
Host : macOS 12.3.1 (21E258)
Xcode : ()
Git : git version 2.32.0 (Apple Git-132)
Ruby lib dir : /usr/local/Cellar/ruby/3.1.2/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, '13.0'
target 'DatingApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
inhibit_all_warnings!
use_frameworks!
# Pods for DatingApp
pod 'FBSDKCoreKit', '= 9.0.1'
pod 'FBSDKLoginKit', '= 9.0.1'
pod 'FBSDKShareKit', '= 9.0.1'
pod 'Firebase/Core', '= 7.5.0'
pod 'Firebase/Auth', '= 7.5.0'
pod 'Firebase/Database', '= 7.5.0'
pod 'Firebase/Messaging', '= 7.5.0'
pod 'Firebase/Storage', '= 7.5.0'
pod 'Firebase/Firestore', '= 7.5.0'
pod 'Alamofire', '= 5.4.1'
pod 'Kingfisher', '= 6.1.0'
pod "Koloda", '= 5.0.1'
pod 'Eureka', '= 5.3.2'
end
Error
JSON::ParserError - 451: unexpected token at '{
"name": "Cronet-Implementation",
"header_mappings_dir": ".",
"dependencies": {
"gRPC-C++/Cronet-Interface": [
"1.28.0"
],
"gRPC-C++/Implementation": [
"1.28.0"
],
"gRPC-Core/Cronet-Implementation": [
"1.28.0"
]
},
"source_files": "src/cpp/client/cr'
/usr/local/Cellar/ruby/3.1.2/lib/ruby/3.1.0/json/common.rb:216:in `parse'
/usr/local/Cellar/ruby/3.1.2/lib/ruby/3.1.0/json/common.rb:216:in `parse'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification.rb:748:in `from_string'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/specification.rb:722:in `from_file'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/source.rb:188:in `specification'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/usr/local/Cellar/ruby/3.1.2/lib/ruby/3.1.0/delegate.rb:348:in `block in delegating_block'
/usr/local/Cellar/ruby/3.1.2/lib/ruby/3.1.0/delegate.rb:349:in `block in delegating_block'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:178:in `dependencies_for'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:18:in `block in dependencies_for'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:17:in `dependencies_for'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:809:in `block in group_possibilities'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:808:in `reverse_each'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:808:in `group_possibilities'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:779:in `possibilities_for_requirement'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:761:in `push_state_for_requirements'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/usr/local/lib/ruby/gems/3.1.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/resolver.rb:94:in `resolve'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command/update.rb:63:in `run'
/usr/local/lib/ruby/gems/3.1.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/3.1.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:25:in `load'
/usr/local/bin/pod:25:in `<main>'
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
[Link to github CocoaPods issues](https://github.com/CocoaPods/CocoaPods/search?q=451%3A+unexpected+token+at+%27%7B%0A++++++%22name%22%3A+%22Cronet-Implementation%22%2C%0A++++++%22header_mappings_dir%22%3A+%22.%22%2C%0A++++++%22dependencies%22%3A+%7B%0A++++++++%22gRPC-C%2B%2B%2FCronet-Interface%22%3A+%5B%0A++++++++++%221.28.0%22%0A++++++++%5D%2C%0A++++++++%22gRPC-C%2B%2B%2FImplementation%22%3A+%5B%0A++++++++++%221.28.0%22%0A++++++++%5D%2C%0A++++++++%22gRPC-Core%2FCronet-Implementation%22%3A+%5B%0A++++++++++%221.28.0%22%0A++++++++%5D%0A++++++%7D%2C%0A++++++%22source_files%22%3A+%22src%2Fcpp%2Fclient%2Fcr%27&type=Issues)
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:NilClass
report.issues = results['items'].map { |item| Issue.new(item) }
^^^^
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|