UpdateNotification Documentation Beta

Structure Item

public struct Item: Codable, Identifiable, Comparable

An item describes a release in the update feed

Item Item Identifiable Identifiable Item->Identifiable Comparable Comparable Item->Comparable Codable Codable Item->Codable

Conforms To

Codable
Comparable
Identifiable

Initializers

init(version:​build:​date:​title:​text:​min​OSVersion:​info​Url:​download​Url:​)

public init(version: String, build: String? = nil, date: Date? = nil, title: String? = nil, text: String? = nil, minOSVersion: OperatingSystemVersion?, infoUrl: URL? = nil, downloadUrl: URL? = nil)

Initialize the Item struct

Parameters

version String

semantic version number

build String?

(optional) build identifier, relevant if there are multiple releases for the same version

date Date?

(optional) release date

title String?

(optional) update title

text String?

(optional) update text

min​OSVersion Operating​System​Version?

(optional) minimum reqired OS version

info​Url URL?

(optional) URL to the a location with more info about the update

download​Url URL?

(optional) URL to the download location

Properties

id

var id: String

Methods

<(lhs:​rhs:​)

public static func <(lhs: Item, rhs: Item) -> Bool

Compare two items based first on their version number and second on their build identifier