"Multiple commands produce...FBSDKCoreKit.framework" when trying to build iOS app from Flutter project

(copied this whole thing from my stackoverflow post), shortened to fir the character limit

I after upgrading my iOS to 16.4.1, which required me to upgrade my XCode to 14.3, which required me to upgrade my mac os from 12 to 13, I get this error when trying to build my iOS Flutter app:

Multiple commands produce '/Users//Library/Developer/Xcode/DerivedData/Runner-bczatismiambuefczuntppsiskse/Build/Products/Debug-iphoneos/Runner.app/Frameworks/FBSDKCoreKit.framework'

Target 'Runner' (project 'Runner') has copy command from '/Users//Documents/AndroidStudioProjects//ios/Pods/FBSDKCoreKit/XCFrameworks/FBSDKCoreKit.xcframework/ios-arm64/FBSDKCoreKit.framework' to '/Users/<my-name/Library/Developer/Xcode/DerivedData/Runner-bczatismiambuefczuntppsiskse/Build/Products/Debug-iphoneos/Runner.app/Frameworks/FBSDKCoreKit.framework'

That command depends on command in Target 'Runner' (project 'Runner'): script phase “[CP] Embed Pods Frameworks”

I have NOT added any new packages, pods, plugins whatever... it's just after my iOS and Mac OS (and XCode) updates, that I get this error.

I have checked this stackoverflow question, which didn't help me.

The error messages mention “[CP] Embed Pods Frameworks” so here's a screenshot of that under Build Phases in XCode:

And here's a screenshot of the "Build Phases" > "Copy Bundle Resources" section in my XCode, if that matters. (no Info.plist in there)


My Podfile:

# Uncomment this line to define a global platform for your project
platform :ios, '13.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

#install! 'cocoapods', :disable_input_output_paths => true #didn't work from https://github.com/flutter/flutter/issues/20685

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
  
  
  # pods for firebase: //firebase: https://firebase.google.com/docs/ios/setup?authuser=0#available-pods
  # Add the Firebase pod for Google Analytics
  pod 'FirebaseAnalytics'

  # For Analytics without IDFA collection capability, use this pod instead
  # pod ‘Firebase/AnalyticsWithoutAdIdSupport’

  # Add the pods for any other Firebase products you want to use in your app
  # For example, to use Firebase Authentication and Cloud Firestore
  pod 'FirebaseAuth'
  pod 'GoogleSignIn'
  pod 'FBSDKCoreKit' # https://stackoverflow.com/questions/60005793/no-such-module-facebookcore-in-swift-5#answer-61751523
  pod 'FBSDKLoginKit' #<- only this one is mentioned in the docs: https://developers.facebook.com/apps/828723188239449/fb-login/quickstart/?sdk=cocoapods
  pod 'FirebaseFirestore'
  pod 'FirebaseFunctions'
  pod 'FirebaseAppCheck'
  
end

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

My AppDelegate.swift file:

import UIKit
import Flutter

//firebase: https://firebase.google.com/docs/ios/setup?authuser=0#available-pods
import FirebaseCore

import FirebaseAnalytics

import FirebaseAuth
//OAuth:
import GoogleSignIn
//import FacebookCore //from the official docs: https://developers.facebook.com/docs/facebook-login/ios#delegate
import FBSDKCoreKit //correction: https://stackoverflow.com/questions/60005793/no-such-module-facebookcore-in-swift-5#answer-61751523
import FBSDKLoginKit

import FirebaseFirestore
import FirebaseFunctions

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
      
      //from https://firebase.google.com/docs/app-check/flutter/debug-provider?authuser=0&hl=en#apple_platforms
#if DEBUG
    let providerFactory = AppCheckDebugProviderFactory()
    AppCheck.setAppCheckProviderFactory(providerFactory)
#endif
      
    GeneratedPluginRegistrant.register(with: self)
    
    // Use Firebase library to configure APIs
//    FirebaseApp.configure() //-> Exception: Thread 1: "Default app has already been configured."
    if (FirebaseApp.app()==nil){
      FirebaseApp.configure()
    }
    
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

Edit: I added additional screenshots showing every file named "Info.plist" within my project (searched via Mac OS Finder).

This first screenshot shows THE main Info.plist file:


In this second screenshot, you can see 9 Info.plist files within the same project, but they are all inside Pods:

  • FBSDKCoreKit
  • Google-Mobile-Ads-SDK
  • FBSDKLoginKit
  • GoogleUserMessagingPlatform
  • FBAEMKit
  • FirebaseAnalytics
  • GoogleAppMeasurement
  • FBSDKCoreKit_Basics
  • GoogleAppMeasurement (inside another folder as 2 lines above)

my flutter doctor output:

"Multiple commands produce...FBSDKCoreKit.framework" when trying to build iOS app from Flutter project
 
 
Q