@powersync/capacitor 0.1.0 → 0.1.1

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 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.
85
84
  - `PowerSyncDatabase.executeRaw` does not support results where multiple columns would have the same name in SQLite
86
85
  - `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
 
@@ -29,12 +29,6 @@ android {
29
29
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
30
30
  }
31
31
 
32
- externalNativeBuild {
33
- cmake {
34
- path "CMakeLists.txt"
35
- }
36
- }
37
-
38
32
  buildFeatures {
39
33
  prefab true
40
34
  }
@@ -0,0 +1,21 @@
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
@@ -1,9 +1,5 @@
1
1
  package com.powersync.capacitor;
2
2
 
3
3
  public class PowerSync {
4
- static {
5
- System.loadLibrary("powersync_capacitor");
6
- }
7
-
8
4
  public static native int registerPowersync();
9
5
  }
@@ -14,7 +14,8 @@ public class PowerSyncPlugin extends Plugin {
14
14
  @PluginMethod
15
15
  public void registerCore(PluginCall call) {
16
16
  JSObject ret = new JSObject();
17
- ret.put("responseCode", implementation.registerPowersync());
17
+ // For Android we don't statically register the library, so we always return 0
18
+ ret.put("responseCode", 0);
18
19
  call.resolve(ret);
19
20
  }
20
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/capacitor",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Adds PowerSync Capacitor support for iOS/Android",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
@@ -13,6 +13,7 @@
13
13
  "files": [
14
14
  "android/src/main/",
15
15
  "android/build.gradle",
16
+ "android/proguard-rules.pro",
16
17
  "dist/",
17
18
  "ios/Sources",
18
19
  "ios/Tests",
@@ -1,12 +0,0 @@
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
- }