Unable to Archive Flutter App in Xcode: 'Operation not permitted' Error

I use to archive my app all the time and never had this problem the other day i implemented apple pay in my app but when i wanted to archive the app i couldnt and kept getting this error over and over even tho i tried all the solutions online

Error : error: shell-init: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted chdir: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted chdir: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted chdir: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted chdir: error retrieving current directory: getcwd: cannot access parent directories: Operation not permitted Standalone embedder initialization failed: Error determining current directory: Operation not permitted

i tried to go to settings Security & Privacy->Full Disk Access then allow xcode

Replies

I solve this issue by changing Access setting:

Go to Menu System Preferences -> Security & Privacy. 2.Choose the Privacy Tab. 3.Select Full Disk Access item in left list. 4.Select Xcode in right list.

you can see https://github.com/flutter/flutter/issues/57552