Recently, the new project of pod reported this error. My Mac M1, record it
[cocoapods error]: searching for inspections failed: undefined method ` map ‘for nil: nilclass “error
Solution: execute the following command line
sudo arch -x86_64 gem install ffi
Then pop install