1

its a strange issue, when I build and run app on simulator via android studio, I get the following error:

Launching lib/main.dart on iPhone SE (2nd generation) in debug mode... Upgrading AppFrameworkInfo.plist Running pod install... CocoaPods' output: ↳ CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in 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
        
    /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/bin/pod:23:in `load'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/bin/pod:23:in `<main>'
        from /Users/riyazatalidurrani/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:22:in `eval'
        from /Users/riyazatalidurrani/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:22:in `<main>'
    /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:205:in `podfile'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:46:in `run'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/lib/ruby/gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/bin/pod:23:in `load'
        from /Users/riyazatalidurrani/.rvm/rubies/ruby-2.6.6/bin/pod:23:in `<main>'
        from /Users/riyazatalidurrani/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:22:in `eval'
        from /Users/riyazatalidurrani/.rvm/gems/ruby-2.6.6/bin/ruby_executable_hooks:22:in `<main>'

Error running pod install
Error launching application on iPhone SE (2nd generation).

but when I build from Xcode, it builds perfectly.

6
  • 1
    Just follow the instructions. Commented Dec 7, 2021 at 6:24
  • couldnt get through. Commented Dec 7, 2021 at 6:30
  • open the terminal on your mac, type the command export LANG=en_US.UTF-8 and hit/press enter and restart the simulator. Commented Dec 7, 2021 at 6:47
  • i did that already, couldnt help Commented Dec 7, 2021 at 6:51
  • Did you update the ~/.profile and execute this command: source ~/.profile? Commented Dec 7, 2021 at 7:54

1 Answer 1

0

i got a brief solution to my question. after running the following commands one by one:

flutter clean
rm -Rf ios/Pods
rm -Rf ios/.symlinks
rm -Rf ios/Flutter/Flutter.framework
rm -Rf ios/Flutter/Flutter.podspec
flutter pub get
cd ios
pod install
arch -x86_64 pod install (On an M1 mac use => arch -x86_64 pod install)

here if you get UTF-8 error then run this command

export LC_ALL=en_US.UTF-8

and run arch -x86_64 pod install (On an M1 mac use => arch -x86_64 pod install) command again.

finally run flutter run command to start the simulator

Sign up to request clarification or add additional context in comments.

2 Comments

PS: if you have any broken link in the iOS folder, you can delete the folder and run "flutter create -I swift . " command to recreate it, and then run above commands.
'flutter pub upgrade --major-versions' command to update dependencies to latest version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.