While building Ionic app on MAC if you are getting the following issue:
LoadError - dlsym(0x7fe291e235f0, Init_ffi_c): symbol not found - /Library/Ruby/Gems
The solution is to go to terminal at the /ios/app folder location of Ionic app and run these commands:
sudo gem install ffi pod install sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Build the Xcode ios project again and the issue will be fixed now.