Recently addded flutter flavours to a mobile app to create production and development environemnts. Now when I try to do an ios build, I am getting these erros upon doing flutter run --flavor Development
:
Launching lib/main.dart on iPhone 16 Plus in debug mode...
Running pod install... 2,691ms
Running Xcode build...
Xcode build done. 23.3s
Failed to build iOS app
Error (Xcode): Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-resources-Debug-Development-input-files.xcfilelist'
Error (Xcode): Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-resources-Debug-Development-output-files.xcfilelist'
Error (Xcode): Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-Development-input-files.xcfilelist'
Error (Xcode): Unable to load contents of file list: '/Target Support
Files/Pods-Runner/Pods-Runner-frameworks-Debug-Development-output-files.xcfilelist'
Could not build the application for the simulator.
Error launching application on iPhone 16 Plus.
I have tried to fully get rid of and reinstall flutter, pods, the repository itself and nothing seems to work. I have done endless pod deintegrates and updates and installs. Since the path of the error starts with /Target Support Files/... I also manually added /Pods/ as a environment variable in Xcode so it picks up the correct location and then I got this error:
Launching lib/main.dart on iPhone 16 Plus in debug mode...
Running pod install... 2,368ms
Running Xcode build...
Xcode build done. 52.9s
Failed to build iOS app
Error (Xcode): The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Could not build the application for the simulator.
Error launching application on iPhone 16 Plus.
After doing pod install
once again, I get the same error.
I have also tried to delete the input and output files under the [CP] Embed Pods Framework and [CP] Copy Pods Resources
[CP] Embed Pods Framework [CP] Copy Pods Resources
Has someone seen something like this before? How would I overcome this bug?