setApplicationVersion (iOS SDK API)

Syntax

setApplicationVersion:(NSString *_Nonnull)versionString;
NewRelic.setApplicationVersion:(NSString*)versionString;

Sets the version of the application reported to New Relic.

Requirements

Compatible with all agent versions.

Description

By default, New Relic uses the CFBundleShortVersionString when reporting the build number. But you can override the reported build number by calling this method (before calling startWithApplicationToken):

Parameters

Parameter

Description

$versionString

string

Required. The string to display as this application's version.

Examples

Objective-C

Example:

[NewRelic setApplicationVersion:@"1.2.3"];

Swift

Example:

NewRelic.setApplicationVersion("1.2.3")