Xcode Issues

I'm using Xcode to edit Linux Swift Packages over the LAN, but recently (possibly since 13.3.1) there are recurring issues.



The first 2 happen when I copy a Linux Project folder to my Mac.
The 3rd can happen after I've deleted everything from DerivedData on the Mac.

I can't imagine why Xcode would need to save anything on the Linux host - other than the source files being edited.

I really like using Xcode to the point of never considering anything else, but these issues are becoming a pain. Some might say "use GitHub", but that has caused untold problems for me. Also, sometimes Xcode will just quit - all on its own.

Am I using Xcode the wrong way, or are these bugs?

Xcode issues should be reported to Apple but they'd likely say they don't support running it off of working directories on network shares.

Xcode is rather buggy, so it's not really surprising you're seeing such issues.

You can run a Linux VM locally and have the VM share files on disk, which should be more reliable. Alternatively, edit locally and share from your Mac to the Linux machine, rather than vice versa, which should be more reliable on the Mac side.

You should never make assumptions about what Xcode should or shouldn't do, as it's unconstrained by any logic you may think up. It has a variety of hidden directories, caches, and working product storage to manage, any of which can be stored in different location based on Xcode's whims and settings. You may want to check that your working directory isn't set to your local project directory, as Xcode really hates when that directory is remote, or even just in directories synced to iCloud.

But yes, another solution is just to use git.

Thanks Jon.

Are you saying, I should have the master source files on the Mac as if it were a Mac project. Then copy the edited files over to the Linux host?

If so, this sounds like a good idea and I wouldn't need to backup the Linux at all, as I backup the Mac to 2 external disks regularly. However, when I rename or delete one of the files, I would need to remember to manually keep the Linux file in sync. So, perhaps I should learn how to use rsync, instead of drag-and-drop over SAMBA