[CocoaPods error]: Searching for inspections failed: undefined method `map' for nil:NilClass"

I have a CocoaPods error on my Mac M1. the following error from Cocoapods:Searching for inspections failed: undefined method `map' for nil:NilClass".


I solve this issue on my Mac M1 by typing this in the terminal:

sudo arch -x86_64 gem install ffi