CocoaPods Installation Error on Mac Mini M4 Pro with Unity 6

Hello Unity Community,

I’m encountering an issue while trying to install CocoaPods for iOS development in Unity.

Environment:

  • Unity Version: 6 (6000.0.24f1)
  • Current Hardware: Mac Mini M4 Pro
  • OS: macOS Sequoia 15.2
  • Ruby version: 2.6.0.210 (system default)

Previous Working Environment:

  • MacBook M1 Pro - Everything worked perfectly fine with the same Unity and CocoaPods setup. The issue only appeared after switching to the Mac Mini M4 Pro.

Error Message:
When trying to install CocoaPods through iOS Resolver, I receive the following error:

“Failed to install CocoaPods for the current user.
ERROR: Error installing cocoapods:
The last version of securerandom (>= 0.3) to support your Ruby & RubyGems was 0.3.2.”

The error suggests that there’s a version mismatch with Ruby, as securerandom requires Ruby version >= 3.1.0, but the current system Ruby version is 2.6.0.210.

I’ve tried:

  1. Installing CocoaPods through terminal
  2. Using the iOS Resolver in Unity

What’s particularly puzzling is that this exact setup works flawlessly on my MacBook M1 Pro, but fails on the Mac Mini M4 Pro. This suggests the issue might be specific to the new hardware or its configuration.

Has anyone encountered this issue with the latest Unity 6 on Apple Silicon Macs? Any suggestions for resolving this would be greatly appreciated.

Thank you in advance for your help!

Just follow the instruction. Go to terminal and run the commands which are being provided, like Try installing it with ‘gem install securerandom -v 0.3.2’
So go to terminal and write ‘gem install securerandom -v 0.3.2’.
if you get permissions error then write ‘sudo gem install securerandom -v 0.3.2’

Then maybe you get error for drb and other missing dependencies. try installing them with same method.

Hope you resolve your issue

I’m also finding the same issue with the same setup, just the latest version of Unity 6000.0.42f1
I’ve tried the commands, they run correctly but still get this same error…

Does anyone have any tips?

xcode-select --install
sudo gem install -n /usr/local/bin cocoapods

it works perfect!

Here is what worked for me

  • Install Brew
  • brew install ruby
  • Add to ~/.profile following line
    • export PATH=“/opt/homebrew/opt/ruby/bin:$PATH”

doesn’t work at all

Just install cocoapods yourself using Brew:

brew install cocoapods