ios – Objective-C项目中的Swift pod

前端之家收集整理的这篇文章主要介绍了ios – Objective-C项目中的Swift pod前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的吊舱看起来像这样

platform :ios,'8.1'

pod 'Masonry'
pod 'Parse'
pod 'SSKeychain'
pod 'Reachability'

当我添加’pod Charts’时,我会收到这样的错误

[!] Pods written in Swift can only be integrated as frameworks; this feature is still in beta. Add `use_frameworks!` to your Podfile or target to opt into using it. The Swift Pod being used is: Charts

如果我将podfile更新为:

platform :ios,'8.1'
use_frameworks!

pod 'Masonry'
pod 'Parse'
pod 'SSKeychain'
pod 'Reachability'
pod 'Charts'

它弄乱了项目,SSKeychain显示了重复的界面和枚举定义等无意义的错误.

我应该做些什么来支持Swift pod框架吗?或者我必须更新项目以删除某些开源文件(SSKeychain等)?

解决方法

也许你应该删除给定pod的缓存,或者完全清除缓存.请按照 pod cache clean进行

pod cache clean [NAME]

Remove the cache for a given pod,or clear the
cache completely.

If there is multiple cache for varIoUs versions of the requested pod,
you will be asked which one to clean. Use --all to clean them all.

If you dont give a podNAME,you need to specify the --all flag (this
is to avoid cleaning all the cache by mistake).

Options:

–all

Remove all the cached pods without asking.

Inherited options:

–silent

Show nothing.

–verbose

Show more debugging information.

–no-ansi

Show output without ANSI codes.

–help

Show help banner of specified command.

希望它对你有所帮助.

猜你在找的iOS相关文章