Xcode project edits lost?

I spent most of the day refining an Xcode project, savde, and closed it at the end of the day....

Later, I find the only c=version on file is ten day old?

What is going on...

I cannot find the new version anywhere..


Help anyone, please...

It is difficult to tell, it depends on how you manage your files !


But, you could try this:

- copy one line of code that is speciific to the app

- search this in Finder search

- you should see the list of all files that contain it ; with some chance you will find where the most recent version as saved.

Claude,

A million thank you's, 🙂...

I did find the latest version, by searching in Finder for a unique portion of a line of code, as you suggested.


I suspect I may have now lost the original code, 😝, which I thought I had preserved in its final form, prior to embarking on the major update/revamp effort. Time will tell... Xcode is updating right now, so I will have to remain patient for another hour..

Edit: I found it, unharmed, some how I have the ongoing development work [latest version] in the old folder, and the original version preserved in the current folder. Bliss...


And, yes, I will turn on Time Machine back on as soon the latest version of macOS Mojave is released [probably tomorrow].


Again, thank you, you have saved me the many hours it would have taken me to rebuild and test the code...

If you're just going to turn on Time Machine, you're not being nearly paranoid enough. 😉


Use SCM (source code management) in Xcode to maintain git repositories for your projects, and sign up for a remote git repository (e.g. github.com, but there are other good choices) and push your local repositories to remote repositories so that your projects are all backed up off-site.


You can take the trouble to do this now and safeguard your data, or you can unrecoverably lose all your data in the future. Realistically, those are the only 2 possible outcomes.

Great.


I faced the same problem sometimes, probably because I was editing a copy of the project file, without noticing.


anyway, glad for you.


and don’t forget to close the thread.

Xcode project edits lost?
 
 
Q