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

8

80

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.

Salts answered 9/4, 2015 at 15:11 Comment(12)
Same crashes here...Talebearer
Try to convert your project to swift 1.2 (Edit > Convert > To Latest Swift Syntax.)Unroot
HoaParis still crashing after conversion. I mean I am literally stuck on the storyboard. I can't even close the current project to open another project.Salts
Also, I have just noticed that there is no iOS 8.3 SDK installed with this version of Xcode. The IOS 8.3 SDK has gone AWOL. It does not even show up when searching for updates. Maybe related.Salts
I was experiencing this as well - though only when opening the workspace (not the core project). So I was able to open the project and remove all references to IBDesignable and IBInspectable. Then the workspace opened up and I could navigate to and from the storyboard...Assumption
It's not only a swift issue... Objective-C alsoBernini
Radar Submitted: openradar.me/20498652Kirkwall
Not just from Storyboard to Swift, crashes Storyboard to Obj-C file too.Dichy
It basically happens when you close the storyboard file, regardless of the language.Cynara
Also submitted a radar, and talked to a friend of mine who is an Apple dev. The more radars they get about the issue, the more urgently they will fix it.Casemate
Same bug in XCode 6.4 beta. The only stable solution is to comment all IB_DESIGNABLE directives.Piet
Got a response to my radar that they have a fix that will be released with the next updateCasemate
S
67

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.

Salts answered 9/4, 2015 at 16:18 Comment(3)
I have successfully converted all my projects EXCEPT the one where I'm using an IBDesignable, so I'm pretty sure @livingstonef is on to somethingCasemate
can also confirm. removing @IBDesignable makes xcode work. Thanks!Labor
Is there a Radar for this?Nosey
C
21

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

Concuss answered 10/4, 2015 at 9:57 Comment(2)
Working... You can hide your Navigator by Cmd+0 to not be tempted to changing files in additional window.Fisken
another solution rename storyboard file in finder, switch to needed class and be happy!!! ))))) I like Apple updates, where's Stive? Help usInvent
U
15

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.

Unmistakable answered 11/4, 2015 at 6:25 Comment(1)
This is a fantastic help. I kept getting trapped with the old windows getting restored, being able to bypass this is wonderful. Thank you +1Casemate
C
4

Update Xcode 6.3.1

For me, everything works !

Concuss answered 22/4, 2015 at 6:30 Comment(0)
N
0

Temporary solution:

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

Noreen answered 10/4, 2015 at 9:37 Comment(0)
S
0

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.

Sistrunk answered 13/4, 2015 at 17:20 Comment(0)
K
0

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.

Kiruna answered 14/4, 2015 at 14:33 Comment(4)
This is just a temporary fix, as soon as you view the storyboard again you will be back to same problemCynara
Yes, it is. I just had to find a way to get out of the storyboard in the first place and so far this was the only thing that worked without removing all my IB_DESIGNABLESKiruna
you can double click a different file and keep the storyboard open too in the background.Cynara
This helps you get rid of it. I don't want the storyboard open in the background as it's quite complex and eats up resources to keep it open. It's just a temporary solution which so that you don't need to change the IB_DESIGNABLES and still be able so use Xcode :)Kiruna
N
0

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

Noreen answered 21/4, 2015 at 17:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.