FIRModelDownloadConditions


@interface FIRModelDownloadConditions : NSObject <NSCopying>

Configurations for model downloading conditions.

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

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isWiFiRequired;
  • Indicates whether the model can be downloaded while the app is in the background. The default is NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL canDownloadInBackground;
  • Creates an instance of ModelDownloadConditions with the given conditions.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithIsWiFiRequired:(BOOL)isWiFiRequired
                           canDownloadInBackground:(BOOL)canDownloadInBackground;

    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

    Objective-C

    - (nonnull instancetype)init;

    Return Value

    A new instance of ModelDownloadConditions.