I keep facing intermittent build failures for the ios build of my Flutter project. Android is working fine. Every few days this happens, and then I do a combination of deleting my Pods folder and Podfile.lock file, pod cache clean --all, and running pod install, and the errors magically go away. This time however, nothing seems to be working and I keep getting the errors.
I am completely stuck and would really appreciate any help from my fellow developers. Here is the log I get when trying to run on iOS simulator (the weird part is that the errors are always different on every build):
UPDATE MAY 14th:
So after doing a number of things, I am now getting another error. I did a flutter run --verbose and in the logs I noticed this:
The path does not exist
Command PhaseScriptExecution failed with a nonzero exit code
After some more digging I realized it's coming from xcode_backend.sh (in the Flutter/packages/flutter_tools/bin/directory). It's because the property FLUTTER_APPLICATION_PATH isn't defined.
I see this property in ios/Flutter/Generated.xcconfig, so I don't know where else it should be defined. Any ideas?