RSDDataArchive
public protocol RSDDataArchive : AnyObject, NSObjectProtocol
A data archive is a class object that can be used to add multiple files to a zipped archive for upload as a package. The data archive could also be a service that implements the logic for uploading results where the results are sent individually. It is the responsibility of the developer who implements this protocol for their services to ensure that the data is cached (if offline) and to re-attempt upload of the encrypted results.
-
A unique identifier for this archive.
Declaration
Swift
var identifier: String { get } -
Identifier for this task that can be mapped back to a notification. This may be the same as the task identifier, or it might be that a task is scheduled multiple times per day, and the app needs to track what the scheduled timing is for the task.
Declaration
Swift
var scheduleIdentifier: String? { get } -
Should the data archive include inserting data for the given reserved filename?
Declaration
Swift
func shouldInsertData(for filename: RSDReservedFilename) -> Bool -
Method for adding data to an archive.
Declaration
Swift
func insertDataIntoArchive(_ data: Data, manifest: RSDFileManifest) throwsParameters
dataThe data to insert.
manifestThe file manifest for this data.
-
Mark the archive as completed.
Declaration
Swift
func completeArchive(with metadata: RSDTaskMetadata) throwsParameters
metadataThe metadata for this archive.
-
Returns an archivable object for the given result.
Declaration
Swift
func archivableData(for result: RSDResult, sectionIdentifier: String?, stepPath: String?) -> RSDArchivable?Parameters
resultThe result to archive.
sectionIdentifierThe section identifier for the task.
stepPathThe full step path to the given result.
Return Value
An archivable object or
nilif the result should be skipped.
View on GitHub
RSDDataArchive Protocol Reference