glaszig / SZTextView

A drop-in UITextView replacement which gives you: a placeholder.
MIT License
683 stars 102 forks source link

Failed to load designable from path(null) #52

Closed dleviathan closed 8 years ago

dleviathan commented 8 years ago

I use your lib in storyboard (with iO7 and Objective-C) when i add your controller and imbue class to SZTextView i got this error

Base.lproj/Main.storyboard: error: IB Designables: Failed to update auto layout status: Failed to load designables from path (null)

Base.lproj/Main.storyboard: error: IB Designables: Failed to render instance of SZTextView: Failed to load designables from path (null)

how to fix it?

glaszig commented 8 years ago

which version of xcode are you running? are you using cocoapods? carthage? there was an issue with cocoapods... CocoaPods/CocoaPods#2792

andreasmpet commented 8 years ago

Getting the same error. Using cocoapods. XCode 7.3.1

It compiles, but it's annoying to have this error pop up in the project all the time.

I assume it's because I'm not using dynamic libraries (still need to support iOS7).

atmikev commented 8 years ago

Same. Xcode Version 7.3.1 (7D1014). Cocoapods 0.39.0

glaszig commented 8 years ago

the issue seems to be the combination of cocoapods + IB_DESIGNABLE (+ iOS 7).

please try to not use SZTextView via cocoapods but one of the following ways and report back.

glaszig commented 8 years ago

i just validated the issue with cocoapods 1.0.1.

unless your deployment target is iOS 7, the solution would be to add the use_frameworks! macro to your Podfile. the problem with iOS 7 is that dynamic frameworks, as introduced in cocoapods 0.36 with use_frameworks!, technically work but will likely be rejected upon submission.

so, the only viable solution to have IB_DESIGNABLEs to work when developing for iOS 7 is to either

i will close this issue for now. if anybody uncovers other details or solutions feel free to comment, reopen, whatever. thank you.