Post

Replies

Boosts

Views

Activity

Reply to Workarounds for Xcode previews errors: Cannot preview in this file - Failed to Launch
I did another test on two different machines seemingly configured in the same way (macOS 26.4.1, Xcode 26.5), and got divergent results. These are the steps I've taken in each case: In System Preferences > Privacy & Security, remove Xcode from Full Disk Access and Files & Folders. Reboot. Open a project under the Documents folder. The user is prompted to grant Xcode access to the Documents folder. If access is denied, Xcode correctly reports that it doesn't have permissions to open the project (Xcode can still create new projects inside Documents, but I assume that this is expected behavior). In System Preferences > Privacy & Security > Files & Folder, grant Xcode access to the Documents folder. Restart Xcode and reopen the same project. The project can now be opened. At this point, in one machine the preview shows up correctly, but in the other machine I get the “Failed to launch” error I've originally posted, and I need to apply one of the workarounds I've originally mentioned (move the project folder or toggle automatic refresh) to be able to see the previews. So, I cannot reproduce the issue consistently: there is something else going on in one of my machines, but I don't know how to debug it further. PS: Glad to know that the interaction is with humans making genuine mistakes! If you ever implement bots in this forum, I hope that they will clearly marked as such. My apologies to the engineers if my reply sounded harsh.
May ’26
Reply to Workarounds for Xcode previews errors: Cannot preview in this file - Failed to Launch
Is that an AI-generated answer? I have already mentioned that putting the project in a directory different from a “special” directory such as Documents works. I've posted my message to help people who may encounter the same issue, as it took me some time to figure it out. What is confusing here is that Xcode has full disk access, yet a project in Documents raises a permission error. Maybe there is some other process that is invoked by preview and needs to be granted access to the Documents folder (or any other “special” folder where the project is located)?
May ’26
Reply to Workarounds for Xcode previews errors: Cannot preview in this file - Failed to Launch
I did another test on two different machines seemingly configured in the same way (macOS 26.4.1, Xcode 26.5), and got divergent results. These are the steps I've taken in each case: In System Preferences > Privacy & Security, remove Xcode from Full Disk Access and Files & Folders. Reboot. Open a project under the Documents folder. The user is prompted to grant Xcode access to the Documents folder. If access is denied, Xcode correctly reports that it doesn't have permissions to open the project (Xcode can still create new projects inside Documents, but I assume that this is expected behavior). In System Preferences > Privacy & Security > Files & Folder, grant Xcode access to the Documents folder. Restart Xcode and reopen the same project. The project can now be opened. At this point, in one machine the preview shows up correctly, but in the other machine I get the “Failed to launch” error I've originally posted, and I need to apply one of the workarounds I've originally mentioned (move the project folder or toggle automatic refresh) to be able to see the previews. So, I cannot reproduce the issue consistently: there is something else going on in one of my machines, but I don't know how to debug it further. PS: Glad to know that the interaction is with humans making genuine mistakes! If you ever implement bots in this forum, I hope that they will clearly marked as such. My apologies to the engineers if my reply sounded harsh.
Replies
Boosts
Views
Activity
May ’26
Reply to Workarounds for Xcode previews errors: Cannot preview in this file - Failed to Launch
Is that an AI-generated answer? I have already mentioned that putting the project in a directory different from a “special” directory such as Documents works. I've posted my message to help people who may encounter the same issue, as it took me some time to figure it out. What is confusing here is that Xcode has full disk access, yet a project in Documents raises a permission error. Maybe there is some other process that is invoked by preview and needs to be granted access to the Documents folder (or any other “special” folder where the project is located)?
Replies
Boosts
Views
Activity
May ’26