• Log inStart now

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"
}
Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.