Excluding an Interaction

Exclude a specific View Controller from being recognized as an Interaction by using the excludeAutomaticInteraction method.

In your viewDidLoad or any other view lifecycle methods, which come before the viewDidAppear method, simply call the above method as shown below:

Swift
Objective-C
override func viewDidLoad() { super.viewDidLoad() do { try MedalliaMXO.exclude(automaticInteraction: MXOAutomaticInteractionExclusion { builder in builder.viewController = self }) } catch { print("Error excluding an interaction: \(error.localizedDescription)") } }
- (void)viewDidLoad {    
	[super viewDidLoad];
	NSError *error;
    	__weak typeof(self) weakSelf = self;
    	[MedalliaMXO excludeAutomaticInteraction:[MXOAutomaticInteractionExclusion initWithBuilder:^(MXOAutomaticInteractionExclusionBuilder * _Nonnull builder) {
        	builder.viewController = weakSelf;
    	}] error:&error];
    
    	if (error) {
        	NSLog(@"Error excluding an interaction: %@", [error debugDescription]);
    	}
}