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.

Community
  • 1
  • 1
stone
  • 2,192
  • 16
  • 26
  • 1
    Same crashes here... – Dániel Nagy Apr 09 '15 at 15:13
  • Try to convert your project to swift 1.2 (Edit > Convert > To Latest Swift Syntax.) – Duyen-Hoa Apr 09 '15 at 15:22
  • 3
    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. – stone Apr 09 '15 at 15:28
  • 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. – stone Apr 09 '15 at 16:01
  • 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... – jrichau Apr 09 '15 at 23:50
  • 2
    It's not only a swift issue... Objective-C also – Omid Hashemi Apr 10 '15 at 10:46
  • 2
    Radar Submitted: http://www.openradar.me/20498652 – Anthony Mattox Apr 10 '15 at 16:10
  • 3
    Not just from Storyboard to Swift, crashes Storyboard to Obj-C file too. – daihovey Apr 14 '15 at 07:23
  • It basically happens when you close the storyboard file, regardless of the language. – amir Apr 14 '15 at 12:54
  • 1
    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. – Unome Apr 14 '15 at 22:50
  • Same bug in XCode 6.4 beta. The only stable solution is to comment all IB_DESIGNABLE directives. – lazarev Apr 17 '15 at 11:00
  • 1
    Got a response to my radar that they have a fix that will be released with the next update – Unome Apr 17 '15 at 15:01

8 Answers8

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.

stone
  • 2,192
  • 16
  • 26
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

Dimitri
  • 370
  • 1
  • 5
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.

Aaron Brager
  • 65,323
  • 19
  • 161
  • 287
  • 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 +1 – Unome Apr 17 '15 at 15:03
4

Update Xcode 6.3.1

For me, everything works !

Community
  • 1
  • 1
Dimitri
  • 370
  • 1
  • 5
0

Temporary solution:

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

Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
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.

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.

Andrei Filip
  • 1,145
  • 15
  • 33
  • This is just a temporary fix, as soon as you view the storyboard again you will be back to same problem – amir Apr 15 '15 at 09:14
  • 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_DESIGNABLES – Andrei Filip Apr 15 '15 at 09:18
  • you can double click a different file and keep the storyboard open too in the background. – amir Apr 15 '15 at 10:25
  • 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 :) – Andrei Filip Apr 15 '15 at 11:59
0

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

Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358