
How to Install CocoaPods on macOS Without Sudo (Sudo-less)
Using sudo gem install cocoapods on macOS can lead to permission issues and dependency conflicts. More importantly, this method ties CocoaPods to the system’s Ruby version, which can break after macOS updates.
A better approach is to install CocoaPods independently in your user directory, ensuring stability, flexibility, and the ability to manage multiple versions.
Step 1: Check Your gem Version: First, check if your gem version is up to date (2.6.14 or higher is recommended):