以使用Charts为例,在Podfile文件中添加: use_frameworks! pod 'Charts' 执行pod install命令导入成功后,在需要使用的文件引入#import <Charts-Swift.h>,就可以正常使用了。