I recently upgraded to Xcode 8 and I am having issues with the Storyboard.
If I open the project and I don\'t have the Storyboard open, it will compile and run just
You can try one of the following to figure out the cause:
IBDesignablesAgentCocoaTouch
logs in this directory:
~/Library/Logs/DiagnosticReports
and see the cause.Note: for user with Catalina: look for
IBDesignablesAgent-iOS_<DATE>-<MAC_NAME>.crash
Go to the Editor -> Debug Selected View while selecting your @IBDesignable UIView
in your storyboard, and see the stack trace.
Delete Derive Data folder.
Xcode Preference -> Location -> Derived Data
/Users/YourMacName/Library/Developer/Xcode/DerivedData
Clean your project Shift
+ Command
+ Alt
+ K
.
Build your project Command
+ B
.
Faced same Error: Had customised UITextField and using interface builder, the error in console was -Use of unimplemented initializer 'init(frame:)' for class "CustomField"
Added the initialiser to fix the error
Adding following code to my @IBDesignable
class did the trick.
override init(frame: CGRect) {
super.init(frame: frame)
}
For anyone -like me- who can't find that IBDesignablesAgentCocoaTouch
file or when trying to 'Debug Selected Views' from the Editor gets an error, here's another way to debug those "Failed to render" errors.
Open the 'Console' app, from the sidebar select your current Mac (it will probably be auto-selected by default) and then on the search bar search for "IBSceneUpdate" and hit enter.
This way, every time you get an Xcode error for an IBDesignable
not being able to render, you will also get a new "IBSceneUpdate" entry with more details about the error.
That's at least how I was able to debug my IBDesignable
errors!
Correct answer provided by @Maria:
check crash report at
~/Library/Logs/DiagnosticReports
Alternative way:
Spotlight
console.app
Crash reports
IBDesignablesAgent-iOS
and review crash logJust open your storyboard -> Editor -> Refresh all views. This work for me.