You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 7, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: src/README.md
+21-3Lines changed: 21 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ a section that looks like so:
82
82
{ from:"**/*.png" },
83
83
```
84
84
85
-
Add a new line `{from:"**/*.sqlite"}` so that it will pick up your sqlite file while bundling the application.
85
+
Add a new line `{from:{ glob:"**/*.sqlite" } },` so that it will pick up your sqlite file while bundling the application.
86
86
87
87
In addition if you are not using the Commercial or Encrypted plugin; you would need to add:
88
88
@@ -135,7 +135,8 @@ If you are planning on shipping a database with the application; drop the file i
135
135
* options
136
136
* "readOnly", which if set to true will make the db read only when it opens it
137
137
* "key", used for using/opening encrypted databases (See Encryption at bottom of document)
138
-
* "multithreading", enable background multitasking. All SQL is ran on a background worker thread.
138
+
* "multithreading", enable background multitasking. All SQL is ran on a background worker thread.
139
+
* "migrate", migrates a Encrypted Sql database from v3 to the new v4. If you are a new user you do not need to set this flag as new created databases will already be in v4. If you are upgrading a app that used v1.3.0 or earlier of NS-Sqlite-Encrypted; then you will probably want to set this flag to true.
139
140
* (optional) callback (error, db): db is the fully OPEN database object that allows interacting with the db.
Pass the encryption key into database open function using the `options.key` and it will be applied. Please note the database itself MUST be created with encryption to use encryption. So if you create a plain database, you can not retroactively add encryption to it.
362
363
If you pass a blank (**""**) empty key, then it will treat it as no key. But, it will still use the encrypted driver in case you need certain features from the more modern sqlite driver; but don't need encryption.
363
364
364
-
Note: Enabling/Compiling in the encryption driver adds about 3 megs to the size to the application APK on android and about 2 megs to a iOS application.
365
+
Note: Enabling/Compiling in the encryption driver adds about 3 megs to the size to the application APK on android and about 2 megs to a iOS application.
366
+
367
+
#### Encryption Upgrade
368
+
There is a NEW upgrade option you can pass to the database constructor. if you were using an older version (1.3.0 or earlier) of this NS-Sqlite-Encryption.
369
+
* "migrate", migrates a Encrypted Sql database from v3 to the new v4. If you are a new user you do not need to set this flag as new created databases will already be in v4. If you are upgrading a app that used v1.3.0 or earlier of NS-Sqlite-Encrypted; then you will probably want to set this flag to true.
370
+
371
+
#### iOS Encryption Notes
372
+
373
+
If you see `SQLCipher does not seem to be linked into the application`
374
+
375
+
Sometimes iOS decides it really wants to bring in the native SQLite over the encrypted version.
376
+
A couple things you can try:
377
+
- Delete some files that aren't needed when using encryption that might bring in the standard sqlite plugin.
The commercial version supports putting all SQL access into a background thread, so your UI doesn't freeze while doing data access. To enable; just pass in {multithreading: true} as an option when creating a new Sqlite connection.
0 commit comments