Archana Vetkar
Archana Vetkar

Reputation: 63

Main.storyboard: Internal error. Please file a bug in Xcode 7.2

While changing constraints in storyboard, suddenly encountered this error when I wanted to run the project.

Main.storyboard: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/jy/qk3txlvd1nxc3305l0_z73_00000gp/T/IB-agent-diagnostics_2016-01-13_15-31-24_701000"

.

And now I can't run my project anymore. Did anyone encounter this before?

Upvotes: 3

Views: 2676

Answers (3)

Vamsy
Vamsy

Reputation: 94

Using the finished flag value in completion, you can identify which action to perform.

[UIView animateWithDuration:0.2
     animations:^{view.alpha = 0.0;}
     completion:^(BOOL finished){ [view removeFromSuperview]; }];

Upvotes: 0

krakover
krakover

Reputation: 3029

I had the same issue. I systematically tried to delete every element in the storyboard. Eventually I found that there what was crashing my app was segues to a specific controller. I checked the definition in the storyboard code, but it looked fine, so I created a new controller - copying all elements form the the old one and deleting it. The new controller had no problems, and the project was working fine.

Upvotes: 0

Adrian Sluyters
Adrian Sluyters

Reputation: 2241

The only 2 ways to really get around this are to:

1) Restore from TimeMachine 2) Right Click on the storyboard in the project navigator 3) Click on "Open As" 4) Click on "Source Code"

and you'll be presented with an XML document which denotes the Storyboard.

From having fixed issues in the past, check:

1) That relationships between controllers (segues) are intact linked on both ends i.e. source and destination controller in the source code

i.e.

                <connections>
                    <segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
                </connections>

The relationship between the NSWindowController and the rootViewController is for me as above in my example:

- XfG-lQ-9wD is the destination of the segue
- cq2-FE-JQM is the id of the segue (NOT the source controller)

Then check on THAT controller to see if there's a reverse relationship...

If I search through my code, I see that "XfG-lQ-9wD" is there, so that should be a good connection...

For for layout constraints, your tags will appears something like:

                    <constraints>
                        <constraint firstItem="Cze-Ji-Ugi" firstAttribute="centerX" secondItem="m2S-Jp-Qdl" secondAttribute="centerX" id="hsN-CU-OKT"/>
                        <constraint firstItem="Cze-Ji-Ugi" firstAttribute="centerY" secondItem="m2S-Jp-Qdl" secondAttribute="centerY" id="lVs-Mc-hd6"/>
                    </constraints>

Personally , if I were you, I'd delete EVERYTHING between ... on the page... But leave the translatesAutoresizingMaskIntoConstraints tags as they are.

Ofcourse make a copy of your files before you do this. But on a positive note, I've just done with it ALL of the constraints off of a preference pane which I'm working on and it didn't mind.

Upvotes: 2

Related Questions