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 [cp closeConnection]; to ensure that old connections with the wrong key are no longer being used.
[cp 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.

Related tasks
Setting Up the Connection Profile