问题:使用cocoapods 集成RxSwift 后 引入项目工程不能使用RxSwift.Resources.total 。一直报错Module ‘RxSwift’ has no member named ‘Resources
解决方式: 在podfile 添加如下代码
post_install
do |installer|
installer.pods_project.targets.
each do |target|
if target.name ==
'RxSwift'
target.build_configurations.
each do |config|
if config.name ==
'Debug'
config.build_settings[
'OTHER_SWIFT_FLAGS'] ||= [
'-D',
'TRACE_RESOURCES']
end
end
end
end
end
参考文章地址:https://github.com/ReactiveX/RxSwift/issues/378