MLKitCommon フレームワーク リファレンス
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
MLKModelDownloadConditions
@interface MLKModelDownloadConditions : NSObject <NSCopying>
モデルのダウンロード条件の構成。
-
モバイル ネットワーク経由でダウンロード リクエストを行うかどうかを示します。デフォルト値は YES
です。
宣言
Objective-C
@property (nonatomic, readonly) BOOL allowsCellularAccess;
-
アプリがバックグラウンドで実行されているときにモデルをダウンロードできるかどうかを示します。デフォルトは NO
です。
宣言
Objective-C
@property (nonatomic, readonly) BOOL allowsBackgroundDownloading;
-
宣言
Objective-C
- (nonnull instancetype)initWithAllowsCellularAccess:(BOOL)allowsCellularAccess
allowsBackgroundDownloading:
(BOOL)allowsBackgroundDownloading;
パラメータ
allowsCellularAccess
|
ダウンロード リクエストをモバイル ネットワーク経由で行うかどうか。
|
allowsBackgroundDownloading
|
アプリが実行中のときにモデルをダウンロードできるかどうか。
説明します。
|
戻り値
新しい ModelDownloadConditions
インスタンス。
-
デフォルトの条件で新しいインスタンスを作成します。デフォルト値は
各インスタンス プロパティのドキュメントをご覧ください。
宣言
Objective-C
- (nonnull instancetype)init;
戻り値
新しい ModelDownloadConditions
インスタンス。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-20 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-09-20 UTC。"],[[["`MLKModelDownloadConditions` configures conditions for downloading machine learning models."],["It controls whether downloads can occur over cellular networks and in the background."],["Developers can customize these conditions using `initWithAllowsCellularAccess:allowsBackgroundDownloading:` or rely on the defaults with `init`."],["By default, cellular access is allowed (`allowsCellularAccess = YES`), but background downloading is not (`allowsBackgroundDownloading = NO`)."]]],["`MLKModelDownloadConditions` configures model download settings. Key properties include `allowsCellularAccess`, enabling downloads over cellular networks (default: `YES`), and `allowsBackgroundDownloading`, allowing downloads in the background (default: `NO`). You can create instances with custom conditions using `initWithAllowsCellularAccess:allowsBackgroundDownloading:`, or use default settings with `init`. Both methods return a `ModelDownloadConditions` instance.\n"]]