Xcode 6.3 Crashes when navigating from storyboard to other Swift 1.2 file

IosSwiftXcode

Ios Problem Overview


I installed Xcode 6.3 which includes support for Swift 1.2. It turned up a ton of error messages, which are mostly casting issues.

I navigated to the storyboard, and cannot go back to any other .swift without the whole thing crashing. I have force quit, restarted, and even re-installed, and I still can't navigate away from the Main.storyboard file.

I have tried the suggestion described here to open storyboard as code, make some changes, revert those changes, save and try again, and still no luck.

Is something in my code breaking Xcode? Is anyone else experiencing this? I had used Xcode 6.3 beta successfully with the same codebase.

Update: This has now been fixed in Xcode 6.3.1 released on the 21st of April 2015.

Ios Solutions


Solution 1 - Ios

I gather from the apple developer forums that this is an @IBDesignable issue. Especially in projects that use custom fonts, additional xibs, etc.

I have somehow fixed my issue by removing all @IBDesignable from swift UIView class definitions. You can open your project directory with TextMate or other, search and remove all "@IBDesignable"

However I still think this is a MAJOR bug, that needs to be worked on.. so keep filing bug reports to Apple.

Solution 2 - Ios

A temporary solution:

By opening a "New Window" (same project).

One for the code, one for the storyboard or reduce first, work freely with second window.

You can keep your @IBDesignables


EDIT : Bug fixed -> Update Xcode 6.3.1

Solution 3 - Ios

Launching Xcode while holding shift fixed it for me.

(This suppresses Xcode's state restoration.)


Update: Xcode 6.3.1, released today, resolves this issue.

Solution 4 - Ios

Update Xcode 6.3.1

For me, everything works !

Solution 5 - Ios

Temporary solution:

If you have currently opened Assistant Editor switch to another file using alt+click. You can keep your @IBDesignables.

Solution 6 - Ios

Here's how I get around this strange bug:

  1. Before launching Xcode, rename the storyboard file in finder so that Xcode won't find it (e.g. add the extension .temp)
  2. Launch Xcode - works fine even if it hanged before since it cannot display the storyboard editor
  3. Open a new window in Xcode
  4. Rename the storyboard file to its original name
  5. In the new window in Xcode - select the storyboard - Xcode does not hang
  6. Minimize the new window and work as usual in the original window. Now you can select any file - even the storyboard - without Xcode hanging

One problem remains, though, at least for me. Every time I select a file or edit something, Xcode needs to recompile the storyboard. Haven't solved that one yet.

Solution 7 - Ios

I can confirm this bug. I was stuck in storyboard and could do nothing to get out of it (couldn't even open the assistant). As a workaround, with the storyboard open, right-click the .storyboard file and select Open As - Source Code. This will switch your storyboard to code and you will be able to then switch to any file.

Solution 8 - Ios

It is not a bug anymore since Apple fixed it in Xcode 6.3.1.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionstoneView Question on Stackoverflow
Solution 1 - IosstoneView Answer on Stackoverflow
Solution 2 - IosDimitriView Answer on Stackoverflow
Solution 3 - IosAaron BragerView Answer on Stackoverflow
Solution 4 - IosDimitriView Answer on Stackoverflow
Solution 5 - IosBartłomiej SemańczykView Answer on Stackoverflow
Solution 6 - IosAnders ForssellView Answer on Stackoverflow
Solution 7 - IosAndrei FilipView Answer on Stackoverflow
Solution 8 - IosBartłomiej SemańczykView Answer on Stackoverflow