Sensitive data hiding

Blacklisted & Whitelisted views

Pre API 2.0

Smartlook.registerBlacklisted(object: someView)
Smartlook.unregisterBlacklisted(object: someView)
Smartlook.registerWhitelisted(object: someView)
Smartlook.unregisterWhitelisted(object: someView)

someView.slSensitive = true|false

API 2.0

There are no longer lists of "blacklisted" and "whitelisted" Views. Sensitivity is explicitly set using a Boolean value.

Smartlook.instance.sensitivity[someView] = true|false|null

sampleView.slSensitive = true|false|null

The "mapping" of the older APIs to the 2.0 is as follows:

  • registering View as "blacklisted" is equivalent to setting the View sensitivity to true.
  • registering View as "whitelisted" is equivalent to setting the View sensitivity to false.
  • unregistering View from "blacklisted" is equivalent to setting the View sensitivity to null.

View sensitivity documentation.

Blacklisted classes

Pre API 2.0

Smartlook.registerBlacklisted(object: SomeViewClass.self)
Smartlook.unregisterBlacklisted(object: SomeViewClass.self)
Smartlook.registerWhitelisted(object: SomeViewClass.self)
Smartlook.unregisterWhitelisted(object: SomeViewClass.self)
// Register sensitive class(es)
Smartlook.registerBlacklistedClass(Class class);
Smartlook.registerBlacklistedClasses(List<Class> classes);

// Unregister sensitive class(es)
Smartlook.unregisterBlacklistedClass(Class class);
Smartlook.unregisterBlacklistedClasses(List<Class> classes);

API 2.0

There is no longer list of "blacklisted" classes. Sensitivity is explicitly set using a Boolean value.

Smartlook.instance.sensitivity[SomeViewClass.self] = true|false|null

The "mapping" of the older APIs to the 2.0 is as follows:

  • registering Class as "blacklisted" is equivalent to setting the Class sensitivity to true.
  • unregistering Class from "blacklisted" is equivalent to setting the Class sensitivity to null.

Class sensitivity documentation.

No rendering

Pre API 2.0

Smartlook.setRenderingMode(to: .noRendering)

API 2.0

Smartlook.instance.preferences.renderingMode = .noRendering

No rendering documentation.