I've lost the all snapshots I created, and the current project is somehow buggy and cannot function properly since I've tried to add some new features and failed.
Can anyone tell me how can I go back to my functioning version now that the snapshots are lost? Or can I retrieve one iTunesconnect version that i can edit?
Thank you very much!!!
Xcode 5 stored Snapshots in ~/Library/Application Support/Developer/Shared/Xcode. Xcode 6 stores them in ~/Library/Developer/Xcode/Snapshots.
You could:
Try moving them from the old location to the new location and see if Xcode 6 will recognize them
Open Xcode 5 and revert your project there (you can download it from the Dev Center if you deleted it during install, or it might still be in your trash)
The installer shouldn't delete the snapshot files.
Also, for the future, you should use Git or another source control software and not rely on snapshots for this.
Related
I have used Xcode 7.something with Swift 2.2 or 2.3(even I cannot remember).
I upgraded my Xcode to version 8 and reformed the project to swift 3 syntax; which gave me a tremendous amount of errors.
I couldn't restore the project folder which was before the reform; just copied the converted file to somewhere else.
Then tried to convert back to 2.3 then I got even more errors... So I'm trying to find any way to restore the whole project file back to a few hours ago. Is there any way to get this successfully done? Thanks in advance!
If you used source control (git is the most common) and committed before and after then yes. (You should be using source control, and you should commit before doing something as sweeping as an upgrade from Swift 3.0)
If you have a backup then you can restore from a backup. (And you should be doing regular backups.)
If you haven't quit Xcode, and haven't closed the source files, you may be able to use multiple undo to back out the changes. (I suspect not on an automatic upgrade, but it's at least worth checking.)
If none of the above then you're probably out of luck and will need to work out the errors manually.
Swift 2 to Swift 3 is a big change, and there are going to be errors. It's painful, but a one-time thing.
I realise that there are a few questions/answers and I also realise that I can download via the developer page, however it says 7.3 is installed ...
but when you start Xcode it is still the previous version.
Is there a work around or do you have to download a fresh copy? With a very slow connection I would rather avoid it.
Sadly you are going to have to download a fresh copy of Xcode. Same thing happened to me and I tried everything. Restarting my computer, closing it in Force quit applications and tons more and nothing worked. Fresh install would be the only option for you.
Check that you don't have any backup drives/clones/time machines etc connected, and that you only have the one MAS Xcode version installed (you can check if it's a MAS version by going to /Applications or wherever, and opening the Xcode folder with Show Package Contents, then looking in the Contents folder for a _MASReceipt folder. If that's there, it's a MAS version).
The MAS app has an issue where it will update the app on backup drives etc that are connected to your machine when you do the update, often before it updates the version you expect it to update (in /Applications). This could mean it may need to do a few updates before it gets to the one you're actually using.
If you like to keep old versions of Xcode around, always delete the _MASReceipt folder from the old ones. That will prevent the MAS app from upgrading them later.
I exedentaly deleted my xCode project, but I still have app installed on my iPhone. Is it somehow possible to retrieve at least some part of original project files from app itself?
No, it's not possible to do this.
You may be able to recover the original archive file created prior to installation on your device from inside the following directory (depending on how you deleted the original project) which may be of help.
~/Library/Developer/Xcode/Archives/
XCode 5.0.1 on OSX 10.9 does not show the full revision history for my repository under Source Control/History.
What it does display is the history up to a certain point several months ago, but nothing newer than that.
I tried viewing the repo and its history in Versions and there it works just fine.
At some point we migrated the repo from one server to another. We also upgraded the repository a while back, but I don't know to which version of SVN. However, I do know that we have Visual SVN Server and SVN 1.8.0 serverside.
On the other hand, the XCode 5.0 release notes state that XCode uses SVN 1.7, which leads me to suspect that this could be the cause of my issue. However, I also seem to remember that XCode used to refuse to work with unsupported versions of SVN.
Any ideas what could be causing the problem?
What sucks, but is the default in Xcode is that the server status is not automatically updated.
Open the preferences and go to the Source Control Preference and make sure the "Refresh server status automatically" button is checked.
There is nothing I can find within the Xcode UI besides this that tells you the server history is current or how to refresh it.
This is verified as of Xcode 5.1.1. What a shitty UI. Really.
Cheers.
In my case sometimes begins work after "Source Control/Update".
Actually, its terrible bug, you have no guarantees that you see actual list!!!
To answer my own question, it appears that there was something wrong with the working copy. Deleting it and then doing another checkout directly from XCode fixed the problem.
Yet another variation on 'turn it off, then on again'.
I am unable to take any more snapshots of a particular project of mine in XCode. If I try to create a snapshot, it says 'Creating snapshot ..' in the status bar and goes on forever. I then force quit the Xcode, relaunch and try creating a snapshot again. This time it straight away gives the error message '..remove file manually .. ...lock'. So I then remove the shown file using the rm command in terminal. And then I again try creating the snapshot and the same cycle continues.
How can I fix this issue?
I had been taking snapshots for this project for a long time and one day had to delete all the old snapshots as I suddenly realized that they are taking up 12+ GB! Even now if I try to create a snapshot for this project it reaches 3 GB in a few minutes and then I force-quit it.
(I am pretty certain this used to work perfectly until some time back and didn't take gigabytes in space.)
Since you tagged this question git, I suspect git is the cause of your problem. I have found Xcode snapshots do not work if the project is in a git repository. If you need to take a snapshot, a workaround is to move the .git folder out of your project temporarily, take the snapshot, and move the .git folder back.
I too had the same problem and this is how I fixed it:
I noticed in Xcode -> Organizer -> Repositories that my whole ~/username folder was showing up as a repository. I tried deleting it in Xcode but it kept returning. Previously, before I had installed Xcode 4, and using Xcode 3, I had installed GIT and cloned opdenkamp/xbmc to my home folder. Through a lack of knowledge on the use of GIT, I had made my whole folder a repository and every time I tried to make a snapshot of my project in Xcode it was making a snapshot of ~/username (or some other process) that was taking for ever and creating a multi GB file in ~/Library/Developer/Xcode/Snapshots/ . In fact I would "force quit" Xcode to stop the process.
So I deleted the repository in Xcode, I quite Xcode then in the terminal I typed from my home directory ~/username
sudo rm -r .git
Probably not a good idea if there are repositories that you want to keep (which was not a problem for me) but now making a snapshot of an xcode project takes a second and generates a file that is of the order of the Xcode project and not now in the multi GB ball park
the easiest fix is to make sure you have "Enable Source Control" checked in Xcode's Preferences (Source Control tab)