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). Passnilto use<CFBundleShortVersionString> (<CFBundleVersion>)fromInfo.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
applicationInstall(),applicationUpdate(), and deprecatedsendApplicationDownload()still build their stored keys and event labels fromCFBundleShortVersionStringandCFBundleVersioninInfo.plist, not from theappVersionproperty override.
Related methods
Updated 15 days ago