Xcode 11 + project with git + iCloud Drive sync = problem

Hi,

Since the last few days, after the installation of the latest XCode 11 (GM1, GM2, appstore), I have big problems with icloud drive syncing my projects that contains a git directory.


From times to times (i believe, after I change the sources, or commit a task) iCloud forces a complete upload/dowloads of all my sources (even the ones outside the folder of my project) and that takes forever / slows my internet connection.


Also, this sync messes up my git :

The invisible ".git" folder (that xcode creates inside my project directory) , is automatically renamed by iCloud to a "git 2" file that is not a real folder anymore.


Am a the only one this this very annoying problem and is there something to fix it ?

Until then it was perfectly possible to have a git source control (proposed by XCode) coexist with icloud drive backup.

Accepted Reply

Don't keep Xcode projects in any kind of synced location. Just use git.

Replies

Don't keep Xcode projects in any kind of synced location. Just use git.

Thank you.

I guess I'll stick to that rule.

I don't really know how it was magically working until then.


This is quite an annoying limitation.

Quite a lot of projects contains .git folders (even samples codes from apple), and if you, for instance, unzip the project to a folder in sync with iCloud (like by default the Documents or the Desktop folders) then you take the risk to mess all your previously synced data.

iCloud Drive, and especially Desktop and Documents, is a consumer feature. No professional, including developers, should ever use it.

Your statement is outright wrong and you try to cover Apple's fault. iCloud Drive had been working more or less without any serius issues up until Catalina. Personally, I had zero troubles keeping my Xcode projects in sync with iCloud Drive prior to Catalina. Also, I've never heard Apple advertizing iCloud Drive's Documents and Desktop sync as a feature not for prosumers. Quite the opposite: they addvertise Mac as the machine for professionals, and so I see no logical mistake in concluding that all it's features are designed with pro users in mind. Even Dark Mode, as they advertise it.


Unfortunately, as of 10.5.5 the problem only got worse. If you try to e.g. pull changes, xcode project gets corrupted. The only solution is indeed to stop storing projects in iCloud Drive. Also, somewhat radical solution, stop using this buggy software complex and switch to a more stable platform. Personally, I wait till macOS 10.6 is released to give it last chance, and if nothing is fixed I switch.

I am not aware of specific new problems with Catalina but it is important to be realistic about the situation before Catalina.

I have worked with xcode projects on iCloud for some time. It is a perfectly reasonable way of continuously duplicating a project that you are working on to an offsite location and particularly useful when traveling and wanting a backup of your changes on storage that isn't travelling with you.

But it is insane to imagine that you can edit the project on multiple machines without breaking something. Though you may get away with it for a while, particularly if the machines are always likely to be fully synced before a change is made.

Sorting out incompatible changes made to two source copies and then synced together is not something that iCloud Drive or any other distributed file system can do. That is what GIT and a skilled GIT user are for. And to make it worse if you are using GIT you are not just corrupting your project structure and content by syncing together two incompatible sets of changes to both the product structure and the source files, but you are syncing together two incompatible sets of changes to the GIT representation too.

"Likely to be fully synced..." can only mean that you are likely to get away with it for a while. Do it for long enough and it will bite your leg off.