appVersion

The appVersion property overrides the version string the SDK would otherwise build from Info.plist: CFBundleShortVersionString and CFBundleVersion formatted as <short> (<build>) (for example 1.4.2 (212)).

That string becomes the App version visit custom variable (index 3) when includeDefaultCustomVariable is enabled. Set the property to nil to drop the override and use the bundle-derived value again.

Syntax

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

Parameters

  • appVersion string, optional. Custom version text for the App version visit custom variable (when defaults are on). Pass nil to use <CFBundleShortVersionString> (<CFBundleVersion>) from Info.plist.

Examples

To set a custom app version that includes a build identifier:

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

Notes

Related methods