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.

  1. In SQLCipher’s documentation, find your SQLCipher edition of choice, and then download the corresponding package.
  2. Find SQLCipher.xcframework and openssl.xcframework in the package you downloaded, and then add them to your application target.
  3. 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.
  1. Call SmartStore.setLicenseKey("LICENSE_KEY_STRING") from the AppDelegate class when the app finishes launching.

To set up SQLCipher Commercial, Enterprise, or Enterprise FIPS, follow these steps.

  1. In SQLCipher’s documentation, find your SQLCipher edition of choice, and then download the corresponding package.
  2. Create a libs folder in the app directory.
  3. Find SQLCipher.aar from the package you downloaded, and add it to the libs folder.
  4. 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.
  1. Call SmartStore.setLicenseKey("LICENSE_KEY_STRING") from the Application subclass before initializing SalesforceSDKManager.

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.