appVersion

The appVersion property sets a custom application version for the SDK. If you don't set a value, the SDK generates the version string from Info.plist: CFBundleShortVersionString and CFBundleVersion formatted as <short> (<build>) (for example 1.4.2 (212)).

When includeDefaultCustomVariable is enabled, the SDK sends this value as the App version visit custom variable (index 3).

Set appVersion to nil to remove the override and use the bundle-derived value again.

Syntax

PiwikTracker.sharedInstance()?.appVersion = "appVersion"
[PiwikTracker sharedInstance].appVersion = @"appVersion";

Parameters

  • appVersion string, optional. Custom application version sent as the App version visit custom variable (when default custom variables are enabled). Set to nil to use <CFBundleShortVersionString> (<CFBundleVersion>) from Info.plist.

Examples

To set a custom app version with a build identifier:

PiwikTracker.sharedInstance()?.appVersion = "2.5.0-beta+build.123"
[PiwikTracker sharedInstance].appVersion = @"2.5.0-beta+build.123";

Notes

Related methods


Did this page help you?