Open a xib file change the content of the file - xcode

I am using XCode 6.1 to work on an ios App. I am using git as source control.
I want to know why whenever I open a xib file in XCode, it changes the content of xib file and git sees that file has been modified.
I search stackoverflow and see it was an issue with old xcode.
Is it still a issue with xcode 6.1? is there a way to work around this?

Related

Cannot pull due to info.plist error: "The data couldn’t be read because it isn’t in the correct format." in Xcode 10.3

We have recently updated to Swift 4 and upgraded our xCode version and have had a myriad of issues including this info.plist problem. Every time we try to pull changes through xCode we get an error stating the info.plist file is not in the correct format.
See file in question here...
Digging into the info.plist file we see that it has lines around the GitCommit key (<<<<<<<<< HEAD and >>>>>>>>>>BRANCH) for the merge conflict. Opening it with VSCode I can resolve the conflict with the file and continue with the pull, but it is frustrating to have to open another IDE, find the file, correct it, and go back to xCode. In xCode 9.4 the info.plist conflicts worked fine and we just had to select the most recent GitCommit but we can't even see the file in xCode 10.3. Any suggestions on permanent fixes for this would be appreciated!
If I'm understanding correctly two things to try (tested in Xcode 10.1):
Right-click the plist in Xcode and select "Open in External Editor". That should open the file in a suitable text editor and you can resolve the merge conflict, save, and then return to Xcode
Select the plist in Xcode and dismiss the error alert. On the right side of Xcode (usually) select the File Inspector and change the file type to "XML" or "Plain Text". Xcode will now show the raw XML and you can resolve the merge conflict. Then change the file type back to "Property List XML" – you may need to use "File > Close" in Xcode to persuade Xcode to reload the file using its plist editor.
HTH

How to make Xcode open a project with a selected file in the editor?

Xcode wants to open my current project with the editor on the Main.storyboard file. But that file is corrupted in such a way that Xcode essentially freezes and becomes unusable. Is there a way to make Xcode open the project with the editor on a different file? (The "current file" must be stored somewhere but I can't find where.)

Storyboard file in Xcode now showing up as an empty folder

I opened my Xcode project this morning and found that the .storyboard file in my project now shows up as a folder named MainStoryboard.storyboard instead of an actual storyboard file.
It seems to be the same when I open it in finder and any Time Machine backups, which I find strange because I've had it opened in Xcode more recently than some of the backups.
Is there any way to recover the file or is all hope lost?
This is what I see in the Project Navigator:
Turns out someone had opened the project file in a Developer Preview of Xcode. I had to go way back in Time Machine to find a version of the file that would open.

How to make Xcode refresh the editor content?

I am developing a project with Xcode 4.1 using Subversion through Xcode's built-in source control menu and command line. When reverting/updating the source through command line, I can't get the Xcode editor to show the current version of the source files (as they appear in the Finder or any external editor). I guess this is generally the case when editing a source file with an external editor.
Eclipse would immediately warn you that the editor content is outdated (Xcode does it when you try to save the file). Then you would simply right click on the project tree to refresh the corresponding files/directories. There must be a similar feature in Xcode.
svn revert MyFile.m
will copy the old back and therefore also the old timestamp, making XCode think it is using the most recent version of the file (which is true, except that in this particular situation you would want it to use the older version again).
As a workaround you can "touch" all the reverted files, giving them a new timestamp.
touch MyFile.m
That will make XCode display the content as it is in the file and also include it in the next build iteration. This works for .h/.m files but also any project or meta data files used by XCode.
Do you mean Menue:File >> Source Control >> Refresh Status ?

.xcodeproj doesn't open in Xcode

Until this evening everything was fine. But now Xcode doesn't open .xcodeproj files.
When I start Xcode then click File->Open and then click on .xcodeproj file, the open dialog is showing me .xcodeproj file's contents instead of opening the project. I found on the web that it may be due to an old version of Xcode but I am using 3.2.4.
What format is the volume on which the projects reside ? An Xcode project is actually a bundle, that is a directory containing a project.pbxproj file (this is the only important file) and some user-specific settings files (which are not important). Make sure the project.pbxproj file is present and has appropriate permissions. Also if this is a non HFS+ volumes then that may be part of the problem.
I got same error in my project finally i founded my answer. there total two option for solve this issue.
There is need one backup of your project. you can replace your .xcodeproj with old file.
you have to create new project and than have to add All old project file in new project.

Resources