@powersync/capacitor 0.0.0-dev-20251106073753 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/android/build.gradle +6 -0
- package/android/src/main/cpp/powersync_capacitor_jni.c +12 -0
- package/android/src/main/java/com/powersync/capacitor/PowerSync.java +4 -0
- package/android/src/main/java/com/powersync/capacitor/PowerSyncPlugin.java +1 -2
- package/package.json +1 -2
- package/android/proguard-rules.pro +0 -21
package/README.md
CHANGED
|
@@ -81,9 +81,9 @@ const db = new PowerSyncDatabase({
|
|
|
81
81
|
## Limitations
|
|
82
82
|
|
|
83
83
|
- Encryption for native mobile platforms is not yet supported.
|
|
84
|
+
- Multiple tab support is not available for native Android and iOS targets.
|
|
84
85
|
- `PowerSyncDatabase.executeRaw` does not support results where multiple columns would have the same name in SQLite
|
|
85
86
|
- `PowerSyncDatabase.execute` has limited support on Android. The SQLCipher Android driver exposes queries and executions as separate APIs, so there is no single method that handles both. While `PowerSyncDatabase.execute` accepts both, on Android we treat a statement as a query only when the SQL starts with `select` (case-insensitive).
|
|
86
|
-
- Multiple tab support is not available for native Android and iOS targets. If you're not opening a second webview in your native app using something like `@jackobo/capacitor-webview`, you are unaffected by this.
|
|
87
87
|
|
|
88
88
|
## Examples
|
|
89
89
|
|
package/android/build.gradle
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#include <jni.h>
|
|
2
|
+
|
|
3
|
+
// SQLCipher enables dynamic loading of extensions. We don't need to do anything here.
|
|
4
|
+
int register_powersync(void) {
|
|
5
|
+
return 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// JNI wrapper
|
|
9
|
+
JNIEXPORT jint JNICALL
|
|
10
|
+
Java_com_powersync_capacitor_PowerSync_registerPowersync(JNIEnv *env, jobject thiz) {
|
|
11
|
+
return register_powersync();
|
|
12
|
+
}
|
|
@@ -14,8 +14,7 @@ public class PowerSyncPlugin extends Plugin {
|
|
|
14
14
|
@PluginMethod
|
|
15
15
|
public void registerCore(PluginCall call) {
|
|
16
16
|
JSObject ret = new JSObject();
|
|
17
|
-
|
|
18
|
-
ret.put("responseCode", 0);
|
|
17
|
+
ret.put("responseCode", implementation.registerPowersync());
|
|
19
18
|
call.resolve(ret);
|
|
20
19
|
}
|
|
21
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/capacitor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Adds PowerSync Capacitor support for iOS/Android",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"android/src/main/",
|
|
15
15
|
"android/build.gradle",
|
|
16
|
-
"android/proguard-rules.pro",
|
|
17
16
|
"dist/",
|
|
18
17
|
"ios/Sources",
|
|
19
18
|
"ios/Tests",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Add project specific ProGuard rules here.
|
|
2
|
-
# You can control the set of applied configuration files using the
|
|
3
|
-
# proguardFiles setting in build.gradle.
|
|
4
|
-
#
|
|
5
|
-
# For more details, see
|
|
6
|
-
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
7
|
-
|
|
8
|
-
# If your project uses WebView with JS, uncomment the following
|
|
9
|
-
# and specify the fully qualified class name to the JavaScript interface
|
|
10
|
-
# class:
|
|
11
|
-
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
12
|
-
# public *;
|
|
13
|
-
#}
|
|
14
|
-
|
|
15
|
-
# Uncomment this to preserve the line number information for
|
|
16
|
-
# debugging stack traces.
|
|
17
|
-
#-keepattributes SourceFile,LineNumberTable
|
|
18
|
-
|
|
19
|
-
# If you keep the line number information, uncomment this to
|
|
20
|
-
# hide the original source file name.
|
|
21
|
-
#-renamesourcefileattribute SourceFile
|