• English日本語한국어
  • Log inStart now

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

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