feat:fix Register DevMonitor
This commit is contained in:
@@ -30,15 +30,6 @@
|
||||
#import "DoricDevViewController.h"
|
||||
#import "DoricDevMonitor.h"
|
||||
|
||||
@interface DoricDevLibrary : DoricLibrary
|
||||
@end
|
||||
|
||||
@implementation DoricDevLibrary
|
||||
- (void)load:(DoricRegistry *)registry {
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@interface DoricDev ()
|
||||
@property(nonatomic, strong) DoricWSClient *wsclient;
|
||||
@property(nonatomic, strong) DoricContext *context;
|
||||
@@ -56,12 +47,7 @@ - (instancetype)init {
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onEnterDebugEvent) name:@"EnterDebugEvent" object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onStopDebugEvent) name:@"StopDebugEvent" object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onDebuggerReadyEvent) name:@"DebuggerReadyEvent" object:nil];
|
||||
[Doric registerLibrary:[DoricDevLibrary new]];
|
||||
NSValue *value = DoricContextManager.instance.aliveContexts.firstObject;
|
||||
if (value) {
|
||||
DoricContext *context = value.nonretainedObjectValue;
|
||||
[context.driver.registry registerMonitor:[DoricDevMonitor new]];
|
||||
}
|
||||
[DoricNativeDriver.instance.registry registerMonitor:[DoricDevMonitor new]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
Reference in New Issue
Block a user