Reputation: 2245
While editing in the storyboard, specifically assigning a view controller to a specific class, I 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/79/_jh611t15qsfcx165_jv_20h0000gn/T/IB-agent-diagnostics_2015-10-28_00-33-12_730000".
And now I can't run my project anymore. I couldn't find any information regarding to this anywhere else. Did anyone encounter this before?
Upvotes: 74
Views: 31403
Reputation: 3921
I had the same issue that I just recently resolved. Hopefully this helps somebody..
What I tried that did not work:
XCode was telling me the issue was in the Main storyboard. I was making a lot of changes to one View Controller in particular. After removing all outlets and connections and deleting this View Controller (in Storyboard), I got the error to go away and the App to launch.
I then re-added a new View Controller and basically re-made the whole UI. It took about 15 minutes, but now the App actually compiles and runs.
Upvotes: 0
Reputation: 956
The only thing that worked for me(not needing to restart the Mac) was:
(Close all Storyboard tabs opened on Xcode)
[Product] -> [Clean All Issues]
[Cmd] + [Shift] + [k]
[Cmd] + [Q] (Quit Xcode)
Open [Launchpad] -> [Xcode] instaled from AppStore
[Open a project or file] -> 'MyProjct.xcworkspace'
[Cmd] + [R] (Run)
Upvotes: 0
Reputation: 1520
I faced the same issue. And it was solved by cleaning up the build files.
cmd + shift + k
AND
cmd + option + shift + k
Upvotes: 122
Reputation: 187
No solution above work for me. I fix it with this:
note: this only for project with cocoapod installed project
Upvotes: 0
Reputation: 353
For me, I removed a whole UITableView
section that was playing up. It only had one cell, but obviously something was up. Removing it and restarting Xcode fixed it for me.
Upvotes: 0
Reputation: 2066
None of the other answers worked for me. Here's what did.
Build and run.
Upvotes: 0
Reputation: 69787
Just ran into this error, and it coincided with non-available iOS versions showing for the wrong Xcode (e.g., iOS 11.2 showing for Xcode 8.2.1, which is not possible for iOS Simulators).
Solution was to delete /Library/Developer/CoreSimulator
, e.g.,
rm -rf /Library/Developer/CoreSimulator
In theory you should be able to run xcrun simctl delete unavailable
but that didn't work in this case.
Note Found this issue on Xcode 8.2.1, but 9.2 was also installed.
Upvotes: 6
Reputation: 11
All these solutions didn't work for me.
What did work was this:
$ sudo chmod -R 777 ~/Library/Logs
Upvotes: 1
Reputation: 1614
I'm using Xcode 9.2 and all the above answers didn't solve the issue. My issue was that i added a constraint accidentally to the TableViewCell
Content View.
And content view is not constraint applicable and i'm not supposed to add constraints to it. It is already locked. But i really don't know how i added constraint to it accidentally.
After deleting the constraint everything started working again perfectly fine.
I thought this answer would help somebody having my same issue.
Upvotes: 0
Reputation: 1138
I simply removed the file causing this issue (just reference not delete) and re-added it again.
Upvotes: 2
Reputation: 36447
I had the same issue. Got it fixed using below steps :
Delete the derived data of your project
Clean your project (Shortcut : cmd + shift + k
)
Upvotes: 7
Reputation: 603
I had this issue on Xcode 8.2.1. Cleaning(cmd + option + shift + k) did not help. However, uninstalling the Xcode, downloading Xcode 8.2.1 from Apple, installing did resolve the issue.
Upvotes: 0
Reputation: 219
Here are the steps to fix this issue:
Uncheck target for the xib file -> clean the project->then check the target->clean the project-> run/build the project. Working in xcode 8.x
Upvotes: 1
Reputation: 391
The following steps will stop your problem.
Upvotes: 20
Reputation: 2274
Clearing out the DerivedData folder (in ~/Library/Developer/Xcode/DerivedData) is what fixed the issue for me.
Upvotes: 11
Reputation: 5712
I had same problem with xcode8 beta 6 , Command+K was not helpful , But then for which .xib file xcode was displaying error, I just corrected its related properties in IB like mine view was custom one & some of its inner image view properties. then i cleaned the build & run the app. It worked.
Upvotes: 0
Reputation: 11
Try Deleting each view controller and Build to find the view controller causing an issue.
In my case, I misplaced object in the storyboard.
Deleting this object worked for me.
Upvotes: 0
Reputation: 5314
In my case, the problem was with a UITextField as a subview in a UITableViewCell with 'Basic' styling. Once I changed it from 'Basic' to 'Custom' It started compiling.
Upvotes: 2
Reputation: 292
Sounds like you found a bug in Xcode and should file a bug report with apple here and attach the file that it specifies with the error. In the mean time, do you have an earlier version of your project that you can revert back to? Or provide the xml of your main story board here?
Upvotes: 2