File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -386,14 +386,23 @@ describe('Iterable', () => {
386386 expect ( configDict . keychainEncryption ) . toBe ( false ) ;
387387 } ) ;
388388
389- it ( 'should keep keychainEncryption enabled when only deprecated encryptionEnforced is set' , ( ) => {
389+ it ( 'should still serialize encrypted keychain when only deprecated encryptionEnforced is set' , ( ) => {
390390 const config = new IterableConfig ( ) ;
391391 config . encryptionEnforced = true ;
392392 const configDict = config . toDict ( ) ;
393393 expect ( config . keychainEncryption ) . toBe ( true ) ;
394394 expect ( configDict . keychainEncryption ) . toBe ( true ) ;
395395 expect ( configDict . encryptionEnforced ) . toBe ( true ) ;
396396 } ) ;
397+
398+ it ( 'should prefer keychainEncryption over deprecated encryptionEnforced in toDict()' , ( ) => {
399+ const config = new IterableConfig ( ) ;
400+ config . keychainEncryption = false ;
401+ config . encryptionEnforced = true ;
402+ const configDict = config . toDict ( ) ;
403+ expect ( configDict . keychainEncryption ) . toBe ( false ) ;
404+ expect ( configDict . encryptionEnforced ) . toBe ( true ) ;
405+ } ) ;
397406 } ) ;
398407
399408 describe ( 'urlHandler' , ( ) => {
Original file line number Diff line number Diff line change @@ -331,11 +331,10 @@ export class IterableConfig {
331331 keychainEncryption = true ;
332332
333333 /**
334- * @deprecated Use {@link IterableConfig.keychainEncryption} instead. This field is still serialized for
335- * back-compat on Android when `keychainEncryption` is absent from the bridge payload.
336- *
337- * Android only feature: This controls whether the SDK should enforce encryption for all PII stored on disk.
338- * By default, the SDK will not enforce encryption and may fallback to unencrypted storage in case the encryption fails.
334+ * @deprecated Use {@link IterableConfig.keychainEncryption} instead. Android honors
335+ * `keychainEncryption` (default `true`, encrypted). This field is still serialized so
336+ * older bridge payloads that omit `keychainEncryption` can fall back when
337+ * `encryptionEnforced` is `true`; it does not disable encryption when left `false`.
339338 */
340339 encryptionEnforced = false ;
341340
You can’t perform that action at this time.
0 commit comments