skip to Main Content

I’m using cloud firestore in my flutter application and I want to run app on IOS.
When i run my app on iOS device its give me that error:

/ios/Runner/generatedPluginRegistrant.m:10:9: fatal error: module 'cloud_firestore' not found
    @import cloud_firestore;
     ~~~~~~~^~~~~~~~~~~~~~~
    1 error generated.
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro.

this is my podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'

target 'Runner' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for Runner

pod 'Firebase/Auth'
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.0.0'


end

and when i add pods i also do flutter clean and pod install and after flutter run. And i faced this problem

2

Answers


  1. Just change version of cloud_firestore: in pubspec.yaml like below

    cloud_firestore: ^2.2.2
    

    Then run:

    flutter clean
    flutter run 
    
    Login or Signup to reply.
  2. 1-flutter clean
    2-rm -rf Pods
    3-rm Podfile.lock
    4-sudo gem install cocoapods-deintegrate cocoapods-clean
    5-Pod clean
    6-pod init
    7-flutter pub get
    8-flutter run 
    

    Perfect
    make sure the package is up to date

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search