mirror of
https://github.com/status-im/react-native.git
synced 2025-03-03 02:40:31 +00:00
Change API for iOS
Reviewed By: michalgr Differential Revision: D3514778 fbshipit-source-id: 29dc12ad0a701fd08262be3aa81ae990d4fc63a9
This commit is contained in:
parent
e1497ce2b6
commit
85983d0ae4
@ -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]);
|
||||
}
|
||||
}];
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
#import <JavaScriptCore/JavaScriptCore.h>
|
||||
|
||||
#import "RCTDefines.h"
|
||||
#import <string>
|
||||
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user