evgenyneu / Cosmos

A star rating control for iOS/tvOS written in Swift
MIT License
2.18k stars 369 forks source link

IB Designable error #64

Closed KMessina1 closed 6 years ago

KMessina1 commented 7 years ago

Main.storyboard: warning: IB Designables: Using class UIView for object with custom class because the class CosmosView does not exist

--

If I am missing a setting or checking off something, please let me know. I am a new user to this control.

-Kevin.

evgenyneu commented 7 years ago

Hi @KMessina1, thanks for reporting. Yes, I saw this annoying warning many times myself. It could be fixed in Identity Inspector when your view is selected in the Storyboard:

  1. Set the Class to CosmosView.
  2. Set the Module to Cosmos if you used CocoaPods or Carthage setup method. Leave it blank if you used file setup method.
  3. Clean the build.
  4. Restart Xcode.

Let me know if it works for you. :)

KMessina1 commented 7 years ago

Yes it did. I have had this same issue with my own IBDesignable's periodically in the past and stopped using them. I had hoped by now Apple would have solved the issue. Maybe xCode 9's new IB Designer will address it better. Great control by the way. Have it in a Tableview and works very nicely. Good job creating it and thank you for making it open to others.

-Kevin.

evgenyneu commented 7 years ago

I am glad it worked. I think we can leave this ticket open, since it can be useful to others.

Maybe xCode 9's new IB Designer will address it better.

I hope so too :).

wasappi commented 7 years ago

Edit : And I should read your instructions, using the correct Swift 4 branch has fixed the issue. My bad Hi, On XCode 9b5, I have a "Designables Build failed" in the Interface builder right Panel. Module is set to Cosmos, I've cleaned the project, started XCode again but still have this error. (Using Cocoapods with 11.0.3). Thanks !

evgenyneu commented 7 years ago

@wasappi oh ... good! :) Let me know if you still have any problems in Xcode 9.

evgenyneu commented 6 years ago

Closing the issue. Feel free to reopen if needed.

SarahNys commented 6 years ago

I also have the error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): dlopen(Cosmos.framework, 1): no suitable image found. Did find: Cosmos.framework: required code signature missing for 'Cosmos.framework'

I did follow your instructions, but it doesn't work.

evgenyneu commented 6 years ago

Thanks for reporting @SarahNys. It looks like in #105 people reported similar errors, so their solution may help.