Skip to content

Commit 0e4cd27

Browse files
committed
Improve docs
1 parent 5805904 commit 0e4cd27

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/docs/cpp_usage.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ sidebar_position: 10
44

55
# C++ Usage
66

7-
In certain scenarios, you may prefer direct access to SQLite C++ code, allowing efficient database operations directly from C++ in a React Native environment, independent of JavaScript.
7+
It's possible to access the native C++ functions in case you want to directly call the underlaying API without React-Native/JavaScript. This is useful in case you have native code and need to access sqlite functionality.
88

9-
## Android CMake Integration
9+
## Android
1010

11-
The package supports prefab publishing for Android, which allows you to access it from within your CMakeLists.txt file.
11+
The package supports prefab publishing for Android, which allows you to access it from within your `CMakeLists.txt` file.
1212

1313
Add the following to your `CMakeLists.txt`:
1414

@@ -24,12 +24,10 @@ target_link_libraries(
2424
)
2525
```
2626

27-
## Header File Inclusion
27+
## Add header to your native code
2828

2929
Due to platform differences, you need to include the SQLite header differently for Android and iOS:
3030

31-
### Example on how to include the headers in C++
32-
3331
```cpp
3432
#ifdef __ANDROID__
3533
#include <op-engineering_op-sqlite/sqlite3.h>
@@ -39,3 +37,5 @@ Due to platform differences, you need to include the SQLite header differently f
3937
#include <op-sqlite/bridge.h>
4038
#endif
4139
```
40+
41+
If you are wondering how to use C++ code, on Android it's achieved via JNI/NDK code, on iOS you can use any Objective-C++ (`.mm`) file and import it directly. Swift integration might not work and will require setting the min swift version to `5.9`, it's not covered in this guide.

0 commit comments

Comments
 (0)