RxSwift: RxSwift.resourceCount not accessable

if TRACE_RESOURCES

private let startResourceCount = RxSwift.resourceCount

endif

Says, Module ‘RxSwift’ has no member named ‘resourceCount’

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 26 (13 by maintainers)

Most upvoted comments

Hey guys you can also add post install to pod file

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

Is there any way to access RxSwift.Resources.totalCount if RxSwift is added via Swift Package Manager?

You can use carthage build --configuration Debug.

Hi @kbala did you make a post POD install hook ?

use_frameworks!

pod 'RxSwift'

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

follow to @kzaher in #1277, i can enable debugging with Carthage by using script:

carthage update --no-use-binaries --configuration Debug RxSwift

Let’s add this to next release 😃

Oh,

@sergdort I’ve thought we can add this to podspec also and not podfile. My bad.

Just remembering that right now, the resource count is getted from: RxSwift.Resources.total.