Xcode snapshots - objective-c

What exactly does Xcode do with project snapshots after the Xcode project is moved or renamed. I have noticed they completely disapear...Where should I look?
Defintely not in ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage

~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage is a disk image. You have to mount it and look in there.
Snapshots are stored based on a hash of the project name; change the project name and you lose the snapshot history. If you take a snapshot of the new project, and can find the old snapshot on the disk image, you can probably move the old snapshot into the new one's directory.

If they are not in ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage then I think you may be out of luck. I tend to rely on snapshots only as a first line of defence, with Time Machine as a more reliable second line, and then SCM and proper backups as the third and fourth.

They are inside the image allright... but making so that Xcode will recognize them won't be that easy...
In that image, you have the folder with all the snapshots (with some hierarchy)... and a plist file... in that plist file they have a HARDCODED (non relative to project file) paring system between each snapshot and the ORIGINAL PATH of the project folder.
So, if you really want to move/rename yar project, you'll need to change ALL the paths in that little plist file...
P.S.
if you're gonna do the changes, you might wanna close Xcode before you do... it might make him angry... :P

Another thing you should be aware of:
If you open and mount ~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage as a disk image and then start Xcode to recover or look into your snapshots Xcode will complain that the Snapshot Repository is broken and move it into the Trash!
So remember to unmount the repository before starting Xcode.
To recover a trashed Snapshot Repository just drag it into the correct path (see above) and remove the date stamp inside the filename.

I ran in to this issue having renamed the App and if I renamed it back to the original, quit Xcode and reopened it the restores were available again.

Related

Image corrupted after longer coding session

i'm rather new to pharo and I just started another new pharo project (on version 9) and lost my image as the process crashed upon saving.
I cant even load the image anymore.
I have all the changes still in the .changes file, is there any way to file in .changes files into a new image or have Epicea apply those changes?
I can of course manually copy paste all my changes, but that would be a pain with 1500+ lines of unsaved changes.
Happy about any solutions :)
In pharo-local/ombu-sessions you'll find the epicea change stored as ombu files. You can use the code changes browser to load them. If you select the directory of them of the crashed process (of course make a backup copy first) you can apply the changes you want

PhpStorm Search Everywhere is not working, do you know the solution?

I don't know this is off topic or not, I'm using general channels. Is there a solution for Search Anywhere in PhpStorm. I work with Laravel but when I use the feature I can't find the file even though it exists.
Looking at your screenshot: based on the fact that ALL files in the project tree have that sort of "dirty yellow" background color... it looks like ALL of your files are considered excluded / outside of the project for some reason.
Most likely a user error of some kind. E.g. you may have opened it from a different path (i.e. when symlink is involved), may have c=misconfigured it later somehow (marked folder as Excluded by mistake or whatnot) or maybe even some sort of config file corruption (pretty unlikely).
Anyway, please do this:
Close your project
Go to the project root folder and delete your .idea subfolder (that's where your project settings are stored).
If you have that project still visible in the IDE (Recent Projects on the Welcome screen) -- you may remove it there as well (to avoid any possible confusion).
Now create a new project in PhpStorm from scratch using existing files: just use "Open" and point to the folder with your project.
Please check filter option. If you are doing file search then click on Files tab.

Xcode Interfce Builder changes files on open, causing SCM to report it as modified

Anyone have a problem with Xcode's IB showing xib files as modified just by opening them?
Although in reality there were no modifications?
If I just want to look at a xib file's UI, this action makes Xcode show the file as modified, and then I have to discard changes and a lot of other things.
Any ideas?
This will typically occur if you open a .xib file which has been generated/used by a previous version of Xcode.
This can happen for a variety of reasons. For example, with newer versions of Xcode, it will update the Interface Builder version number contained within the .xib with the one you're using. Other examples include differences in classes used to build the UI from a xib. It's undocumented what it's doing, but have a look at the diff to see for yourself.
Ultimately this is a problem with Xcode, and isn't really easily resolved. You can either:
Commit the modifications, although this may pollute your diff. Unless your team are running older versions of Xcode than you, this shouldn't cause an issue. (If they are, make sure you're all on the latest/same version).
Keep resetting the changes made to the xib file, or selectively choose not to commit the file.
XCode 4.5 changed the format of .xib files. Basically it's removing unused cruft from the format. Once the change is made it won't do it again.

