I was tidying up my development Mac yesterday and deleted a couple of rogue Swift files that were just hanging around in my home directory. Turns out these files were actually part of an XCode workspace, but for some unknown reason weren't in the regular directory structure. What's more, because they weren't in the regular directory structure, they haven't been under source control. I'm quite annoyed with myself!
I've tried a couple of disk utilities to retrieve them, but no joy.
Before I embark upon rewriting this code, it seems to me that there's a couple of possibilities to recover this code still...
The iOS app I created has been released on the app store and I have the dSYM packages for it. Is there any way to regenerate the code (or at least the skeleton of it) from that? It seems like there might be, as Sentry (the crash reporting tool I use) is able to show crashes in the context of code thanks to that dSYM file.
I managed to recover a few files from XCode/DerivedData//Index/Datastore//records// which are named like my missing Swift files, and have some symbols from them, but seem to be some sort of intermediate representation. The files all start with "IDXR".
Does the collective wisdom of Stackoverflow have any suggestions about recovering these two Swift files or shall I just start rewriting them?