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 tonilto use<CFBundleShortVersionString> (<CFBundleVersion>)fromInfo.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
applicationInstall(),applicationUpdate(), and the deprecatedsendApplicationDownload()useCFBundleShortVersionStringandCFBundleVersionfromInfo.plistwhen generating stored keys and even labels. They don't use theappVersionoverride.
Related methods
Updated 2 months ago
Did this page help you?