Module 'RxSwift' has no member named 'Resources

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/lvchenqiang_/article/details/80813714

问题:使用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

猜你喜欢

转载自blog.csdn.net/lvchenqiang_/article/details/80813714