CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile. export LANG=en_US.UTF-8

915

just change your cocoapos version to 1.10.2 to solve your problem.

first uninstall your current version (whatever it is)

In my case, i downgraded from version 1.11.1

sudo gem uninstall cocoapods

Then just install the stable version (as of Nov 11, 2021)

sudo gem install cocoapods:1.10.2

and build your app again.

If still not working , delete the below from the build directory:

  • Podfile
  • Podfile.lock
  • Pods (directory) and build.

It fixed it for me, twice in the last few days.

Share:
915
Admin
Author by

Admin

Updated on December 27, 2022

Comments

  • Admin
    Admin over 1 year
    [!] An error occurred while processing the post-install hook of the Podfile.
    
    undefined method `each_child' for #<Dir:0x00007ff3fa3555c0>
    Did you mean?  each_slice
    
    /Applications/FlutterSDK/flutter/packages/flutter_tools/bin/podhelper.rb:54:in `block in flutter_additional_ios_build_settings'
    /Applications/FlutterSDK/flutter/packages/flutter_tools/bin/podhelper.rb:51:in `each'
    /Applications/FlutterSDK/flutter/packages/flutter_tools/bin/podhelper.rb:51:in `flutter_additional_ios_build_settings'
    /Users/macpro5/Downloads/oos-master/ios/Podfile:39:in `block (3 levels) in from_ruby'
    /Users/macpro5/Downloads/oos-master/ios/Podfile:38:in `each'
    /Users/macpro5/Downloads/oos-master/ios/Podfile:38:in `block (2 levels) in from_ruby'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/podfile.rb:179:in `post_install!'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:897:in `run_podfile_post_install_hook'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:885:in `block in run_podfile_post_install_hooks'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:145:in `message'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:884:in `run_podfile_post_install_hooks'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:329:in `block (2 levels) in create_and_save_projects'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:328:in `block in create_and_save_projects'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:307:in `create_and_save_projects'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:299:in `generate_pods_project'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:178:in `integrate'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:166:in `install!'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
    
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:899:in `rescue in run_podfile_post_install_hook'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:896:in `run_podfile_post_install_hook'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:885:in `block in run_podfile_post_install_hooks'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:145:in `message'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:884:in `run_podfile_post_install_hooks'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:329:in `block (2 levels) in create_and_save_projects'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:328:in `block in create_and_save_projects'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:307:in `create_and_save_projects'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:299:in `generate_pods_project'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:178:in `integrate'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:166:in `install!'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/lib/ruby/gems/2.5.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'
    

    Error output from CocoaPods: ↳ WARNING: CocoaPods requires your terminal to be using UTF-8 encoding. Consider adding the following to ~/.profile:

        export LANG=en_US.UTF-8
        
    

    Error running pod install Error launching application on iPhone 12 Pro Max.