I built an app in Flutter. Initially, that app connected to a MySQL database and I had a perfectly working app for Android and iOS.
Recently I tried migrating to Firebase and again it works perfectly for Android. But an iOS build fails all the time due to XCode errors, which I can’t explain.
Naturally, I searched StackOverflow for similar problems and their solutions, but none of the solutions provided seem to work. This the result after doing a flutter build ios
Building org.mydomain.myapp for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: XXXXXXX
Running pod install... 16.0s
Running Xcode build...
Xcode build done. 32.3s
Failed to build iOS app
Error (Xcode): Multiple commands produce '/Users/myaccount/StudioProjects/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/FirebaseFirestoreInternal.framework'
Error (Xcode): Multiple commands produce '/Users/myaccount/StudioProjects/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/grpcpp.framework'
Error (Xcode): Multiple commands produce '/Users/myaccount/StudioProjects/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/grpc.framework'
Error (Xcode): Multiple commands produce '/Users/myaccount/StudioProjects/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/absl.framework'
Error (Xcode): Multiple commands produce '/Users/myaccount/StudioProjects/myapp/build/ios/Release-iphoneos/Runner.app/Frameworks/openssl_grpc.framework'
Encountered error while building for device.
Some solutions suggested to remove duplicate mentions of files in the Copy Bundle Resources
of my Runner project in XCode, but there are no duplicates.
Other suggested a clean install, removing all cache etc, like
pod cache clean
flutter clean
flutter pub get
pod install
or
flutter clean
cd ios && rm -rf Pods && rm Podfile.lock
pod cache clean --all
But the result is always the same
These are my current software versions:
Flutter 3.19.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 54e66469a9 (4 weeks ago) • 2024-04-17 13:08:03 -0700
Engine • revision c4cd48e186
Tools • Dart 3.3.4 • DevTools 2.31.1
Again, the build on Android works flawless.
Did anybody had the same issue and how can I solve this the right way? Help is much appreciated and if you need more info I would be happy to provide