In my Ionic 5 app, I am using the 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 as of today.
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.
I have searched for files GlobalSQLite.swift and GlobalSQLite.java in IOS and android respectively but there are no such files present. Also, the file paths are not available. I am not sure how to get these files to set my secret in the app. Please help.
Go to Source of this post
Author Of this post: Tapas Mukherjee
Title Of post: Unable to find GlobalSQLite file for capacitor-community/sqlite in Ionic 5
Author Link: {authorlink}
More Stories
What’s the difference between a singleton and a shared instance in Swift?
SKPaymentQueue transaction fails with ASDServerErrorDomain Code=5002 in sandbox
Simple Questions Megathread—April 19, 2021