ModelDownloadConditions

class ModelDownloadConditions : NSObject, NSCopying

Configurations for model downloading conditions.

  • Indicates whether Wi-Fi is required for downloading. The default is NO.

    Declaration

    Swift

    var isWiFiRequired: Bool { get }
  • Indicates whether the model can be downloaded while the app is in the background. The default is NO.

    Declaration

    Swift

    var canDownloadInBackground: Bool { get }
  • Creates an instance of ModelDownloadConditions with the given conditions.

    Declaration

    Swift

    init(isWiFiRequired: Bool, canDownloadInBackground: Bool)

    Parameters

    isWiFiRequired

    Whether a device has to be connected to Wi-Fi for downloading to start.

    canDownloadInBackground

    Whether the model can be downloaded while the app is in the background.

    Return Value

    A new instance of ModelDownloadConditions.

  • Creates an instance of ModelDownloadConditions with the default conditions. The default values are listed in the documentation for each download condition property.

    Declaration

    Swift

    convenience init()

    Return Value

    A new instance of ModelDownloadConditions.