Skip to content

Commit a6ae204

Browse files
author
Oscar Franco
committed
Fix android cpp-adapter
1 parent 33ad8c2 commit a6ae204

5 files changed

Lines changed: 55 additions & 7 deletions

File tree

android/cpp-adapter.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <fbjni/fbjni.h>
33
#include <jsi/jsi.h>
44
#include <ReactCommon/CallInvokerHolder.h>
5-
#include "react-native-quick-sqlite.h"
5+
#include "installer.h"
66
#include "logs.h"
77
#include <typeinfo>
88

@@ -26,7 +26,7 @@ struct QuickSQLiteBridge : jni::JavaClass<QuickSQLiteBridge>
2626
auto jsCallInvoker = jsCallInvokerHolder->cthis()->getCallInvoker();
2727
std::string docPathString = docPath->toStdString();
2828

29-
installSequel(*jsiRuntime, jsCallInvoker, docPathString.c_str());
29+
install(*jsiRuntime, jsCallInvoker, docPathString.c_str());
3030
}
3131
};
3232

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ import com.android.build.OutputFile
7676
*/
7777

7878
project.ext.react = [
79-
enableHermes: true, // clean and rebuild if changing
79+
enableHermes: false, // clean and rebuild if changing
8080
entryFile: "index.tsx",
8181
]
8282

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target 'SequelExample' do
88

99
use_react_native!(
1010
:path => config[:reactNativePath],
11-
:hermes_enabled => false
11+
:hermes_enabled => true
1212
)
1313

1414
pod 'react-native-quick-sqlite', :path => '../..'

example/ios/Podfile.lock

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ PODS:
1111
- ReactCommon/turbomodule/core (= 0.67.3)
1212
- fmt (6.2.1)
1313
- glog (0.3.5)
14+
- hermes-engine (0.9.0)
15+
- libevent (2.1.12)
1416
- RCT-Folly (2021.06.28.00-v2):
1517
- boost
1618
- DoubleConversion
@@ -22,6 +24,12 @@ PODS:
2224
- DoubleConversion
2325
- fmt (~> 6.2.1)
2426
- glog
27+
- RCT-Folly/Futures (2021.06.28.00-v2):
28+
- boost
29+
- DoubleConversion
30+
- fmt (~> 6.2.1)
31+
- glog
32+
- libevent
2533
- RCTRequired (0.67.3)
2634
- RCTTypeSafety (0.67.3):
2735
- FBLazyVector (= 0.67.3)
@@ -188,6 +196,17 @@ PODS:
188196
- React-logger (= 0.67.3)
189197
- React-perflogger (= 0.67.3)
190198
- React-runtimeexecutor (= 0.67.3)
199+
- React-hermes (0.67.3):
200+
- DoubleConversion
201+
- glog
202+
- hermes-engine
203+
- RCT-Folly (= 2021.06.28.00-v2)
204+
- RCT-Folly/Futures (= 2021.06.28.00-v2)
205+
- React-cxxreact (= 0.67.3)
206+
- React-jsi (= 0.67.3)
207+
- React-jsiexecutor (= 0.67.3)
208+
- React-jsinspector (= 0.67.3)
209+
- React-perflogger (= 0.67.3)
191210
- React-jsi (0.67.3):
192211
- boost (= 1.76.0)
193212
- DoubleConversion
@@ -286,6 +305,8 @@ DEPENDENCIES:
286305
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
287306
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
288307
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
308+
- hermes-engine (~> 0.9.0)
309+
- libevent (~> 2.1.12)
289310
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
290311
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
291312
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
@@ -296,6 +317,7 @@ DEPENDENCIES:
296317
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
297318
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
298319
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
320+
- React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
299321
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
300322
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
301323
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
@@ -318,6 +340,8 @@ DEPENDENCIES:
318340
SPEC REPOS:
319341
trunk:
320342
- fmt
343+
- hermes-engine
344+
- libevent
321345

