mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-12 22:29:41 +08:00
[ReactNative][Profiler] Fix NSProcessInfo instacrash on iOS7
Summary: `NSProcessInfo operatingSystemVersion` was being used to check the system version for the Legacy Profiler on `RCTContextExecutor` but it's only available on iOS8+ Change it to `[UIDevice systemVersion]`
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#import <pthread.h>
|
||||
|
||||
#import <JavaScriptCore/JavaScriptCore.h>
|
||||
#import <UIKit/UIDevice.h>
|
||||
|
||||
#import "RCTAssert.h"
|
||||
#import "RCTDefines.h"
|
||||
@@ -32,7 +33,7 @@
|
||||
#include <dlfcn.h>
|
||||
|
||||
#ifndef RCT_JSC_PROFILER_DYLIB
|
||||
#define RCT_JSC_PROFILER_DYLIB [[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"RCTJSCProfiler.ios%zd", [[NSProcessInfo processInfo] operatingSystemVersion].majorVersion] ofType:@"dylib" inDirectory:@"Frameworks"] UTF8String]
|
||||
#define RCT_JSC_PROFILER_DYLIB [[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"RCTJSCProfiler.ios%zd", [[[UIDevice currentDevice] systemVersion] integerValue]] ofType:@"dylib" inDirectory:@"Frameworks"] UTF8String]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user