The error you're encountering indicates an issue with the ffi gem during the CocoaPods update. The error message suggests trying to run the gem pristine command to fix it.
Using terminal - run the following command:
gem pristine ffi --version 1.16.3
This command will attempt to restore the ffi gem to its pristine state, resolving any issues with its extensions. After running this command, try running pod update again
pod update
If you encounter any permission issues, you might need to use sudo
sudo gem pristine ffi --version 1.16.3
However, flagging it's generally recommended to avoid using sudo with gem to prevent potential issues with permissions and gem/environment mismatches.
After successfully updating the ffi gem, try updating your CocoaPods dependencies again. If the issue persists, you might need to investigate further, and it could be related to your Ruby environment or other gems.