XCode 8 Git pull does not load into XCode - ios

I have a problem pulling from remote with XCode 8. Problem is when I do Git pull, it pulls all changes, and I see that new classes are added in Finder window but it does NOT load them into XCode project. I need to add them manually in XCode every time to my project. I've tried from terminal, source tree and inside XCode, every time, same thing. With prior XCodes everything is working as expected.

Are you also getting change in xcodeproj file? May be the latest commit to server missed pushing changes to xcodeproj because of which Xcode is not able to figure out new classes etc. Xcodeproj file is the way via which Xcode recognise changes to project structure.

Related

iOS Asset/Storyboards not updating unless a "Clean Build" Swift package manager, Xcode, Storyboards, iOS

TLDR;
Assets(storyboards, images) not updating unless clean build with Swift package manager local dependency.
Explanation:
I use Swift package manager and have a local dependency (module) that has storyboards, image assets etc. However, if I make any change on them and just cmd+r to run the app, changes are not shown; for example, if I change label text on the storyboard, it won't show the updated text if I just run cmd+r.
To make them appear, I have to clean the build folder and re-run the app again.
But if I change any swift file it works fine.
Try just going to file>Packages>Update Packages To Latest Version
I had a similar behavior with one of my projects. Changes to the storyboard wouldn't be reflected in the simulator if I chose the new build system.
I know that the legacy build system is now deprecated, but you can still try to build with it and see if it is a bug of the new build system.
File > Project settings (or Workspace settings) > Build System > Legacy Build System
Try Updating the packages and also delete your derived Data and archives and give it a go. Seems more of a Xcode bug /cashe issue . Are you using Xcode 13?
It's difficult to find the exact reason because it could depend on several factors. When you open your storyboard file, go to Editor->Automatically Refresh Designable Views and be sure it's checked.
Check also Xcode->Preferences->General->Issues and be sure the check below called "Show Live Issues" is flagged as this picture:
Another reason about your assets refresh failure could depend by the missing resources inside the list: Targets->Build Phases->Copy Bundle Resources
Check also if your resources are shared with a file hosting service like Dropbox, it could be have a local cache which keeps the old version.

IDEWorkspaceChecks.plist file suddenly appear after updated xcode

I suddenly start having this file in my xcode project after I updated my xcode:
myProject.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
What does this file do? Should I exclude it in version control?
You can take a look on the Xcode release notes
Xcode 9.3 adds a new IDEWorkspaceChecks.plist file to a workspace's shared data, to store the state of necessary workspace checks. Committing this file to source control will prevent unnecessary rerunning of those checks for each user opening the workspace. (37293167)
It's good to commit it to your repository.

Xcode project renamed and now it is lost

I was trying to rename my Xcode project and I followed the apple developer guide and went to View -> Utilities -> Open file inspector and changed the name. Now the initial project only has the pods and the new project created won't run. Is there a way to restore it? I have been working on this project for months and would be devastated if it was lost.
would be devastated if it was lost
That's what version control is for (git).
But if you don't have a git commit to revert to, don't worry; there is a simple solution. Start a new empty project based on one of the built-in app templates and just migrate everything from your old project into that. No actual files have been deleted by whatever you did, so there should be no difficulty about this.

XCode Source Control - Discard Changes Deleted imported files

I am doing a game for iPhone and iPad using SpriteBuilder. SpriteBuilder makes a couple of files in the same folder as the XCode project. I was using Source Control and I just made a commit, then I changed a little bit of the code in the XCode (I changed nothing of the spritebuilder files) and then I changed my mind and I wanted to go back to the commit I made. So I did source control -> discard changes. The XCode successfully replaced the new code with the old code but it erased most of my SpriteBuilder files!!
How do I get my SpriteBuilder files again?
Screenshot of the last commit. You can see that xcode knows when the spritebuilder files are changed so it should keep them no?
Unfortunately the way Xcode calls Git appears to do this. All may not be lost, however. Check the trash for your missing files.
Quit Xcode.
Open the file you wish to bring back your lost changes to using TextEdit.
Go to File -> Revert To -> Browse All Versions...
Scroll through the available versions. Hopefully you will have many available to choose from.
Select a version and hit Restore.
Follow 1-5 for all necessary files.
Launch Xcode. You should now see the M next to these files in Project Navigator indicating they include uncommited changes (the changes you previously discarded).

Xcode 4.2 does not commit files?

I have Xcode 4.2 and I was working ona a project, that was commited previously with - let;s call it - place A. Then I copied it on my disk to another place, made modifications and now I imported via Xcode Organizer whole new project into place B. But when I checked out project from place B I cannot commit any file. I select a file, choose commit, write comment and go. It looks ok, but in fact the status of this file is not changing, so I can without any warning make commits on and on... Is it problem with some project setting or what? I remember that in previous Xcode in project settings you could set svn location, but here I don't see anything like it.
I think you have not copied a folder .svn in the root of your Project - there are the meta-informations of SVN, without this infos SVN can not work. Just find and copy this folder from A to B and the issue will gone!

Resources