ios – flutter xcode module firebase_core not found


i´m try to publish an app for testfllight on ios but i keep getting the following error with try to archive my app in xcode 15 “module firebase_core not found”. I already have done deleted the folde pods and podfile.lock and then run pod install and i keep getting the same error. I have also don a flutter clean, pub get and pod install and the same it keeps thorw the error. I only get the error when I do archive. When i do a build or run my app locally it works fine. I have open my Runner.xcworkspace and not Runner.xcodeproj in xcode.

I use fvm to manage the versions of flutter. The project uses fluttter 3.13.0

The following is my fvm flutter doctor -v log:

[!] Flutter (Channel stable, 3.13.0, on macOS 14.1 23B74 darwin-x64, locale es-MX)
    • Flutter version 3.13.0 on channel stable at /Users/felipeedejesusrodriguezontiveros/fvm/versions/3.13.0
    ! Warning: `dart` on your path resolves to /usr/local/Cellar/dart/3.1.5/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/felipeedejesusrodriguezontiveros/fvm/versions/3.13.0. Consider adding /Users/felipeedejesusrodriguezontiveros/fvm/versions/3.13.0/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (4 months ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/felipeedejesusrodriguezontiveros/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /usr/bin/java
    ✗ Could not determine java version
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.84.0)
    • VS Code at /Users/felipeedejesusrodriguezontiveros/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.78.0

[✓] Connected device (3 available)
    • iPhone de felipee de jesus (mobile) • 00008110-000A3D9A3461801E • ios            • iOS 17.1.2 21B101
    • macOS (desktop)                     • macos                     • darwin-x64     • macOS 14.1 23B74 darwin-x64
    • Chrome (web)                        • chrome                    • web-javascript • Google Chrome 119.0.6045.199

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 3 categories.

The following is my pod file:

# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!
  pod 'FirebaseCore'
  pod 'FirebaseMessaging'

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

The following is the log of xcode when doing a archive

log image

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img