AppMetadata
public struct AppMetadata
Represents the metadata for the app.
-
The app icon. The default value uses the
AppIconasset from asset catalog in the app’s main bundle.Declaration
Swift
public let icon: NSImage -
The size of the icon. The default value is
80.Note
This applies to both the width and height dimensions.Declaration
Swift
public let iconSize: CGFloat -
The name of the app. The default is the value contained in the main bundle info.plist for the
CFBundleNamekey.Declaration
Swift
public let name: String -
The app version. The default is the value contained in the main bundle info.plist for the
CFBundleShortVersionStringkey.Declaration
Swift
public let versionText: String -
Alternate text for the app version. The default is the value contained in the main bundle info.plist for the
CFBundleShortVersionStringkey combined with the value for theCFBundleVersionkey.Declaration
Swift
public let altVersionText: String -
The app website url. The default is
nil.Declaration
Swift
public let url: URL? -
The link color for the url. The default is the app accent color (“AccentColor”) if present in your asset catalog, otherwise
.linkColor.Declaration
Swift
public let urlColor: NSColor -
The app copyright information. The default is the value contained in the main bundle info.plist for the
NSHumanReadableCopyrightkey.Declaration
Swift
public let copyrightText: String -
Creates a new
AppMetadatainstance with the specified values.Declaration
Swift
public init(icon: NSImage = NSImage.appIcon!, iconSize: CGFloat = 80, name: String = Bundle.main.appName!, versionText: String = Bundle.main.shortVersionString!, altVersionText: String = Bundle.main.fullVersionString!, url: URL? = nil, urlColor: NSColor = NSColor(named: "AccentColor") ?? .linkColor, copyrightText: String = Bundle.main.copyright!)Parameters
iconThe app icon.
iconSizeThe square dimension of the icon.
nameThe app name.
versionTextThe app version.
altVersionTextAlternate text for the version.
urlThe app website url.
urlColorThe link color for the url.
copyrightTextThe app copyright information.
View on GitHub
AppMetadata Structure Reference