FileSave does not always work

I have been working on a web app for three days without the file being properly saved. I have a build step script to save the file automatically. Today I clicked File|Save before exiting Xojo. When I came back to it, it loaded a version from several days ago. The iCloud drive folder where the binary source file was stored has 40 TempSaveFileXXXXXXXXX files where XXXXXXXXX is a seemingly random number that does not correlate with the time stamp. I am using the current release of Xojo on an M1 Mac-Mini. I had a similar problem on a Windows 10 machine last October. Is there any way to recover the project with the last TempSaveFile? Is there a way to prevent it in the future?

This was probably caused by my ignorance of MacOS. I just bought my first Mac in more than 15 years and probably have it configured wrong. I just noticed that when I start Xojo and select a recent project to open, the latest one is in my user Documents folder on the Mac but the TempSaveFiles are all in the iCloud Drive Documents folder. No idea how they got there or how to fix it.

By default, your Mac files are also saved, synchronized, on iCloud. It’s the same on Windows 10 when you have OneCloud installed.

Working on cloud files with any software development tools can be lead to corruption. It’s better to save locally and do backups on a regular fashion.

On your Mac mini go to settings, there should be an icon for iCloud where you can enable or disable Synchronisation and also pick what directories are synchronised.

  • Don’t synchronise to iCloud.
  • Don’t use your project on Dropbox.
  • If you don’t use text format at least use external project items.

Synchronising to iCloud belongs to the most stupid ideas of Apple - ever.

And

BEFORE YOU TURN OFF ICLOUD

MAKE SURE YOU MAKE A COPY OF YOUR FILES TO A USB DRIVE

My apologies for the capitals, but iCloud is an abomination.
When its on, things don’t work properly
When you turn it off, it literally deletes the files from your machine.
In theory, you can copy them back from the cloud, but its a lot easier to do it from a USB drive.