ios – Firebase not recognized in AppDelegate of my Flutter plugin


I wrote a Fluter plugin which shows native screens and in some I use Firebase which i do initialize in the ios/Classes/AppDelegate.swift file.
The problem is that when I run the example app I get No such module 'Firebase' on its import.
I did implement auth, analytics and crashlytics in the plugin .podspec file as:

Pod::Spec.new do |s|
  s.name="my_native_screens_plugin"
  s.version          = '0.0.1'
  s.summary          = 'A new Flutter plugin project.'
  s.description      = <<-DESC
A new Flutter plugin project.
                       DESC
  s.homepage="http://example.com"
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Your Company' => '[email protected]' }
  s.source           = { :path => '.' }
  s.source_files="Classes/**/*"
  s.dependency 'Flutter'
  s.dependency 'Firebase/Analytics', '10.9.0' 
  s.dependency 'Firebase/Auth', '10.9.0'
  s.dependency 'Firebase/Crashlytics', '10.9.0'
  s.dependency 'MBProgressHUD', '1.2.0'
  s.dependency 'PanModal', '1.2.7'
  s.dependency 'TouchDraw', '2.1.2'
  s.dependency 'MaterialComponents/Snackbar', '122.0.1'
  s.dependency 'MaterialComponents/TextFields', '122.0.1'
  s.dependency 'MaterialComponents/TextFields+Theming', '122.0.1'
  s.dependency 'MaterialComponents/Cards', '122.0.1'
  s.dependency 'MaterialComponents/BottomNavigation', '122.0.1'
  s.dependency 'MaterialComponents/Chips', '122.0.1'
  s.dependency 'MaterialComponents/Chips+Theming', '122.0.1'
  s.dependency 'MaterialComponents/Tabs+TabBarView', '122.0.1'
  s.dependency 'MaterialComponents/Buttons', '122.0.1'
  s.dependency 'YPImagePicker', '5.2.2'
  s.dependency 'SwiftRichString', '3.7.2'
  s.dependency 'IGListKit', '4.0.0'
  s.dependency 'SDWebImage', '5.13.1'
  s.ios.vendored_frameworks="kotlin-mpp/kotlin-mpp/build/cocoapods/framework/kotlin_mpp.framework"




  s.platform = :ios, '14.0'



  # Flutter.framework does not contain a i386 slice.
  s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
  s.swift_version = '5.0'
end

I did try to add s.dependency 'Firebase/CoreOnly', '10.9.0' as well as I saw it in the official Firebase packages, but it didn’t make any difference..

Can you spot if I’m doing anything wrong in the .podspec file??
Many thanks
Cheers

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img