Xcode 6.3 freezes when I quit the Main.storyboard - xcode

I'm experiencing a very strange error: my Xcode is freezing when I quit a certain storyboard of a certain project.
When i open Xcode, the xib shows up normally, I can even edit it and save it. But when I'm trying to open another file, any other file, it freezes forever.
I tried to delete every temporary files as described here, or here, or here, but the problem still remains. Ah, and... re-create my xib is obviously not an option...
Any other idea?
EDIT:
When I delete myProject/[project.xcworkspace/]xcuserdata (s), I can navigate in my project as usual while I don't open the storyboard. otherwise my problem comes again.

Since my post about this problem, I saw it on other projects. I'm pretty sure this was linked to custom fonts in xib, because it often happened after an Xcode bug rendering custom fonts.
Few days ago I downloaded the last Xcode version, 6.3.2, and the problem did not bother me again. So it seems to be resolved.

Related

Quitting Xcode 8 and reopening it breaks constraints in my Xib file

encountering a very frustrating issue. I have a Xib file for my custom UITableViewCell. I set the constraints up and there are no warning or issues and the app runs fine. However if I close the Xcode and reopen it they are set to different values and the entire view is broken.
There seems to be no way to fix this, even if I reset to a previous commit the view remains broken. Has anyone else encountered this? Is there a fix?
Please try Xcode 8.1 which addresses the following:
Xcode 8.0 did not always restore view frames from storyboards and xibs when layouts were ambiguous. Xcode 8.1 fixes several of these issues. If you have encountered these issues, resolve the ambiguity in the Auto Layout issues and update frames. Xcode 8.1 will persist them correctly. (28221021, 28244619)
(If not, please file a bug with http://bugreport.apple.com.)

Xcode 7.3 is excruciatingly slow when loading Storyboard IB

I recently upgraded to Xcode 7.3. I found that loading up the storyboard can take anywhere from 5 to 10 minutes to complete(and may sometimes result in a crash). I've restarted my Mac several times. I uninstalled Xcode and reinstalled it to no avail. I then cleared my Derived Data as well as com.apple.dt.Xcode to find that this did not help either. Is anyone experiencing a similar issue and possibly has a solution?
Although this actually might be an issue with incremental changes in Storyboards with Xcode 7.3 you can always speed up build times by creating multiple small Storyboard files in favor of a big bloated Storyboard.
Xcode can then reuse already built Storyboards in subsequent builds (as long as they are not changed) instead of building the complete bloated Storyboard over and over again even for small changes.
Apple even has a guide that might help getting this started.
I hope that helps!
This is really annoying bug/issue with XCode 7.3. So, If you have an hour or so to spend you can download and install XCode 7.3.1 Beta from here https://developer.apple.com/xcode/download/
It seems that this issue has been fixed in this version (at least it works for me).
Edit: OK. After a few minutes, Interface Builder became extremely slow again. Changing only one property can take up to 15-20 minutes.
After some research I have figured out that autolayout constraints were the cause of this issue, BUT only if you have a combination of some components present. I had a segmented control inside a navigation bar. When I removed navigation bar and placed segmented control in a simple UIView, all issues were gone and IB was smooth again.
Hope this will help.
I am using Xcode 7.3.1 and had the same problem. My problem was solved by disabling source control.
Go to Xcode->Preferences->Source Control and then Uncheck the Enable Source Control. Worked for me.
Thanks.
Sometimes the storyboard gets slow because of unresolved errors of autolayout. In my case i tested by changing screensizes and it showed me some errors on different sizes. Once i resolved those errors the storyboard was working fine. Please confirm
Yep I had the same problem. In design mode, it's Autolayout that is causing the 5-10 second delay between edits, especially if it's a large storyboard. Turning off Autolayout in the storyboard at design time fixed the issue for me:
Open project
Select storyboard from the Project Navigator
Open the file inspector
Under Interface Builder Document uncheck 'Use Autolayout'
If you need Autolayout at run time, I recommend you layout your Storyboard in design time with this off (to avoid those long delays between edits) then turn it back on afterwards. Or, turn Auto layout on programatically. Or better yet, split your storyboard out into smaller storyboards.
Referenced this question: Can I disable autolayout for a specific subview at runtime?
I got the same issue recently after I updated the OSX to 10.11. Xcode 7.3 will take almost 5 mintues to respond when I just change the button's font (or anything else change). This made me almost crazy. Incidently, just for a try, I updated Xcode from App Store to 7.3.1. Then I was happy to cry when I opened the storyboard and changed the attributes. Xcode responds smoothly.
So please try Xcode 7.3.1 for your problem. Hopefully you can be happy with it.

Xcode 6.1.1 crashed changing TableView to Static Cells

I am trying to create a Table View Controller in my storyboard and when I change from "Dynamic Prototypes" to "Static Cells" Xcode stops responding until it eventually crashes.
What I tried so far:
Re-installing Xcode;
Clear Xcode folders under ~/Library (including DerivedData);
Creating in a new project (still crashes);
Ask a colleague to create a Table View Controller with static cells in the same project. He can do it on his computer. I can see the Table View on my computer and even edit rows, but I cannot add sections.
Tried both Swift/Obj-C projects, with or without Core Data;
I am using XCode 6.1.1 (6A2008a), the same as my colleague.
Please help! Thanks!
Yes , I have faced similar problem .please try with Xcode 6.3.x or later version .
Not a fix but may help some. I noticed this was only happening to me when I had two windows of my current project open. Was reworking a storyboard, so I had the old and new side by side. When I closed the windows of my project that I was not currently editing, Xcode did not crash. With more than one window open, editing a Static Table View would crash Xcode EVERY time.
I found a temp Fix. I also noticed that my dock isn't working fine (I can drag and drop things into it or in it). So I rebooted the mac and this fixed the dock problem, I tried quickly in Xcode and it worked. I guess it's something with Mac OS not just Xcode

Xcode 4 and 5 frozen with an empty tab on Launch

I've got this weird problem from last night, where I cannot open Xcode anymore!
It is stuck with an empty tab loading view, and is just not responding... :-/
I have deleted Xcode4 and re-installed, it keep giving me that same problem... And also tried with Xcode 5, and still.... so I guess the problem is somewhere on my computer... What can I do?
Really need to fix this for work.
Found my solution on a similar linked problem :
Xcode freezes on startup while loading project
Due to the restore feature, all the windows you left open in a given application remain open when you relaunch it. To avoid this, discard the previously open windows by holding the option key while pressing CMD+Q. Try starting Xcode and quitting it with option held before it's had a chance to open your windows, then re-launch it and it shouldn't try to open the windows.
Fixed the problem for me.

ibtool failed when compiling storyboard

I just downloaded a project from a git repository on two different Macbooks. On the first, it runs without problem.
On the second Macbook shows me the following message:
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool
failed with exit code 255
When trying to compile the file MainStoryboard.storyboard.
When I click the MainStoryboard.storyboard on XCode, it crashes and doesn't open it.
On the other computer, everything works fine.
I tried the following things to fix this problem, without success:
1) Upgraded XCode from 4.5 to 4.5.2
2) Removed the project directory and cloned the repository again.
3) Deleted the contents of my project on ~/Library/Developer/Xcode/DerivedData
4) purge
Any ideas on how to fix this problem?
Found this issue using XCode 5.
I've solved the issue, but it required a hard reset.
Some said it was because I installed XCode outside of the App Store, or because the simluator was buggy, or because XCode was pointing at the wrong version of the Simulator, or a resoruce was missing a target membership, or whatever. I tried all of that.
I downloaded XCode from the App Store, re-installed the Simulators, and still no luck. So I just rolled back my repository to an earlier date, and lost some work in the process. Not much though, because I always commit little and often.
Since ever starting to use storyboards back in 2011, I have always committed little AND OFTEN. Storyboards are fragile.
EDIT
After adding the new components back in, the problem re-surfaced.
I noticed that I put a static table view, within a UIViewController. I was doing this before.
I was using a subclass of UITableViewController in code, but the storyboard scene, was a UIViewController. I dragged out a UITableViewController instead, and moved the table view cells into that, and it solved the issue.
All thanks to missing error messages. Where have they all gone since XCode 5?
Do a
which ibtool
At the command line on both Macs. Chances are they are different.
Before Xcode was bundled in a single .app bundle it would install command line tools in folders like /usr/local.
I would recommend you remove those local copies to avoid interference with Xcode's built in version, i.e. that it uses the old version. If you still want to be able to use ibtool from the command line, here's an explanation about xcrun: http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
Almost half year later I finally succeeded to discover what was causing this problem and fixed the bug.
Now, with XCode 4.6.3 it gives me another clue about the problem:
2013-06-28 18:15:32.606 Interface Builder Cocoa Touch Tool[7894:f07] CFPreferences: user home directory at file://localhost/Users/[myusername]/Library/Application%20Support/iPhone%20Simulator/User/ is unavailable. User domains will be volatile.Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255
After receiving this new message, I searched for this User folder inside "iPhone Simulator" and there were no folder named "User".
I created the "User" folder, did a clean and after this I was able to build the project again!
the fix for me in Xcode 6.4 was to ... restart my computer. sad, but true.
I was getting the same error. It turned out I had miswired some of the outlets in the tableview cell.
I don't know if someone is still struggling with this error but today was my turn to confront it. I just solved it. This is the context:
I had a UITableViewCell with half of it cover by a simple UIVIEW. Inside this UIVIEW i had many other view (UILables, UITextField, etc etc)
Just where the UIVIEW ended (Again it covered the middle of the entire UITableViewCell) i placed an UIImageView. Half of the UIImageView covered the UIView and the other half was on the UITableView itself. In the Hierarchy the UIImageView was on the UITableVIewCell and not inside the UIView.
The problem was when i was applying autolayout i put a constraint between a view inside the UIView and the UIImageView that was outside of the UIVIEW.
When i run the app, the error came up. After half an hour deleting views and stuff i realized that the error was caused by that constraint. After deleting that constraint, the error was gone.
So bottom line, check your constraints! only "Connect" views with others that are inside the same superView.
Good luck!
Try completely reinstalling Xcode. Seems like there's something wrong with ibtool that a reinstall is probably able to fix.

Resources