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