customNewRelicInteractionName(iOS SDK API)

Syntax

- (NSString*) customNewRelicInteractionName;

Sets the name to rename default interaction names reported to New Relic.

Requirements

Compatible with all agent versions.

Description

If you implement this method in your UIViewController, New Relic will call this method before starting an interaction (from -viewDidLoad or -viewDidAppear) and rename the interaction with the string returned (instead of the default name of display <ViewControllerName>).

For context on how to use this API, see the documentation about renaming default interactions:

Examples

Objective-C

Example:

- (NSString*) customNewRelicInteractionName {
return @"CustomInteractionNameViewController";
}

Swift

Example:

@objc func customNewRelicInteractionName() -> String {
return "CustomInteractionNameViewController"
}