From 270e09d46edd732764a2f165fcb44dad10928756 Mon Sep 17 00:00:00 2001 From: Tadeu Zagallo Date: Mon, 20 Jul 2015 19:30:59 -0700 Subject: [PATCH] [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]` --- React/Executors/RCTContextExecutor.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/React/Executors/RCTContextExecutor.m b/React/Executors/RCTContextExecutor.m index 67232489c..daa0fa26d 100644 --- a/React/Executors/RCTContextExecutor.m +++ b/React/Executors/RCTContextExecutor.m @@ -12,6 +12,7 @@ #import #import +#import #import "RCTAssert.h" #import "RCTDefines.h" @@ -32,7 +33,7 @@ #include #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