RSDTaskGroupObject
public struct RSDTaskGroupObject : RSDTaskGroup, RSDEmbeddedIconVendor, Decodable
RSDTaskGroupObject is a concrete implementation of the RSDTaskGroup protocol.
-
A short string that uniquely identifies the task group.
Declaration
Swift
public let identifier: String -
The primary text to display for the task group in a localized string.
Declaration
Swift
public var title: String? -
Additional detail text to display for the task group in a localized string.
Declaration
Swift
public var detail: String? -
The optional
RSDImageWrapperwith the pointer to the image.Declaration
Swift
public var icon: RSDImageWrapper? -
A list of the task references included in this group.
Declaration
Swift
public var tasks: [RSDTaskInfoStep] -
Default initializer.
Declaration
Swift
public init(with identifier: String, tasks: [RSDTaskInfoStep])Parameters
identifierA short string that uniquely identifies the task group.
tasksA list of the task references included in this group.
-
Initialize from a
Decoder. This decoding method will use theRSDFactoryinstance associated with the decoder to decode thetasks.example:
let json = """ { "identifier": "foobar", "title": "Foobarific", "detail": "This is a task group containing foo and bar", "icon": "foobarIcon", "tasks" : [{ "identifier": "foo", "schemaRevision" : 2, "title": "Hello Foo!", "detail": "This is a test of foo.", "copyright": "This is a copyright string for foo.", "estimatedMinutes": 5, "icon": "fooIcon", "taskTransformer" : { "resourceName": "TaskFoo", "bundleIdentifier": "org.example.SharedResources" } }, { "identifier": "bar", "schemaRevision" : 4, "title": "Hello Bar!", "detail": "This is a test of bar.", "estimatedMinutes": 7, "icon": "barIcon" }] } """.data(using: .utf8)! // our data in native (JSON) formatThrows
DecodingErrorDeclaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to use to decode this instance.
View on GitHub
RSDTaskGroupObject Structure Reference