Home > Blockchain >  Flutter can't build on ios module 'cloud_firestore' not found @import cloud_firestore
Flutter can't build on ios module 'cloud_firestore' not found @import cloud_firestore

Time:10-06

I'm using codemagic to deploy to my app on App Store. Android build is fine, but when it builds for IOS I get this error:

 /Users/builder/clone/ios/Runner/GeneratedPluginRegistrant.m:12:9: fatal error: module 'cloud_firestore' not found
    @import cloud_firestore;

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
end

I did pod install and update, but I can't flutter build ios because I'm on Windows. How can I fix this?

CodePudding user response:

I had this problem multiple times, here is my process for fixing it:

  • upgrade Firebase pub package
  • Remember to have the Firebase Core package added as well
  • Remember to add the GoogleService-Info.plist to the Runner folder of your ios/Runner.xcworkspace using Xcode since it needs to be linked.
  • using terminal flutter clean
  • flutter pub get
  • cd ios
  • pod cache clean --all
  • pod install
  • pod update

then try to run the project again or build it again.

CodePudding user response:

For me I just update deployment target to the same as define in Pod file.

Note you need to open Runner.xcworkspace not Runner.xcodeproj

  • Related