appName

The appName property sets a custom application name for the SDK. If you don't set a value, the SDK uses CFBundleDisplayName, and falls back to CFBundleName.

The SDK uses this name as the host in generated tracking URLs, for example, http://YourAppName/... and as the name in application install and application update events.

Set appName to nil to remove the override and use the bundle values again.

Whitespace in the stored name is removed before use (for example My App becomes MyApp in those URLs and events).

Syntax

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

Parameters

  • appName string, optional. Custom application name. Set to nil to use CFBundleDisplayName, or CFBundleName if CFBundleDisplayName isn't set.

Examples

To set a custom app name for a build flavor:

PiwikTracker.sharedInstance()?.appName = "MyApp Beta"
[PiwikTracker sharedInstance].appName = @"MyApp Beta";

Related methods


Did this page help you?