Rumtime error during CocoaPod initialisation - ios

I'm getting the below error when trying to run 'pod init' from Terminal. I have tried installing HomeBrew as well, but getting error there as well.
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:333:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'

Open your project in Xcode, and under Project Document, change the Project Format into XCode13.0 compatible.

Related

How to make pod init work for my Xcode project?

I am trying to integrate Firebase to my Xcode project using Cocoapods.
I'm running macOS Monterey 12.6 with Xcode 14.
But when I get to the part where I have to create a Podfile inside my project using pod init I run into this
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>
I have tried updating Ruby, tried installing Cocoapods through brew install Cocoapods , installed Command Line Tools, nothing is working so far. I keep running into this same error.
Any help is highly appreciated!

'Error Output From CocoaPods' When Run Flutter Apps On iOS

I clone my flutter apps from GitHub,it worked on android. When I try to run on iOS, there is some issue. Below is the result when I try run the code. I don't know how to debug.
Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running pod install...
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
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `unicode_normalize'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `installation_root'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:226:in `podfile_path'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:30:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `unicode_normalize'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `installation_root'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:226:in `podfile_path'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:205:in `podfile'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:46:in `run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone SE (3rd generation).

Flutter: Error "The 'Pods-Runner' target has frameworks with conflicting names: appinvokesdk.xcframework."While installing app in IOS Simulator

I am trying to install my app in debug mode into IOS Simulator i got Following error:
-> Installing webview_flutter_wkwebview (0.0.1)
- Running pre install hooks
[!] The 'Pods-Runner' target has frameworks with conflicting names: appinvokesdk.xcframework.
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:67:in `verify_no_duplicate_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:54:in `block (2 levels) in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:48:in `each_key'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:48:in `block in verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:47:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:47:in `verify_no_duplicate_framework_and_library_names'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:597:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:163:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
I have try Some online solution like Clearing Cache file, deleting POD File and again install POD File but still cant find Solution for this error.

How to solved this 'Error output from CocoaPods" problem?

When I am using vs code that time ios simulator worked fine but When the same project wanted to run on Android Studio for Flutter application development that time I faced this kind of problem. I could not understand what will be the proper solution for this.
Running pod install...
CocoaPods' output:
↳
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in the repo update
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
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:205:in `podfile'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:46:in `run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
Error running pod install
Error launching application on iPhone 12 Pro Max.
What is the problem and why it's not working properly?

Error when running pod update for the second time with cocoapods

coming across an error when running cocoapods. I successfully ran pod update with no issues. Then ran the Swift 3.0 migrate assistant. There are a few pods I now want to remove from my project. I have commented them out of the pod file but when I run pod update again I get the following error:
Errno::EEXIST - File exists - /Users/myname/Documents/MyProj/MyProj Dev/ios-app/Pods/Target Support Files/AMPopTip
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:92:in `mkdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:92:in `mkdir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:92:in `create_support_files_dir'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:21:in `block in install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:142:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:19:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:155:in `block (2 levels) in install_libraries'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:153:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:153:in `block in install_libraries'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:142:in `message'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:152:in `install_libraries'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:64:in `generate!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:179:in `block in generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:178:in `generate_pods_project'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/installer.rb:115:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/command/update.rb:60:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/lib/cocoapods/command.rb:50:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.1.0.rc.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Any ideas what I am doing wrong here? Any pointers would be really appreciated! Thanks!

Resources