Problem building iOS project with Facebook cordova plugin

Has anyone experienced issues with creating an iOS project that uses the Facebook Native plugin?

I thought it might have been an issue from where I migrated my project from ionic v4 to v5, so I created a new project, but for some reason, which I can’t figure out, there’s a problem adding the Facebook native plugin to an iOS project.

iOS project created with cordova-ios@5.1.1
Installing "cordova-plugin-facebook4" for ios
Failed to install 'cordova-plugin-facebook4': undefined
CordovaError: Promise rejected with non-error: '/bin/sh: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory\n'
    at /usr/local/lib/node_modules/cordova/bin/cordova:29:15
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
2 Likes

Hello friend, I reinstalled cocoapod, with “sudo gem install cocoapods”.
I removed the ios platform.
And then I ran the run ios, it worked again.

I hope I helped.