• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

問題を作成する

アプリケーションのバージョンを設定する

重要

ハイブリッド モバイル エージェント (React Native、.NET Maui など) を使用している場合は、以下のプラットフォーム固有の方法を参照してください。

構文

Java

NewRelic.withApplicationVersion(string $appVersion)

コトリン [#kotlin]

NewRelic.withApplicationVersion(appVersion: String?)

説明 [#description]

デフォルトでは、New Relic Android エージェントはAndroidManifest.xmlまたはbuild.gradleからアプリのバージョンを取得します。このメソッドを使用すると、その値をオーバーライドし、アプリのバージョンを渡すことでアプリのバージョンを設定できます。アプリのバージョンは New Relic UI のドロップダウンとして表示され、それを使用してインタラクションを並べ替えることができます。

パラメーター [#parameters]

パラメータ

タイプ

説明

$appVersion

string

必須。アプリケーションのバージョンを示す文字列

[#example]

Java [#java]

NewRelic.withApplicationToken("").withApplicationVersion("1.23.4").start(this.getApplication());

コトリン [#kotlin]

NewRelic.withApplicationToken("").withApplicationVersion("1.23.4").start(applicationContext)

構文

目的-c

setApplicationVersion:(NSString *_Nonnull)versionString;

迅速 [#swift]

NewRelic.setApplicationVersion:(NSString*)versionString;

説明 [#description]

デフォルトでは、New Relic はビルド番号を報告するときに CFBundleShortVersionString を使用します。ただし、( startWithApplicationTokenを呼び出す前に) このメソッドを呼び出すことで、報告されたビルド番号をオーバーライドできます。

パラメーター [#parameters]

パラメータ

タイプ

説明

versionString

NSString

必須。このアプリケーションのバージョンとして表示する文字列。

[#example]

Objective-C [#obj-c]

[NewRelic setApplicationVersion:@"1.2.3"];

迅速 [#swift]

NewRelic.setApplicationVersion("1.2.3")
Copyright © 2024 New Relic株式会社。

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