Help and Warning - Xcode Project, iCloud Drive, APFS and time machine

probably not the vast place to put this question/problem but it might avoid problem to some people


________

i save my Xcode project in my document folder on my drive formatted APFS,

My document are sync to iCloud dDrive and i have a time machine.


After having some problem with Git lately, (maybe related to the same issue) I was doing a copy of my project folder and renaming by adding date and time and a comment


a few days ago, I did open my Xcode project on another computer but after using it, I quit Xcode and left the computer open.


Yesterday evening, I did had a warning saying one of my UIViewController was modified by another app. I did not understand , checked it, and re-saved it. But that was early in the evening, and work for another 8 hours after that


I worked all night, on my main computer until about 4:30 am. (I can see that Time Machine did a back up a 5:35 AM.)


This morning I opened Xcode and one of my view controller was in red, doing a right click on it and Show in the finder, it was there in the right folder, I made a copy of it on the desktop but both copy were from 2 days ago.


then I realize that a few others files had a modified date of 2 days ago.

New file I created last night are ok, but old one did not had a trace of my new code


I look into my backup folder and SAME thing, I really don't understand but every folder copy I did during the night, reverted back to 2 days ago (for 1 or two file controller at least)


So I enter time machine and restore the back up that was made at 5:35 am, again same problem with both file and back up folder


But I really dont understand how a copy of a folder I create a 10 hours ago can have a copy of a file from 2 days ago even when I modified the file a few minutes before the copy. Not sure what cause the problem.



i am moving my project to my Download folder where there is no icloud and probably will create a new project and redo every files one by one.

i will try to restart my GIt and continu to do my folder backup but will zip it right away.

Replies

I know this was posted like 6 months ago but I’ve come to find out copy and pasting a project folder is bad! Learned the hard way but fortunately it wasn’t too bad. Doing that somehow moved my imageassets so I was stuck copying them back and then some other stuff.

I prefer to use Alt-Drag to make a copy of an item.


there are many modifier that you can apply while draging an item. for example:

CMD-Drag an item to another drive, will make a copy of the folder and remove it from the first drive

ALT-CMD-Drag will just make an alias

etc


i use the copy and paste of folder/item when i work on windows.