Contents

init(identifier:request:essential:fileSize:applicationGroupIdentifier:priority:)

Declaration

init(identifier: String, request: URLRequest, essential: Bool, fileSize: Int, applicationGroupIdentifier: String, priority: BADownload.Priority)

Parameters

  • identifier:

    A unique identifier that is used to track the download across the app and extension.

  • request:

    The request used to perform the download. The URL provided inside of the request must be a https scheme.

  • essential:

    Whether the download is essential. See @c BADownload.isEssential. Default is false.

  • fileSize:

    The size of the file to download. This field must be accurate in order to show the user accurate progress during app installation. If the size does not match the file being downloaded, then the download will fail.

  • applicationGroupIdentifier:

    The identifier of the application group that should used to store the finished download.

  • priority:

    A priority between @c BADownloaderPriorityMin - @c BADownloaderPriorityMax which is used to order the downloads for this process. It is recommended to use @c BADownloaderPriorityDefault if download priority does not matter.

Discussion

Constructs a download object to represent the download of a asset located inside of the provided @c request.

See Also

Creating a download