I'm trying to build my react native project using the xcode. Project gets build successfully but its not running on the simulator or on the device.
Whenever i'm trying to build the app i get the below error:
Details
The file “myapp” couldn’t be opened because you don’t have permission to view it. Domain: NSCocoaErrorDomain Code: 257 Failure Reason: You don’t have permission. Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info. User Info: { NSFilePath = "/Users/myuser/Library/Developer/Xcode/DerivedData/myapp-aylojruwzhsbrrbwomkiwefxqlxv/Build/Products/Debug-iphonesimulator/myapp.app"; }
The operation couldn’t be completed. Permission denied Domain: NSPOSIXErrorDomain Code: 13 Failure Reason: Permission denied
System Information
macOS Version 10.15.7 (Build 19H512) Xcode 12.4 (17801) (Build 12D4e)
I have tried to solve this by removing the DerivedData folder and even checking the permission of the folder. Currently all the files in this folder are set to my system user and staff and all the files have permission set to 755.
Also i tried changing the system privacy setting by giving full access to Xcode but still i'm facing the same issue.
Can anyone help me on this?