Skip to content

RxSwift.resourceCount not accessable #378

Closed
@kbala-ami

Description

@kbala-ami

if TRACE_RESOURCES

private let startResourceCount = RxSwift.resourceCount

endif

Says,
Module 'RxSwift' has no member named 'resourceCount'

Activity

sergdort

sergdort commented on Jan 2, 2016

@sergdort
Contributor

Please take a look on #301

kbala-ami

kbala-ami commented on Jan 3, 2016

@kbala-ami
Author

Hi @sergdort I set the OtherSwift Compiler Flags same as you did, still I have same issue, Please see the below SS

2016-01-03_1318

sergdort

sergdort commented on Jan 4, 2016

@sergdort
Contributor

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
singno

singno commented on Jan 4, 2016

@singno

I use Carthage build version: github "ReactiveX/RxSwift" ~> 2.0 . And I cann't access RxSwift. resourceCount too.

image

image

sergdort

sergdort commented on Jan 4, 2016

@sergdort
Contributor

Here is screen shot from RxExample, looks like it should be -D TRACE_RESOURCES

screen shot 2016-01-04 at 11 40 43 am

singno

singno commented on Jan 4, 2016

@singno

It seems not working for me.

sergdort

sergdort commented on Jan 4, 2016

@sergdort
Contributor

And it off course should be in the framework build settings. I'm not sure is it possible to do some configurations with Carthage, like with Cocoapods

screen shot 2016-01-04 at 12 38 12 pm

kzaher

kzaher commented on Jan 4, 2016

@kzaher
Member

You can't access resourceCount with Carthage because, as far as I'm aware of, Carthage only uses release version of the binaries, and you can't specify addition compilation flags.

Once any version of RxSwift libraries is compiled without TRACE_RESOURCES Swift flag, the code that traces resources is simply not compiled inside the library.

If Carthage supported specifying additional Swift flags during compilation, that would be possible, but I'm not sure it currently supports that or is there some other way to solve that using Carthage.

singno

singno commented on Jan 4, 2016

@singno

@kzaher Yes, Carthage seems can not change build setting.
@sergdort I can not set the build setting of RxSwift framework.

ikesyo

ikesyo commented on Jan 5, 2016

@ikesyo
Contributor

You can use carthage build --configuration Debug.

kbala-ami

kbala-ami commented on Jan 5, 2016

@kbala-ami
Author

yes, I run carthage build --configuration Debug

I can access the resourceCount now, and it works 👍

kzaher

kzaher commented on Jan 5, 2016

@kzaher
Member

Thnx @ikesyo :)

kzaher

kzaher commented on Jan 5, 2016

@kzaher
Member

And thnx @sergdort , helping with issues helps a lot 👍

19 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @freak4pc@ikesyo@scotteg@kzaher@nahung89

        Issue actions

          RxSwift.resourceCount not accessable · Issue #378 · ReactiveX/RxSwift