Dev Hacks for Web, Mobile & Beyond.

CocoaPods

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):
CocoaPods

How to solve the Cocoapods CDN Error error when executing pod update or pod install.

When executing pod update or pod install with Cocoapods 1.8.5, the error message is as follows: Update all pods Updating local specs repositories [!] CDN: trunk URL couldn't be downloaded: https://raw.githubusercontent.com/CocoaPods/Specs/master/Specs/ Response: 400 Solution: Follow the official documentation to add a source to the Podfile: # Uncomment the next line to define a global platform for your project source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' ... ... ... ...