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
인스턴스입니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003e\u003ccode\u003eMLKModelDownloadConditions\u003c/code\u003e configures conditions for downloading machine learning models.\u003c/p\u003e\n"],["\u003cp\u003eIt controls whether downloads can occur over cellular networks and in the background.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can customize these conditions using \u003ccode\u003einitWithAllowsCellularAccess:allowsBackgroundDownloading:\u003c/code\u003e or rely on the defaults with \u003ccode\u003einit\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBy default, cellular access is allowed (\u003ccode\u003eallowsCellularAccess = YES\u003c/code\u003e), but background downloading is not (\u003ccode\u003eallowsBackgroundDownloading = NO\u003c/code\u003e).\u003c/p\u003e\n"]]],["`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"],null,["# MLKitCommon Framework Reference\n\nMLKModelDownloadConditions\n==========================\n\n\n @interface MLKModelDownloadConditions : NSObject \u003cNSCopying\u003e\n\nConfigurations for model downloading conditions.\n- `\n ``\n ``\n `\n\n ### [allowsCellularAccess](#/c:objc(cs)MLKModelDownloadConditions(py)allowsCellularAccess)\n\n `\n ` \n Indicates whether download requests should be made over a cellular network. The default is `YES`. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL allowsCellularAccess;\n\n- `\n ``\n ``\n `\n\n ### [allowsBackgroundDownloading](#/c:objc(cs)MLKModelDownloadConditions(py)allowsBackgroundDownloading)\n\n `\n ` \n Indicates whether the model can be downloaded while the app is in the background. The default is\n `NO`. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL allowsBackgroundDownloading;\n\n- `\n ``\n ``\n `\n\n ### [-initWithAllowsCellularAccess:allowsBackgroundDownloading:](#/c:objc(cs)MLKModelDownloadConditions(im)initWithAllowsCellularAccess:allowsBackgroundDownloading:)\n\n `\n ` \n Creates a new instance with the given conditions. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithAllowsCellularAccess:(BOOL)allowsCellularAccess\n allowsBackgroundDownloading:\n (BOOL)allowsBackgroundDownloading;\n\n #### Parameters\n\n |-------------------------------------|-------------------------------------------------------------------------|\n | ` `*allowsCellularAccess*` ` | Whether download requests should be made over a cellular network. |\n | ` `*allowsBackgroundDownloading*` ` | Whether the model can be downloaded while the app is in the background. |\n\n #### Return Value\n\n A new `ModelDownloadConditions` instance.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)MLKModelDownloadConditions(im)init)\n\n `\n ` \n Creates a new instance with the default conditions. The default values are specified in the\n documentation for each instance property. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;\n\n #### Return Value\n\n A new `ModelDownloadConditions` instance."]]