CocoaPods Fails On Apple Silicon

Hi, I was trying to build my app on Apple Silicon on a DTK, but it fails, because the RubyGems is having some issues.

This is what happens when I run "pod install" in the terminal.




sudo arch -x86_64 gem install ffi

Then

arch -x86
_64 pod install
74

Worked for me!!! thanks!!!

I have a same problem.

Thank you, it's already almost 1 hour I'm trying to figured this out. Thanks

uninstalling the cocoapods package through gem (sudo gem uninstall cocoapods) and reinstalling it with homebrew (brew install cocoapods) fixed my problem.

26

Thanks. Work for me also

Worked for me:

> sudo gem uninstall cocoapods

> sudo gem uninstall ffi

> brew install cocoapods

> pod install

Seems it's related to Ruby ffi. Run the following commands:

1: sudo arch -x86_64 gem install ffi

2: arch -x86_64 pod install

Has anyone tries CocoaPods in Xcode 14 beta 5 (14A5294e)? I get a stew of errors when using:

1: sudo arch -x86_64 gem install ffi 2: arch -x86_64 pod install

pod install Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3 Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3

Analyzing dependencies xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in force_encoding': can't modify frozen String (FrozenError) from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in report' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in report_error' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in rescue in run' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>' from /usr/local/bin/pod:23:in load' from /usr/local/bin/pod:23:in ' /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError) from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in open' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1190:in block (2 levels) in inspect_targets_to_integrate' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in each' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1189:in block in inspect_targets_to_integrate' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:1184:in inspect_targets_to_integrate' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:106:in analyze' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in analyze' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in block in resolve_dependencies' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in resolve_dependencies' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in install!' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>' from /usr/local/bin/pod:23:in load' from /usr/local/bin/pod:23:in `'

Thanks for any tips

ReInstall Cocoapods from Homebrew (https://formulae.brew.sh/formula/cocoapods#default) : brew install cocoapods You may need to reinstall Homebrew first /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" this is from their homepage

same problem. How beautiful is the apple ecosystem, it is so beautiful that everything is wrong and you have to do 3 alternative routes to get to the road, how beautiful, very good, congratulations to those engineers who fail, something that with android I create a new project and I already work, here I have to take a course to discover the cure for cancer. Congratulations

this just shouldn't happen. Apple has no solution? Here is a quote from chatgpt re: this situation with owning the M! and OS 15.5 and xcode 16.3 and trying to program with cocoapods. Yes — you’ve absolutely run into the classic CocoaPods + Apple + Ruby versioning spiral of doom. And you’re not alone. This is an extremely common pain point when:

You use macOS + M1/M2/M3 chips (Apple Silicon),
Apple ships a newer Xcode that isn’t supported by your CocoaPods version,
Ruby was installed via rbenv or brew, and
CocoaPods doesn't behave like a good citizen between those environments.

Here's a recap of the issue Summary of Current Setup So Far (for your documentation): Step Command Output / Result A gem install cocoapods -v 1.14.3 ✅ Installed successfully B which pod user/bob/.rbenv/shims/pod C pod --version 1.14.3 D gem install xcodeproj --pre ✅ Installed xcodeproj-1.27.0

CONCLUSION: This confirms:

Xcode 16.3 writes .xcodeproj files with object version 90

The latest xcodeproj gem (1.27.0) only supports up to object version 77

Therefore, CocoaPods will crash every time with modern Xcode, no matter which version of cocoapods you use

✅ Clear Answer ❌ You cannot use CocoaPods right now unless:

Xcodeproj is updated to support object version 90
→ You’d have to wait for CocoaPods to release a compatible version

Or you downgrade Xcode to something that supports .xcodeproj object version 77
→ But this means downgrading to Xcode 15.x or lower, which won’t run on macOS 15.5 Sequoia
→ So you’re stuck.
CocoaPods Fails On Apple Silicon
 
 
Q