|
24 | 24 | - The targeted version of .NET Framework has changed from 4.6.2 to 4.7.1. |
25 | 25 | - The default provider for .NET Framework has been changed back to using DLLImport (which worked well) instead of using dynamic loading (which caused more sadness than joy). |
26 | 26 |
|
| 27 | +## How to update to SQLitePCLRaw 3.0 |
| 28 | + |
| 29 | +### From SQLitePCLRaw.bundle_e_sqlite3 |
| 30 | + |
| 31 | +If you are using the .bundle_e_sqlite3 package, you don't need to do anything except update the version number: |
| 32 | + |
| 33 | +``` |
| 34 | + <PackageReference Include="sqlitepclraw.bundle_e_sqlite3" Version="3.0.1" /> |
| 35 | +``` |
| 36 | + |
| 37 | +But you may want to remove the .bundle_e_sqlite3 package reference and add these two instead: |
| 38 | + |
| 39 | +``` |
| 40 | + <PackageReference Include="sqlitepclraw.config.e_sqlite3" Version="3.0.1" /> |
| 41 | + <PackageReference Include="sourcegear.sqlite3" Version="3.50.3" /> |
| 42 | +``` |
| 43 | + |
| 44 | +Going forward, when you want to update to a new build of SQLite, you will only need to update the reference to the `SourceGear.sqlite3` package. |
| 45 | + |
| 46 | +### From SQLitePCLRaw.bundle_e_sqlcipher |
| 47 | + |
| 48 | +Beginning with the 3.0 release, I will no longer maintain and distribute encryption-enabled SQLite builds without cost. As far as I know, I was the only one providing a no-cost nuget package of SQLite with encryption. The `.bundle_e_sqlcipher` package is deprecated. |
| 49 | + |
| 50 | +My recommended solution for SQLite encryption is the SQLite Encryption Extension (SEE), which is the official implementation from the SQLite team: |
| 51 | + |
| 52 | +https://sqlite.org/com/see.html |
| 53 | + |
| 54 | +The SEE is not open source -- a paid license is required. Once you have obtained a SEE license, if you would like to get SEE builds in the form of a nuget package, you can subscribe to SourceGear's SQLite build service. |
| 55 | + |
| 56 | +If you would like to stay with SQLCipher, you can purchase supported builds from Zetetic, or you can build their open source code yourself. |
| 57 | + |
| 58 | +Another open source option is SQLite3 Multiple Ciphers (from @utelle). Nuget packages for SQLite3MC are available to customers of SourceGear's SQLite build service. |
| 59 | + |
| 60 | +### From SQLitePCLRaw.bundle_green |
| 61 | + |
| 62 | +The `.bundle_green` package is identical to `.bundle_e_sqlite3` except on iOS, where the package references the SQLite library provided by the operating system. I recommend changing from `_bundle_green` to the pairing of `.bundle.config.sqlite3` and `SourceGear.sqlite3` described above. |
| 63 | + |
| 64 | +If you prefer to continue using the system SQLite on iOS while using `e_sqlite3` builds on all other platforms, you would need to setup specific package references for the different providers and native libraries for each platform. |
| 65 | + |
| 66 | +If you only use iOS and want to use the system SQLite, you can just do this: |
| 67 | + |
| 68 | +``` |
| 69 | + <PackageReference Include="sqlitepclraw.core" Version="3.0.1" /> |
| 70 | + <PackageReference Include="sqlitepclraw.provider.sqlite3" Version="3.0.1" /> |
| 71 | +``` |
| 72 | + |
| 73 | +and make this call to initialize things: |
| 74 | + |
| 75 | +``` |
| 76 | + SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3()); |
| 77 | +``` |
| 78 | + |
| 79 | + |
0 commit comments