GGCharts module 'ObjectiveC.NSObject' requires feature 'objc'

感觉GGCharts这个框架还不错,但是拖拽到工程中却发现一运行就出现下列问题:

GGCharts module 'ObjectiveC.NSObject' requires feature 'objc'

原因:iOS工程里添加C文件造成的编译错误

解决:在Xcode左下角搜索 .c 文件,如下图:

GGCharts module 'ObjectiveC.NSObject' requires feature 'objc'

然后选中这个文件,把 Default-C 修改成 Object-C,如下图:

GGCharts module 'ObjectiveC.NSObject' requires feature 'objc'