Reproduction steps:
1. Create a new project for the iOS platform
2. In Build Settings window (File > Build Settings…), select Build
3. In the opened navigation window, choose a folder that already has files
4. In the warning pop-up regarding version and different target device setting, select Replace
Expected result: A warning that all folder contents will be deleted is presented, or the Xcode project is built in a new folder in the chosen directory
Actual result: All files in the chosen folder are deleted
Reproducible with: 2021.3.53f1, 2022.1.0a1, 2022.3.63f1, 6000.0.51f1, 6000.1.9f1, 6000.2.0b7
Reproducible on: macOS Sequoia 15.5 (M1 Max)
Not reproducible on: Windows 11
Notes:
- On Windows 11, a warning is shown that all files and folders in the target folder will be deleted and the full path of the target folder is displayed
- If the Editor does not find the folder where the previous build was done, it defaults to “Documents” folder (on macOS), which could result in massive data loss if confirmed unattentively