...
|
...
|
@@ -119,7 +119,15 @@ |
|
|
-(void)yher_viewDidAppear:(BOOL)animated {
|
|
|
@try {
|
|
|
if (self.shouldTrack && !self.yher_hasReported) {
|
|
|
CFRunLoopRef mainrunloop = CFRunLoopGetMain();
|
|
|
CFStringRef runLoopMode = kCFRunLoopDefaultMode;
|
|
|
CFRunLoopObserverRef observer = CFRunLoopObserverCreateWithHandler(kCFAllocatorDefault, kCFRunLoopBeforeWaiting, true, 0, ^(CFRunLoopObserverRef observer, CFRunLoopActivity activity) {
|
|
|
[[YH_EventCollector sharedInstance] timeEventEndWithViewController:self];
|
|
|
CFRunLoopRemoveObserver(mainrunloop, observer, runLoopMode);
|
|
|
});
|
|
|
CFRunLoopAddObserver(mainrunloop, observer, runLoopMode);
|
|
|
CFRelease(observer);
|
|
|
|
|
|
}
|
|
|
if ([YHEventReport sharedInstance].isAppCrashReportEnable && [YHEventReport sharedInstance].isAutoTrackEnabled) {
|
|
|
|
...
|
...
|
|