Skip to content

Commit

Permalink
Fix crash in Stats due to KVC not working with structs
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Jun 5, 2017
1 parent 10d3441 commit d69ad17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions detox/ios/Detox/WXRunLoopIdlingResource.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@implementation WXRunLoopIdlingResource
{
CFRunLoopRef _runLoop;
id _runLoop;
dispatch_queue_t _dateSerialQueue;
BOOL _isBusy;
}
Expand Down Expand Up @@ -40,10 +40,10 @@ - (instancetype)initWithRunLoop:(CFRunLoopRef)runLoop
self = [super init];
if(self)
{
_runLoop = runLoop;
_runLoop = (__bridge id)(runLoop);
_dateSerialQueue = dispatch_queue_create("_dateSerialQueue", NULL);

CFRunLoopAddObserver(_runLoop, CFRunLoopObserverCreateWithHandler(NULL, kCFRunLoopExit | kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting, YES, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
CFRunLoopAddObserver((__bridge CFRunLoopRef)_runLoop, CFRunLoopObserverCreateWithHandler(NULL, kCFRunLoopExit | kCFRunLoopBeforeWaiting | kCFRunLoopAfterWaiting, YES, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
dispatch_sync(_dateSerialQueue, ^{
// NSLog(@"☣️ DETOX:: Current runloop activity: %@", [self translateRunLoopActivity: activity]);
if(activity == kCFRunLoopBeforeWaiting || activity == kCFRunLoopExit)
Expand Down

0 comments on commit d69ad17

Please sign in to comment.