IBDesignable build failed

I'm trying to created an IBDesignable custom view. However, after adding the class to an item in xib, it always failed to build, without any error or warning.

I imported the class to another newly created project, and it works fine.

Is there anyone know if there is some mistake I made to prevent IBDesignable works on the project?

I'm currently using xcode 8.2.1, sdk 10.2.

Replies

I have the same problem too... 😟

Do you have a watchOS app in your workspace? It seems Xcode 9.3 won't let me use IBDesignable either if I have watchOS stuff present, even though the stuff I'm trying to make IBDesignable have nothing to do with that watch target. If my workspace uses the "old" build system, then I at least see an error in the Report Navigator, but if I use the "new" build system it just fails silently.