Error
error: [ +2 ms] Flutter failed to write to a file at
"/Users/xxx/Library/Developer/Xcode/DerivedData/Runner-dvqipsdgxufjehghornphompkzpe/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildPro
ductsPath/Release-iphoneos/.last_build_id".
Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user.
Try running:
sudo chown -R $(whoami)
/Users/xxx/Library/Developer/Xcode/DerivedData/Runner-dvqipsdgxufjehghornphompkzpe/Build/Intermediates.noindex/ArchiveIntermediates/Run
ner/BuildProductsPath/Release-iphoneos/.last_build_id
[ ]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _throwFileSystemException (package:flutter_tools/src/base/error_handling_io.dart:844:3)
#2 _handlePosixException (package:flutter_tools/src/base/error_handling_io.dart:774:3)
#3 _runSync (package:flutter_tools/src/base/error_handling_io.dart:610:7)
#4 ErrorHandlingFile.writeAsStringSync (package:flutter_tools/src/base/error_handling_io.dart:278:5)
#5 FlutterBuildSystem.trackSharedBuildDirectory (package:flutter_tools/src/build_system/build_system.dart:750:23)
#6 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:659:5)
#7 AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:328:32)
#8 FlutterCommand.run.
#9 AppContext.run.
#10 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
#11 FlutterCommandRunner.runCommand.
#12 AppContext.run.
#13 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)
#14 run.
#15 AppContext.run.
#16 main (package:flutter_tools/executable.dart:93:3)
Failed to package /Users/dandan/flutter_projects/english_ipa.
note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is
unchecked. (in target 'Runner' from project 'Runner')
note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is
unchecked. (in target 'Runner' from project 'Runner')
Solution
Update your Xcode project build option ENABLE_USER_SCRIPT_SANDBOXING
to 'No'.