iosxcodefluttercocoapods

Error Regarding undefined method `map' for nil:NilClass for Flutter App / CocoaPod Error


I'm having an error regarding my Flutter application. When I run the "flutter run" script in terminal, I'm getting the following error from Cocoapods: "Error output from CocoaPods: Searching for inspections failed: undefined method `map' for nil:NilClass" (as seen also by the attached picture). enter image description here

How do I go about solving this issue?


Solution

  • Are you using Apple M1? I had this issue as well and after some research I find that it might be something to do with Rosetta. You can refer to Running CocoaPods on Apple Silicon (M1).

    I managed to solve this issue on my MacBook Air M1 by typing this in the terminal:

    sudo arch -x86_64 gem install ffi

    from here https://stackoverflow.com/a/65334677/13814270.