vwnt pop up in smalltalk

When I try to open my smalltalk project file vwnt pops up. The project wont open. I did save the project properly last time I was working on it. Please help if anyone know how to resolve this issue.
what do you mean by smalltalk project files? VisualWorks doesn't have anything like that. What it has is an .im and .cha file. the .im file is the image, which contains VisualWorks and all the changes you did to it. So when you open the .im file, it'll open VisualWorks. You create classes and methods in VisualWorks and by doing so you modify the whole system. When you save the image, the whole VisualWorks system gets persisted and when you open the image file again, the system is restored.
The .cha file is a text file that contains all the changes that you did to the image.

Icon specified in info.plist not found under the top level app wrapper

I'm trying to upload my binary to iTunes Connect using Applicaton Loader. When I select the file and hit send, it sends for about a second and then this error pops up,
Icon specified in the info.plist not found under the top level app wrapper: Default -Landscape#2x~ipad.png
What does this mean? How do I fix it?
Another setting that can cause the issue:
You have to make sure the icon files are also found under build phases/bundle resources
Edit your projects .plist file "as source code" i.e. open it in any old text editor. Then manually edit the icon file names until they make sense.
The .plist is case-sensitive when validated and archived for upload to the App Store.
If you have this in the .plist:
icon-72#2X.png
the file name can not be
icon-72#2x.png
owing to the the case change of the x character .
I rename the file and corresponding change the name of icon file in the info.plist and this solution works for me.
Clean your build
Make sure the file is actually on the file system
Make sure you can see the file in the project navigator.
Most likely step 3 will fail. If so, drag the icon from the finder onto the Project Navigator. When asked, uncheck the "copy ..blabla" option because since the file is already there where you are dragging it to, it would fail. Once the file shows up in the Project Navigator you should be golden.
Also check that you dont have 2 icons with the same name anywhere in your project folders.
I am thinking that the answer to this question will vary in time because Apple constantly changes the application validation rules. These validation rules will surface only when you are submitting your app to the AppStore.
In this particular situation, the validation error happened to me while uploading the app on 08/03/2012.
The solution was fairly straight forward. I had to move to icon files which I had located in a folder nested within the project directory all to way up to the TOP LEVEL project directory - one that has the project file in it. Once I did that and readded the files back to the Resources in my project the validation error went away.
Of course you should check that this issue is not caused by misspelled filenames i.e. differences between your plist file and true names of icon files on your file system.
Another little issue that caught me out was an empty string. I got the cryptic failure message ...
Icon specified in the info.plist not found under the top level app wrapper:
And found this lurking in my plist
<string></string>
I was similar problem's. I have resolve to do this
1/ delete your application Icone in your Target
2/ rename your icone ex: applicationNameSmall.png
3/ add your icone in your application.
This, works for me.
Error is coming up because the App Store is checking names of icon files based upon yourProject-info.plist. If they don't match, error message.
To resolve this issue: Go to yourProject-info.plist in xcode and check BOTH "icon-files" and "icon-files(IOS5)" arrays. You'll want to make sure that each string corresponds with the icon files you have in the file directory.
Change or delete mismatched string names (I had to delete a blank string). Rebuild. As other posters have noted, names are case-sensitive, so be mindful of that too.
Sometimes Icon.png files needs to be open in some image editing tool (e.g Adob Photoshop) and save as a new image. This works fine. Check attached images some times image properties don't change by renaming image file manually.
I had the same issue. I just added the image files it complained about to the project in the viewer. Not sure if that was the right thing to do, but it resolved the issue for me.
I had a silly mistake, in my info.plist the i had Icon.png, and the real file name was icon.png (no uppercase)
Fix the images issues it suggests.
Clean your project.
Build and run to make sure nothing has broken.
Delete the previous archive
Make a new archive (Product -> Archive)
This worked for me. I had to rearchive my application cause the previous one was not updated.
I had the same problem. I gone to Targets->Build Phases and deleted from there old (test) icons which I had pushed early. Good luck:)