I started developing apps with Xcode 5 and I wonder about the behavior of the Assistant Editor. A few weeks ago it always opened the counterpart of a file (opening a .h file it opened the corresponding .m file and so on).
Since a few weeks it always opens a "random" file in "Manual" mode so I always have to switch back to "Counterparts" manually.
Does anyone know if there is an option (anywhere deep within Xcode configuration) to get the old behavior back? It's pretty annoying to start typing and then realize that I've changed a file I didn't want to change.
Searching this forum led me to a thread which suggested to delete the "derived files". I did so (restarted Xcode and re-built the project) but it didn't work.
Thanks in advance.
Alex
Related
I recently acquired a newer MacBook to run the most recent iOS and Xcode versions. I copied a project folder to the new Mac and opened it with Xcode 11.4 (was 10.1 on old Mac). I get 14 errors all related to "Failed to render and update auto layout status for ..VeiwController". The simulator runs fine, but the main storyboard doesn't render the button icons properly. I can add new constraints to the buttons to show them properly but the errors don't go away. I assume I have lost some info/files related to autolayout when I copied folders. I have read about similar issues. Most talk about using Github or some other 3rd party for maintaining files. Is there any other way to get this done? It seems like updates computers/software should be simpler.
Since reporting this, I have used the same process of copying folders of all other projects and have had no problems. But one project, the largest and most complex continues to have 14 rendering errors and always the displayed err message "An internal error occurred. Editing functionality may be limited." The strange thing is going in and out of viewing Main.storyboard several times gets rid of the errors eventually. Unfortunately, the errors always come back when I open the project. And sometimes they go away, then come back randomly in the same session.
So the answer to "whats the simplest way to copy a project folder to new computer is just that - Copy the project folder! But thats the wrong question for this problem.
I wanted to release an app I worked on and quickly change the project name. I usually duplicate projects before doing things like this but this time - because this procedure always worked on Xcode as I found it way more reliable than e.g. Eclipse - I didn't, which I immediately regretted.
Opened Xcode again and now I am seeing this
I guess all the linking is gone now which is why Xcode doesn't "find" the files anymore. Renaming the remaining project stem to the old name gives
couldn’t be moved to because an item with the
same name already exists
and also manual renaming of folders won't work as the .xcodeproj is gone.
The project is written in Objective-C, and all the classes are still persistent, but the effort of adding all the xib's, referencing the outlets, setting architectures, etc will become the nightmare of my life. I do have a half-way recent backup but everything I did to make the app store-ready today will be gone.
Any ideas on how to rescue my project?
EDIT: What Xcode is now showing on the welcome screen is a project called "project" (literally) and it has the usual compass icon but with a white instead of a blue background referring to the path <project folder>/<new project name>/ and below that "white" project there is a folder icon with the new name pointing to <project folder>.
I also made a snapshot before, of course it now says "Unable to read snapshots" in the "restore from snapshots" window.
Ok what I now did is renaming ALL references from the old project name to the new one. I even changed file names. I used Xcode's CMD+SHIFT+F and TextWrangler's "replace" function and thankfully I still had the .xcodeproj from yesterday's backup so from there I could copy it into the new project and rename stuff. There are still some things that don't work perfectly, for example auto layout doesn't "stretch" contents over the screen (it stays on iPhone 4s size, even on 6 plus simulator), I needed to set the scheme again and Launch Images / Icons got lost but I can look over that. The only thing I am afraid of now is that the final build might miss out a symbol or something like that so I eventually have a corrupt file in the App Store, but man it's a beta version, how much worse can it get anyway?
Thanks to everyone recommending me to even backup the broken project, I did this even before you said it but because I think it's a valuable advice I wanted to put it in my answer as well.
It's a shame that stuff like this can happen, I've been backing up my work on a daily basis and my project never got corrupted - until now.
My Xcode iOS project is kind of broken I think.When I create a new file in my group,the file's location is somewhat different from other Xcode iOS project.For example,when I create a Cocoa Touch Class called EEViewController,you can find its location is too long in the Identity and Type of the File inspector.
But when I right click the file and click Show In Finder,drag the file to the desktop and drag it back the its original group.The location's patch seems to be okay.(It can finally be referenced in Storyboard custom class)
I think it is has something to do with my Xcode configuration,but I just can't figured it out.Hope someone can help me.
To my understanding, ../../../benson/OneHome/OneHome/EEViewController.swift is relatively the same as just EEViewController.swift in your case as it's based on the location related to the group.
../ means go up 1 level in the path, up 3 level then dive in 3 makes it the same path.
I think the issue here is the case of your home dir. In the second screenshot it shows "Benson" and the first shows "benson". OS X is a case sensitive file system, that might be a problem for Xcode.
I hit 'backspace' while having selected one of my launch images and then absentmindedly pressed 'okay' before reading the popup dialog. This deleted my target, which apparently cannot be reversed.
So I created a new target with the same name as the old one and had it point to my project file. But when I run my program, it just shows a blank white screen. I checked MainStoryboard.storyboard to find that it had deleted all of my storyboards. Is there any way for me to recover my old MainStoryboard? Or my old Target? I've been trying for the last 30 minutes, looking stuff up online, nothing has worked.
I have an archive of the project from RIGHT before this happened. Is it possible to restore my project from that archive? I haven't created a snapshot since a couple of weeks ago (this was probably stupid of me) so reverting to a snapshot isn't an option.
Any help you can offer me would be greatly appreciated. This is my first iOS app. Not an hour ago I find out that my initial version was rejected from the app store for being too simple. This version had 5 completely new features, I really don't want to have lost it; this entire situation is just so disheartening.
I recently started a new project with nothing unusual about it. Whenever I go to use the Version Editor I get the message "No Editor" where the text normally would appear. Even stranger, this is the same for all my files except for the Project itself. It actually shows version history properly.
The only thing I've done differently with this project from any others is use Cocos2D and BitBucket (with GIT). Everything else is pretty vanilla.
You should select file and wait for long time.
Sometimes I have same issue with project file. After 3-5 minutes the issue was fixed (editor was loaded) and I can edit the conflict.
The Version Editor has always been pretty buggy.
Try File -> Source Control -> Refresh Status and see if it fixes it.