Flutter failed to read a file at build/ios/debug-iphonesimulator/.last_build_id

If you get this error, in your XCODE under Runner → Build Settings, do a search in the top right for ‘sandbox’ and change:

User Script Sandboxing to No