Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Assertion in -[RACStream flattenMap:] fails with RACSubject from rac_signalForSelector: #1085

sebreh opened this Issue · 3 comments

2 participants


This assertion in -[RACStream flattenMap:] fails deep down in the stack trace from subscribeNext: when it is passed a RACSubject that resulted from calling rac_signalForSelector: on an object. I will keep digging, but it seems this is due to the swizzling happening in rac_signalForSelector: (which, I must admit, I don't fully understand yet), where the object returned is not actually an instance of RACSubject (and thus, not a subclass of RACStream) although its class property indicates it is. Breaking on the assertion and printing some info gives me the following:

(lldb) po value
<RACSubject: 0xea504c0> name: <PodioAppDelegate_iPhone: 0xe777600> -rac_signalForSelector: application:performFetchWithCompletionHandler:
(lldb) po [value class]
(lldb) p (BOOL)[value isKindOfClass:[RACSubject class]]
(BOOL) $6 = NO

Any idea what might be going on? It seems to me the asserted condition might be too strict in this case?


Have a look at #901. The failing -isKindOfClass: assertion is typically the manifestation of having two distinct definitions of a given class. In this case it would seem there are two RACSubject classes.


Ah that did it, I needed to only include it in the app target and not my unit test target. Thanks!

@sebreh sebreh closed this

Great, glad that was it. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.