Debugging with total

RxSwift includes another utility operator that counts all Observable allocations, called total. This is not enabled by default. To enable it, the trace resources flag needs to be added to the RxSwift target. The most reliable way to do this with CocoaPods is to set this flag to the debug configuration in the pod file's post install hook. Check the pod file of the starter project for this section, and you will note the install hook, as follows:

post_install do |installer|    installer.pods_project.targets.each do |target|        target.build_configurations.each do |config|            config.build_settings['CONFIGURATION_BUILD_DIR'] = '$                                      PODS_CONFIGURATION_BUILD_DIR'            if config.name == 'Debug'                config.build_settings['OTHER_SWIFT_FLAGS'] ||= ...

Get Reactive Programming with Swift 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.