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.xcframeworkandopenssl.xcframeworkin 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 theAppDelegateclass 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
libsfolder in the app directory. - Find
SQLCipher.aarfrom the package you downloaded, and add it to thelibsfolder. - 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 theApplicationsubclass 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.