diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 198469358..4da25b030 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -345,8 +345,7 @@ static void RCTInstallJSCProfiler(RCTBridge *bridge, JSContextRef context) NSString *cachesPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]; RCTAssert(cachesPath != nil, @"cachesPath should not be nil"); if (cachesPath) { - std::string path = std::string([cachesPath UTF8String]); - strongSelf->_jscWrapper->configureJSContextForIOS(strongSelf.context.ctx, path); + strongSelf->_jscWrapper->configureJSContextForIOS(strongSelf.context.ctx, [cachesPath UTF8String]); } }]; diff --git a/React/Executors/RCTJSCWrapper.h b/React/Executors/RCTJSCWrapper.h index fc0ca29a3..612b45777 100644 --- a/React/Executors/RCTJSCWrapper.h +++ b/React/Executors/RCTJSCWrapper.h @@ -10,7 +10,6 @@ #import #import "RCTDefines.h" -#import typedef JSStringRef (*JSValueToStringCopyFuncType)(JSContextRef, JSValueRef, JSValueRef *); typedef JSStringRef (*JSStringCreateWithCFStringFuncType)(CFStringRef); @@ -29,7 +28,7 @@ typedef JSStringRef (*JSValueCreateJSONStringFuncType)(JSContextRef, JSValueRef, typedef bool (*JSValueIsUndefinedFuncType)(JSContextRef, JSValueRef); typedef bool (*JSValueIsNullFuncType)(JSContextRef, JSValueRef); typedef JSValueRef (*JSEvaluateScriptFuncType)(JSContextRef, JSStringRef, JSObjectRef, JSStringRef, int, JSValueRef *); -typedef void (*configureJSContextForIOSFuncType)(JSContextRef ctx, const std::string &cacheDir); +typedef void (*configureJSContextForIOSFuncType)(JSContextRef ctx, const char *cacheDir); typedef struct RCTJSCWrapper { JSValueToStringCopyFuncType JSValueToStringCopy;