[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:
parent
725053acfe
commit
270e09d46e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue