3

I am trying to use the Charts framework in my app. I have build the binary for this using Carthage and added to my app and contains two files:

 - Charts-Swift.h
 - Charts.h

Then I have set the custom class of a view to BarChartView, but it seems that XCode doesn't recognize the class (No autocomplete). And the custom module is not set also.

When I run the app I always get this warning:

Unknown class BarChartView in Interface Builder file

I have try some solutions from the internet, but nothing seems to work for me.
Anyone has a solution for Xcode 8.1 and Swift 3 ?

Adrian
  • 19,440
  • 34
  • 112
  • 219
  • Is this steps followed : Charts now include Carthage prebuilt binaries. github "danielgindi/Charts" == 3.0.0 github "danielgindi/Charts" ~> 3.0.0 In order to build the binaries for a new release, use carthage build --no-skip-current && carthage archive Charts && carthage archive ChartsRealm. – Dileep Nov 15 '16 at 18:39
  • I tried that now, but apparently there is a problem with Carthage when building (https://github.com/SwiftyJSON/SwiftyJSON/issues/560). Maybe I should use Cocoapods. – Adrian Nov 15 '16 at 20:15
  • @Kobe Did you solve this ? I'm having the same issue. – strangfeld Jan 28 '17 at 10:08
  • @strangfeld: I used Cocoapods to build the library instead of Carthage – Adrian Jan 28 '17 at 13:40
  • @Kobe: Frustrating but I did the same in the meantime. Nevertheless thank you very much for responding. – strangfeld Jan 28 '17 at 14:33
  • @Kobe when you used cocoapods, did you still have the header files? What did you put as the `Module` in interface builder? – Adam Johns Jul 18 '17 at 16:05
  • @AdamJohns: I put Charts, as a module. – Adrian Jul 19 '17 at 16:51

1 Answers1

15

You just need inform IB where the class comes from, by specifying the module 'Charts'.

'Charts'

empedocle
  • 1,862
  • 1
  • 14
  • 25