322346
EXTERNAL SOURCES:
323347
boost:
@@ -346,6 +370,8 @@ EXTERNAL SOURCES:
346370
:path: "../node_modules/react-native/React/CoreModules"
347371
React-cxxreact:
348372
:path: "../node_modules/react-native/ReactCommon/cxxreact"
373+
React-hermes:
374+
:path: "../node_modules/react-native/ReactCommon/hermes"
349375
React-jsi:
350376
:path: "../node_modules/react-native/ReactCommon/jsi"
351377
React-jsiexecutor:
@@ -390,6 +416,8 @@ SPEC CHECKSUMS:
390416
FBReactNativeSpec: 94473205b8741b61402e8c51716dea34aa3f5b2f
391417
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
392418
glog: 85ecdd10ee8d8ec362ef519a6a45ff9aa27b2e85
419+
hermes-engine: bf7577d12ac6ccf53ab8b5af3c6ccf0dd8458c5c
420+
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
393421
RCT-Folly: 803a9cfd78114b2ec0f140cfa6fa2a6bafb2d685
394422
RCTRequired: 3c77b683474faf23920fbefc71c4e13af21470c0
395423
RCTTypeSafety: 720b1841260dac692444c2822b27403178da8b28
@@ -398,6 +426,7 @@ SPEC CHECKSUMS:
398426
React-Core: 306cfdc1393bcf9481cc5de9807608db7661817b
399427
React-CoreModules: 2576a88d630899f3fcdf2cb79fcc0454d7b2a8bb
400428
React-cxxreact: a492f0de07d875419dcb9f463c63c22fe51c433b
429+
React-hermes: 4321bcd6fce09f8c6d1be355da31e1cdae7bfac6
401430
React-jsi: bca092b0c38d5e3fd60bb491d4994ab4a8ac2ad3
402431
React-jsiexecutor: 15ea57ead631a11fad57634ff69f78e797113a39
403432
React-jsinspector: 1e1e03345cf6d47779e2061d679d0a87d9ae73d8
@@ -417,6 +446,6 @@ SPEC CHECKSUMS:
417446
ReactCommon: 650e33cde4fb7d36781cd3143f5276da0abb2f96
418447
Yoga: 90dcd029e45d8a7c1ff059e8b3c6612ff409061a
419448

420-
PODFILE CHECKSUM: 8e46f9681f82354d9c073d5479b59194bb998732
449+
PODFILE CHECKSUM: 23fbb34cc9cd3db2810e5bb10e37bce3ce025dee
421450

422451
COCOAPODS: 1.11.2

example/ios/SequelExample.xcodeproj/project.pbxproj

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
13B07F8E1A680F5B00A75B9A /* Resources */,
119119
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
120120
C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */,
121+
A93F141C4CF7AFEFE24310BB /* [CP] Embed Pods Frameworks */,
121122
);
122123
buildRules = (
123124
);
@@ -209,6 +210,24 @@
209210
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
210211
showEnvVarsInLog = 0;
211212
};
213+
A93F141C4CF7AFEFE24310BB /* [CP] Embed Pods Frameworks */ = {
214+
isa = PBXShellScriptBuildPhase;
215+
buildActionMask = 2147483647;
216+
files = (
217+
);
218+
inputPaths = (
219+
"${PODS_ROOT}/Target Support Files/Pods-SequelExample/Pods-SequelExample-frameworks.sh",
220+
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework/hermes",
221+
);
222+
name = "[CP] Embed Pods Frameworks";
223+
outputPaths = (
224+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
225+
);
226+
runOnlyForDeploymentPostprocessing = 0;
227+
shellPath = /bin/sh;
228+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SequelExample/Pods-SequelExample-frameworks.sh\"\n";
229+
showEnvVarsInLog = 0;
230+
};
212231
C1D60D28B925C94BD88E79D7 /* [CP] Copy Pods Resources */ = {
213232
isa = PBXShellScriptBuildPhase;
214233
buildActionMask = 2147483647;
@@ -341,7 +360,7 @@
341360
COPY_PHASE_STRIP = NO;
342361
ENABLE_STRICT_OBJC_MSGSEND = YES;
343362
ENABLE_TESTABILITY = YES;
344-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
363+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
345364
GCC_C_LANGUAGE_STANDARD = gnu99;
346365
GCC_DYNAMIC_NO_PIC = NO;
347366
GCC_NO_COMMON_BLOCKS = YES;
@@ -402,7 +421,7 @@
402421
COPY_PHASE_STRIP = YES;
403422
ENABLE_NS_ASSERTIONS = NO;
404423
ENABLE_STRICT_OBJC_MSGSEND = YES;
405-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
424+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
406425
GCC_C_LANGUAGE_STANDARD = gnu99;
407426
GCC_NO_COMMON_BLOCKS = YES;
408427
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

0 commit comments

Comments
 (0)