skip to Main Content

I have added GoogleService-Info.plist to iosRunner using XCode.

I created this Podfile

platform :ios, '10.0'

target 'Runner' do
  #use_frameworks!
  pod 'Firebase/Core'
  pod 'Firebase/Analytics'
end

pubspec.yaml has

  firebase_core: ^1.0.2
  firebase_analytics: ^7.1.1

Still get this error building on https://codemagic.io/

Xcode's output:
    /Users/builder/clone/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_analytics' not found
    @import firebase_analytics;

Thanks!!

2

Answers


  1. Chosen as BEST ANSWER

    OK the answer from @Ashok was a good start. After you delete the old Podfile and other stuff, you run pod install and a new Podfile is created. You need to add

    platform :ios, '9.0' #uncomment this
    

    and

    target 'Runner' do
      use_frameworks!
      use_modular_headers!
      pod 'Firebase/Analytics', '~> 7.3.0'  #Highest pod version that works with flutter firebase_analytics: ^7.1.1
    ...
    

    Also in AppFrameworkInfo.plist add/edit

      <key>MinimumOSVersion</key>
      <string>9.0</string>
    

    1. Delete the DerivedData from Xcode folder.

      Open Runner.xcworkspace inside the ios folder of your flutter project then select

      File -> Workspace Settings -> Click the grey arrow beside DerivedData path and delete the DerivedData inside the Xcode folder.

    2. Delete Podfile inside ios folder of your flutter project.

    3. Delete Podfile.lock inside ios folder of your flutter project.

    4. Change the Deployment Target to 12.0

    5. Clean your ios build folder (Command+Option+Shift+K) Or from the menu -> Product, press Option on your keyboard and you’ll see Clean Build Folder

    6. Run your application and it should work

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