SUPConnectionProfile

The SUPConnectionProfile class manages local database information. Set its properties, including the encryption key, during application initialization, and before creating or accessing the local client database.

By default, the database class name is generated as "packageName"+"DB".

SUPConnectionProfile* cp = [SUP101SUP101DB getConnectionProfile];
[cp setEncryptionKey:@"Your key of more than 16 characters"];
// Immediately after the call to setEncryptionKey, call [SUP101SUP101DB closeConnection]; to ensure that old connections with the wrong key are no longer being used.
[SUP101SUP101DB closeConnection];

You can also generate an encryption key by calling the generated database's generateEncryptionKey method, and then store the key inside a DataVault object. The generateEncryptionKey method automatically sets the encryption key in the connection profile.

You can use the cacheSize API to control the size of the memory cache used by the database. The default size is 10MB.

SUPConnectionProfile *cp = [SUP101SUP101DB getConnectionProfile];
[cp setCacheSize:5000000];  // set to 5000000 bytes (~ 5 MB)
[SUP101SUP101DB closeConnection];  // close and open the connection to use the new cache size
[SUP101SUP101DB openConnection];
Related tasks
Setting Up the Connection Profile