When using native rendering mode, SDK can record sensitive data in your application.
In order to protect user privacy, Smartlook can be configured so that the sensitive data is not recorded.
Smartlook attempts to hide selected sensitive UI element automatically. It can be also instructed to hide or show particular UI components. Alternatively, using one of the wireframe rendering modes records screen in a schematic way, showing no user data. The last possibility is to stop screen capturing altogether by using no rendering mode.
Sensitive elements are hidden locally on the device. No sensitive data are transferred over the network and stored in the dashboard.
Blacklisted views
Any view can be hidden in the recording by marking it as a blacklisted view. A specific view can be marked as blacklisted by calling:
class func registerBlacklisted(object: Any)
+ (void)registerBlacklistedObject:(nonnull id)object;
Smartlook.registerBlacklisted(object: someView)
[Smartlook registerBlacklistedObject:self.someView];
Or can be tagged directly by an UIView
property added by Smartlook:
var slSensitive: Bool
@property (nonatomic, assign) IBInspectable BOOL slSensitive;
someView.slSensitive = true
self.someView.slSensitive = YES;
Note also, that there is a small workaround that makes
slSensitive
property ofUIView
inspectable in Xcode Interface Builder, i.e., it is not necessary creating an@IBOutlet
for a view that is designed in the Interface Builder just in order to set its sensitivity. See our How to make Smartlook properties inspectable cookbook.
If a specific view no longer needs to be blacklisted:
class func unregisterBlacklisted(object: Any)
+ (void)unregisterBlacklistedObject:(nonnull id)object;
A blacklisted view is hidden on recording by a single color rectangle. The color of this rectangle can be configured by calling:
class func setBlacklistedItem(color: UIColor)
+ (void)setBlacklistedItemsColor:(nonnull UIColor *)color;
This is applied for all blacklisted objects.
Blacklisted classes
Sometimes it can be beneficial to blacklist all instances of a UIView
subclass or all UIView
subclasses that conform some protocol:
// Note: the object can be UIView instance, UIView subclass or a Protocol,
// see examples below
class func registerBlacklisted(object: Any)
// Note: the object can be UIView instance, UIView subclass or a Protocol,
// see examples below
+ (void)registerBlacklistedObject:(nonnull id)object;
// Note: the object can be UIView instance, UIView subclass or a Protocol
someView.slSensitive = true
Smartlook.registerBlacklisted(object: someView)
Smartlook.registerBlacklisted(object: SensitiveDataViewClass.self)
Smartlook.registerBlacklisted(object: SensitiveProtocol.self)
// Note: the object can be UIView instance, UIView subclass or a Protocol
self.someView.slSensitive = true
[Smartlook registerBlacklistedObject:self.someView];
[Smartlook registerBlacklistedObject:SensitiveDataViewClass.class];
[Smartlook registerBlacklistedObject:@protocol(SensitiveProtocol)];
Any of the blacklisted objects can be removed:
class func unregisterBlacklisted(object: Any)
+ (void)unregisterBlacklistedObject:(nonnull id)object;
Note that for convenience, some classes are blacklisted by default:
UITextView
,UITextField
andWKWebView
.
Whitelisted views
A specific view can be whitelisted so it is recorded even if it is an instance of a blacklisted class:
class func registerWhitelisted(object: Any)
+ (void)registerWhitelistedObject:(nonnull id)object;
Or it can be tagged directly by an UIView
property added by Smartlook:
someView.slSensitive = false
self.someView.slSensitive = NO;
Note also, that there is a small workaround that makes
slSensitive
property ofUIView
inspectable in Xcode Interface Builder, i.e., it is not necessary creating an@IBOutlet
for a view that is designed in the Interface Builder just in order to set its sensitivity. See our How to make Smartlook properties inspectable cookbook.
A specific view can be removed from a whitelist by calling:
class func unregisterWhitelisted(object: Any)
+ (void)unregisterWhitelistedObject:(nonnull id)object;
No Rendering
Sometimes the whole screen consists of sensitive data. In these cases it is beneficial to not record any screen data. This can be done by switching to no rendering
rendering mode:
Smartlook.setRenderingMode(to: .noRendering)
[Smartlook setRenderingModeTo:SLRenderingModeNoRendering];
SDK provides rendering modes that hide sensitive information by simplifying the rendered screen for recording. This can be advantageous because all user interaction is still being recorded, but all sensitive data are not rendered by design. Read more about rendering modes in conceptual documentation.
Some screens can leak sensitive data even through automatically detected touch events. More about this issue in secure custom keyboard example.
When an application is no longer displaying sensitive data, the screen rendering mode can be set back to the preferred variant:
Smartlook.setRenderingMode(to: .native)
[Smartlook setRenderingModeTo:SLRenderingModeNative];
WebView blacklisting/whitelisting
When an application has some parts displayed using WKWebView
and these parts should be recorded, then the WKWebView
recording needs to be enabled by removing WKWebView
from the list of blacklisted classes:
UIWebView
class is obsolete and no longer supported by Apple. Thus, its instances and their content are not specifically handled by Smartlook from the sensitivity point of view.
Smartlook.unregisterBlacklisted(object: WKWebView.class)
[Smartlook unregisterBlacklistedObject:WKWebView.class];
If WebView
is being recorded, all sensitive elements on the displayed web page should be marked as sensitive so that they are hidden. This can be done by marking sensitive HTML elements with .smartlook-hide
css class:
<div class='smartlook-hide'>
This will be hidden.
</div>
All inputs are hidden by default except for button
and submit
types. If some hidden inputs should be recorded they can be marked with .smartlook-show
css class:
<input type="text" class='smartlook-show'>