I installed MapBox on Mac OS X 10.9.1 with CocoaPods but I ran into a link problem and the MapBox people recommended that I download directly from a tag in their archive. Unfortunately, I cannot get that tag to load.
Here's my Podfile with their suggestion:
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.0'
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk', :tag => '1.1.0'
pod 'TWTSideMenuViewController', '~> 0.3'
CocoaPods gets an error on the pod 'Mapbox' line (see below). It does not seem to be able to find the directory. I tried:
fetching a particular :commit to see if it was that tag (no)
changing the directory names to have only alphabetic characters (did not help)
changing the Pod directory to allow writes by everyone (did not help)
re-installing CocoaPods with sudo gem uninstall cocoapods, sudo gem install cocoapods (I got 0.29.0 again, but did not help get the tag sources)
Why is the pre-install hook unable to find (or create?) that directory?
Here's the output from 'pod install':
[!] An error occurred while processing the pre-install hook of Mapbox (1.1.0).
No such file or directory - /Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Mapbox
/Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Local Podspecs/Mapbox.podspec:25:in `chdir'
/Users/Bob/Documents/InfoBridge/projects/infobridge_aboutmywoods-ios/Pods/Local Podspecs/Mapbox.podspec:25:in `block (2 levels) in _eval_podspec'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:406:in `call'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.29.0/lib/cocoapods-core/specification.rb:406:in `pre_install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:489:in `run_spec_pre_install_hook'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:464:in `block (3 levels) in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:462:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:462:in `block (2 levels) in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:460:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:460:in `block in run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:113:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:459:in `run_pre_install_hooks'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:104:in `block in download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/user_interface.rb:52:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:101:in `download_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/installer.rb:87:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:38:in `run_install_with_update'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command/project.rb:68:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.4.0/lib/claide/command.rb:213:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods/command.rb:51:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:24:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in `<main>'
Thanks, Bob
If you have previously installed Mapbox uninstall it first. Then install it again.
Remove or comment this line in Podfile
pod 'MapBox', '~> 1.1.0'
Run command
pod install
This will remove Mapbox and all it dependencies.
Put back Mapbox to Podfile
pod 'Mapbox', :git => 'https://github.com/mapbox/mapbox-ios-sdk.git', :branch => 'develop'
Run pod install again
It helped in my case
Remove podFile.lock and the problem is solved.
Related
I keep getting above error using various gems (e.g. cocoapods, fastlane) on my mac (macOS 12.0.1). I'll focus on cocoapods in this question, since I believe (hope) that the underlying issue is the same in both gems (as they both give the same ultimate error)
Things I've tried
Given pod and ruby full disk access
Uninstalled and reinstalled cocoapods gem via
gem list --local | grep cocoapods | grep -Eo '^[^ ]+' | xargs sudo gem uninstall
Uninstalled and reinstalled rvm ruby via
rvm remove 3.0.0
Did a clean install of the OS.
Full error
### Error
```
Errno::EACCES - Permission denied # rb_file_s_rename - (/var/folders/1l/x3rpqz7s15l2dwnh2kgr1ykh0000gn/T/.atomos.project.pbxproj20220713-6547-97xiro, /Users/chris/Desktop/buildManagement/iosBuild/Unity-iPhone.xcodeproj/project.pbxproj)
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/atomos-0.1.3/lib/atomos.rb:26:in `rename'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/atomos-0.1.3/lib/atomos.rb:26:in `block in atomic_write'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tempfile.rb:317:in `open'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/atomos-0.1.3/lib/atomos.rb:17:in `atomic_write'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:364:in `save'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/user_project_integrator.rb:158:in `block in save_projects'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/user_project_integrator.rb:156:in `each'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/user_project_integrator.rb:156:in `save_projects'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/user_project_integrator.rb:76:in `integrate!'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:860:in `block in integrate_user_project'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:856:in `integrate_user_project'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:182:in `integrate'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:167:in `install!'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/Users/chris/.rvm/rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/Users/chris/.rvm/rubies/ruby-3.0.0/bin/pod:23:in `load'
/Users/chris/.rvm/rubies/ruby-3.0.0/bin/pod:23:in `<main>'
/Users/chris/.rvm/rubies/ruby-3.0.0/bin/ruby_executable_hooks:22:in `eval'
/Users/chris/.rvm/rubies/ruby-3.0.0/bin/ruby_executable_hooks:22:in `<main>'
```
Output of pod env
### Stack
```
CocoaPods : 1.11.3
Ruby : ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin21]
RubyGems : 3.2.3
Host : macOS 12.0.1 (21A559)
Xcode : 13.4.1 (13F100)
Git : git version 2.32.1 (Apple Git-133)
Ruby lib dir : /Users/chris/.rvm/rubies/ruby-3.0.0/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
```
### Installation Source
```
Executable Path: /Users/chris/.rvm/rubies/ruby-3.0.0/bin/pod
```
### 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
```ruby
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
target 'UnityFramework' do
pod 'AppLovinMediationGoogleAdapter', '9.6.0.1'
pod 'AppLovinMediationUnityAdsAdapter', '4.2.1.0'
pod 'AppLovinSDK', '11.4.3'
pod 'FBSDKCoreKit', '~> 13.2'
pod 'FBSDKCoreKit_Basics', '~> 13.2'
pod 'FBSDKGamingServicesKit', '~> 13.2'
pod 'FBSDKLoginKit', '~> 13.2'
pod 'FBSDKShareKit', '~> 13.2'
end
target 'Unity-iPhone' do
end
use_frameworks! :linkage => :static
use_frameworks!
```
I get the following Error everytime i try to run my Flutter App. I tried literally so much to fix it but still the Error isn't fixed.
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
[!] Unable to find a target named `testing_gowtham` in project `Runner.xcodeproj`, did find `Runner`.
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer/target_inspector.rb:108:in `compute_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer/target_inspector.rb:40:in `compute_results'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1189:in `block (3 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1187:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1187:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1185:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1185:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1180:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:106:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/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.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone 12 Pro Max.
Try this :
Cocoa Pods Installation in M1
sudo gem install cocoapods
sudo gem install ffi
arch -x86_64 sudo gem install cocoapods -n /usr/local/bin
sudo gem install cocoapods -n /usr/local/bin
Install ffi
sudo arch -x86_64 gem install ffi
#update repo
arch -x86_64 pod install --repo-update
Flutter iOS builds
flutter clean
flutter build ios
Re-install dependency in iOS folder of flutter project
arch -x86_64 pod install
Please follow this article to install the coca-pods. I also follow this article when I setup the flutter on my Macbook M1.
-> make sure you have enabled the rosetta in your terminal (discussed in the following article)
https://medium.com/codex/simple-way-to-use-cocoapods-on-m1-ac9e22cf7e1c
Good day everyone,
I am new to app development and I was trying to install Firebase Authentication for an app I am building.
I have installed xcode 11.6 and downloaded cocoa pods text file via the command prompt (sudo gem install cocoapods)to my project file.
I then edited the textFile with the Firebase dependencies (libraries) and used the following command:
pods init
then:
pods install
it returned the following error:
admins-MBP-2:Clean Wheels lyndon$ pod install
Analyzing dependencies
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
Command
/usr/local/bin/pod install
Report
What did you do?
What did you expect to happen?
What happened instead?
Stack
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/
Plugins
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
Podfile
# 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
Error
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>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
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
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...
Pod Headers Referenced by :path Not Updated
https://github.com/CocoaPods/CocoaPods/issues/2329 [closed] [1 comment]
08 Sep 2014
Crash when doing pod lib create without Demo project
https://github.com/CocoaPods/CocoaPods/issues/2337 [closed] [5 comments]
08 Sep 2014
pod lib create: why am I forced to use testing framework? Why also no XCTest?
https://github.com/CocoaPods/CocoaPods/issues/2338 [closed] [1 comment]
26 Jul 2014
and 9828 more at:
https://github.com/cocoapods/cocoapods/search?q=416%3A%20unexpected%20token%20at%20%27%7B%0A%20%20%20%20%20%20%22dependencies%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22Firebase%2FCoreOnly%22%3A%20%5B%0A%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22FirebaseD%27&type=Issues&utf8=✓
[!] Automatically assigning platform iOS with version 13.6 on target Clean Wheels because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
This looks like a corrupt CocoaPods cache:
pod cache clean --all
sudo rm -rf ~/.cocoapods/repos
Details at https://github.com/CocoaPods/CocoaPods/issues/9672#issuecomment-632810885
here is my pod file
platform :ios, '9.0'
target 'MaterialUi' do
# Pods for MaterialUi
pod 'MaterialComponents/TextFields'
end
i tried all the possible solutions
sudo gem install cocoapods
pod repo update
butt every time i got this!
## Report
What did you do?
What did you expect to happen?
What happened instead?
Stack
CocoaPods : 1.9.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.3 (19D76)
Xcode : 11.3.1 (11C504)
Git : git version 2.21.1 (Apple Git-122.3)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
Plugins
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.4.1
cocoapods-try : 1.1.0
Podfile
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'MaterialUi' do
# Pods for MaterialUi
pod 'MaterialComponents/Buttons'
end
Error
JSON::ParserError - 416: unexpected token at '"components/Collections/src/'
/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.1/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:742:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/specification.rb:716:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/source.rb:186:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:362:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/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.1/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/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.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=416%3A+unexpected+token+at+%27%22components%2FCollections%2Fsrc%2F%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...
Found no similar issues. To create a new issue, please visit:
https://github.com/cocoapods/cocoapods/issues/new
[!] Automatically assigning platform iOS with version 13.2 on target MaterialUi because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
Have the same problem on Xcode 11.3.1 (Swift 5) but I use "ActivityIndicator" component, instead "Buttons", it looks like the last version of MaterialComponents-pod is broken.
The solution that I found, you have to use last available number of version of your component, like this:
pod 'MaterialComponents/ActivityIndicator', '~> 107.4'
I had the same problem. Couldn't find help from anywhere. Then I append tag and worked for me. Example: pod 'MaterialComponents/TextFields', '~> 119.4.0'
Hope this will work for you.
you can try. its worked for me
pod 'MaterialComponents', :git => 'https://github.com/material-components/material-components-ios', :branch => ENV['DEFAULT_BRANCH']
When I try pod install after adding pod 'Firebase/Storage' I get this error...
Errno::EACCES - Permission denied # dir_s_mkdir -
/Users/nachshonfertel/Library/Caches/CocoaPods
That folder doesn't even exist? Any ideas? I tried pod update, uninstalling and reinstalling ect.
Here is the full error...
$ pod install
Analyzing dependencies
Downloading dependencies
Using BoringSSL (9.1)
Installing Firebase 4.8.0
――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
### Command
```
/usr/local/bin/pod install
```
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
```
CocoaPods : 1.5.3
Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
RubyGems : 2.5.2
Host : Mac OS X 10.13.5 (17F77)
Xcode : 9.4.1 (9F2000)
Git : git version 2.15.2 (Apple Git-101.1)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 0f34dee0f260b4b053d1a2bf5d529c3c7fd31380
```
### Plugins
```
cocoapods-deintegrate : 1.0.2
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.3.0
cocoapods-try : 1.1.0
```
### Podfile
```ruby
platform :ios, '9.0'
target 'Sudsters' do
use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod 'Firebase/Messaging'
pod 'Firebase/Storage'
end
```
### Error
```
Errno::EACCES - Permission denied # dir_s_mkdir - /Users/nachshonfertel/Library/Caches/CocoaPods
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:225:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:211:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:576:in `mkpath'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/config.rb:90:in `cache_root'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/downloader.rb:33:in `download'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:121:in `download_source'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer/pod_source_installer.rb:60:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:374:in `install_source_of_pod'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:339:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:85:in `titled_section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:338:in `block in install_pod_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:321:in `install_pod_sources'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:164:in `block in download_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:162:in `download_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:117:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
I answered it here: CocoaPods folder does not exist / permissions error
This took me 2 full days to figure it out!
I was able to solve the problem by going to
/Users/{myusername}/Library/Caches/
in Finder and manually adding the folder
CocoaPods
Cocoapods takes care of the rest when you run pod install again.