Live visualization of custom component using IB_DESIGNABLE from pod dependency

I'm having difficulty using IB_DESIGNABLE in a container.

I created a custom view, which I designated IB_DESIGNABLE , and created a sample project that uses it. There are no problems at the moment.

The problem occurs when adding this custom view as a pod dependency. Despite the fact that the project is being built and works successfully, an error occurs when a storyboard is opened using a custom view. The Live Rendering process starts and tries to display the live view inside the interface builder, but it does not work with the following error:

enter image description here

This is too bad because we are losing Live Rendering, which, in my opinion, is one of the best features of Xcode 6.

  • Cocoapods gem version: 0.34.4
  • Xcode Version: 6.1 (6A1052d)

I tried other projects that use IB_DESIGNABLE and have podspec :

Someone else had the same problem in Estimote - Local location error , but the solution described means the loss of Live Rendering capabilities.

Could anyone use the IB_DESIGNABLE component via Cocoapods?

Error: "Failed to load features from path (null)"

+20
ios objective-c xcode6 ibdesignable
Oct. 25 '14 at 9:53 on
source share
3 answers

This is fixed in the latest version of Cocoapods (0.36.0.b.1) .

To install this version:

[sudo] gem install cocoapods --pre

Learn more about Cocoapods with frames here.

To fix Error: "failed to load designables from path (null)" :

 platform :ios, '7.0' use_frameworks! target 'test' do pod 'EAColourfulProgressView', '~> 0.1.0' end target 'testTests' do end 

Add use_frameworks! to the Podfile .

+19
Jan 23 '15 at 10:51
source share

When specifying your custom class in the Identity Inspector, do you indicate from which module this class should be loaded? The module must be the name of the library from which the class comes.

0
Nov 27
source share

I solved my problem using use_frameworks! in the PodFile, on the first line. (do not forget ! )

The IBInspectable properties must be dynamic, so it requests dynamic linking of the library. Using the above line, once you set the class of the control, it will build the framework and bind it, resolving these binding problems. When I upgraded to beta, Parse stopped working.

Hope this helps someone.

0
Jul 10 '15 at 15:10
source share



All Articles