3

I am getting this error when I run my flutter project in iOS simulator:

warning: [CP] Unable to find matching .xcframework slice in myProject/ios/Pods/FirebaseFirestore/FirebaseFirestore/abseil.xcframework abseil framework ios-i386_x86_64-simulator ios-x86_64-maccatalyst ios-armv7_arm64' for the current build architectures (arm64 x86_64 i386).

In android emulator and iOS device it's working fine.

SardorbekR
  • 1,388
  • 3
  • 18
  • 33

2 Answers2

4

Worked for me:

rm ios/Podfile

Then upgrade your packages:

flutter pub upgrade

And update your podfile:

cd ios && pod update

Then clean and run:

flutter clean && flutter run
SardorbekR
  • 1,388
  • 3
  • 18
  • 33
  • If you want to try that answer make sure to backup your Podfile first, it can contains necessary changes and dependencies for your project. – electroid May 17 '22 at 11:55
2

In order to fix that issue I was needed to set "Build Active Architecture Only (ONLY_ACTIVE_ARCH)" to Yes for the library. You can do that manually but changes will be lost once you re-run pod install.

In order to set that automatically you can make necessary changes in your ios/Podfile, here's code example:

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

    target.build_configurations.each do |config|
        config.build_settings["ONLY_ACTIVE_ARCH"] = "YES"
    end

  end
end

This was inspired by another answer, you can find more info if you need by following that link https://stackoverflow.com/a/64139830/1078641

electroid
  • 603
  • 8
  • 20