在 Ionic 5 中找不到 capacitor-community/sqlite 的 GlobalSQLite 文件
Unable to find GlobalSQLite file for capacitor-community/sqlite in Ionic 5
在我的 Ionic 5 应用程序中,我今天使用 capacitor-community/sqlite plugin. I am successfully able to create and use an encrypted db with this plugin. To use encryption a secret
is required and the following is maintained in the official documentation。
Defining your own secret and newsecret keys (encryption only)
- in IOS, go to the Pod/Development Pods/capacitor-sqlite/GlobalSQLite.swift file
- in Android, go to capacitor-sqlite/java/com.jeep.plugin.capacitor/cdssUtils/GlobalSQLite.java
and update the default values before building your app.
- in Electron, go to YOUR_APP/electron/plugins/plugin.js-xxxx.js and search for class GlobalSQLite and modify the this.secretand
this.newsecret parameters.
我分别在 IOS 和 android 中搜索了文件 GlobalSQLite.swift 和 GlobalSQLite.java,但没有这样的文件。此外,文件路径不可用。我不确定如何获取这些文件以在应用程序中设置我的秘密。请帮忙。
您应该在 node_modules\@capacitor-community\sqlite\android\src\main\java\com\getcapacitor\community\database\sqlite\SQLite
中寻找 GlobalSQLite.java
。更改机密后,您可能需要将平台与 ionic cap sync
.
同步
您还可以在那里找到 iOS 和 Electron 文件
在我的 Ionic 5 应用程序中,我今天使用 capacitor-community/sqlite plugin. I am successfully able to create and use an encrypted db with this plugin. To use encryption a secret
is required and the following is maintained in the official documentation。
Defining your own secret and newsecret keys (encryption only)
- in IOS, go to the Pod/Development Pods/capacitor-sqlite/GlobalSQLite.swift file
- in Android, go to capacitor-sqlite/java/com.jeep.plugin.capacitor/cdssUtils/GlobalSQLite.java and update the default values before building your app.
- in Electron, go to YOUR_APP/electron/plugins/plugin.js-xxxx.js and search for class GlobalSQLite and modify the this.secretand
this.newsecret parameters.
我分别在 IOS 和 android 中搜索了文件 GlobalSQLite.swift 和 GlobalSQLite.java,但没有这样的文件。此外,文件路径不可用。我不确定如何获取这些文件以在应用程序中设置我的秘密。请帮忙。
您应该在 node_modules\@capacitor-community\sqlite\android\src\main\java\com\getcapacitor\community\database\sqlite\SQLite
中寻找 GlobalSQLite.java
。更改机密后,您可能需要将平台与 ionic cap sync
.
您还可以在那里找到 iOS 和 Electron 文件