Starting in Mobile SDK 13.0, SmartStore supports SQLCipher Commercial, Enterprise, and Enterprise FIPS.
Set Up Your SQLCipher Edition on iOS
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 and openssl.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.
1// @param licenseKey - The license key string provided by Zetetic.2+ (void)setLicenseKey:(NSString*)licenseKey;
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.
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 the libs 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.
1// @param licenseKey - The license key string provided by Zetetic.2+ public static void setLicenseKey(String licenseKey)
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.
iOS
Find these methods in SFSmartStore.h.
1/**2* Return SQLCipher compile options3* @return An array with all the compile options used to build SQL Cipher.4*/5- (NSArray *)getCompileOptions NS_SWIFT_NAME(compileOptions());67/**8* Return SQLCipher version9* @return The version of SQL Cipher in use.10*/11- (NSString *)getSQLCipherVersion NS_SWIFT_NAME(versionOfSQLCipher());1213/**14* Return SQLCipher provider version15* @return cipher provider version16*/17- (NSString *)getCipherProviderVersion NS_SWIFT_NAME(cipherProviderVersion());1819/**20* Return SQLCipher FIPS status21* @return true if using a FIPS enabled SQLCipher edition22*/23- (BOOL)getCipherFIPSStatus NS_SWIFT_NAME(cipherFIPSStatus());
Android
Find these methods in SmartStore.java.
1/**2* Get SQLCipher version3*4* @return SQLCipher version5*/6public String getSQLCipherVersion()78/**9* Get SQLCipher provider version10*11* @return SQLCipher provider version12*/13public String getCipherProviderVersion()1415/**16* Get SQLCipher FIPS status17*18* @return true if using a FIPS enabled SQLCipher edition19*/20public boolean getCipherFIPSStatus()2122+ public static void setLicenseKey(String licenseKey)
We've Moved
Welcome to the new home of the Mobile SDK Developer Guide! For now, the Japanese guide can be found in PDF form.