Getting error when running app on iOS simulator in Flutter after installing cloud_firestore package

968

Solution 1

U need to delete the podfile.lock

then u need to run iOS folder from XCode to load assets for your projects

Go to ios folder and execute pod install and if it doesn't exist execute pod init then pod install

Please try Xcode -> Product -> Run

Solution 2

First delete podfile.lock and follow the steps below ;

flutter clean
flutter pub get
cd ios
pod install
flutter run

If doesnt work check your flutter channel and change it to beta.

flutter pub upgrade
flutter channel beta
flutter clean
cd ios
pod install
flutter run

Also you can switch back to stable typing below;

flutter channel beta

Solution 3

This solved my issue GitHub issue

try running these commands in your ios directory:

rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
pod cache clean --all
flutter clean
flutter pub get
pod repo update
pod install
Share:
968
Kudos
Author by

Kudos

Magician by work{Developer}. Programming is my profession and having Hunger of Knowledge. Experience in iOS Development. Worked on React native, Flutter for Mobile Development. Interested in IOT, ML, AI Technologies. Always ready to understand Internal Flow in Technology.

Updated on December 06, 2022

Comments

  • Kudos
    Kudos over 1 year

    I have tried even pod update Firebase/Firestore still getting below error when running on iOS simulator after installing cloud_firestore package.

    Even I have tried to delete Podfile.lock many times and flutter clean then flutter run.

    Note:

    1. Flutter version: Flutter 2.0.2

    2. Dart 2.12.1

      Failed to build iOS app Error output from Xcode build: ↳ ** BUILD FAILED **

      Xcode's output:
      ↳
          In file included from /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/internal/thread_identity.cc:26:
          In file included from /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/call_once.h:34:
          /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/internal/invoke.h:42:10: fatal error: 'absl/meta/type_traits.h' file not found
          #include "absl/meta/type_traits.h"
                   ^~~~~~~~~~~~~~~~~~~~~~~~~
          /Users/gwl/firebase_demo/ios/Pods/abseil/absl/base/internal/invoke.h:42:10: note: did not find header 'meta/type_traits.h' in framework 'absl' (loaded from
          '/Users/gwl/firebase_demo/build/ios/Debug-iphonesimulator/abseil')
          1 error generated.
          note: Using new build system
          note: Building targets in parallel
          note: Planning build
          note: Constructing build description
      
      Could not build the application for the simulator.
      Error launching application on iPhone 11.
      
    • anirudh
      anirudh almost 3 years
      Check this