Using SQLCipher with SmartStore
Starting in Mobile SDK 13.0, SmartStore supports SQLCipher Commercial, Enterprise, and Enterprise FIPS.
To set up SQLCipher Commercial, Enterprise, or Enterprise FIPS, follow these steps.
- In SQLCipher’s documentation, find your SQLCipher edition of choice, and then download the corresponding package.
- Find
SQLCipher.xcframework
andopenssl.xcframework
in the package you downloaded, and then add them to your application target. - Pass the license key to SmartStore during application initialization, prior to any SmartStore operations. To specify the license key for your app, use this method from
SFSmartStore.h
.
- Call
SmartStore.setLicenseKey("LICENSE_KEY_STRING")
from theAppDelegate
class when the app finishes launching.
To set up SQLCipher Commercial, Enterprise, or Enterprise FIPS, follow these steps.
- In SQLCipher’s documentation, find your SQLCipher edition of choice, and then download the corresponding package.
- Create a
libs
folder in the app directory. - Find
SQLCipher.aar
from the package you downloaded, and add it to thelibs
folder. - Pass the license key to SmartStore during application initialization, before any SmartStore operations. To specify the license key for your app, use this method from
SmartStore.java
.
- Call
SmartStore.setLicenseKey("LICENSE_KEY_STRING")
from theApplication
subclass before initializingSalesforceSDKManager
.
To check the SQLCipher’s version, provider version, compile options, and FIPS status, use these methods.
Find these methods in SFSmartStore.h
.
Find these methods in SmartStore.java
.