MLKitCommon Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Constants
The following constants are available globally.
-
Notification
name for observing model download tasks that succeed. The user info dictionary
will contain {ModelDownloadUserInfoKey.remoteModel : RemoteModel}
.
Declaration
Objective-C
extern
NS_SWIFT_NAME
(
mlkitModelDownloadDidSucceed
)
const
NSNotificationName
MLKModelDownloadDidSucceedNotification
-
Notification
name for observing model download tasks that fail. The user info dictionary will
contain {ModelDownloadUserInfoKey.remoteModel : RemoteModel}
and {ModelDownloadUserInfoKey.error : NSError}
.
Declaration
Objective-C
extern
NS_SWIFT_NAME
(
mlkitModelDownloadDidFail
)
const
NSNotificationName
MLKModelDownloadDidFailNotification
-
The key for retrieving the RemoteModel
from the user info dictionary.
-
The key for retrieving the NSError
from the user info dictionary. The corresponding value is nil
if the model download completed successfully.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eGlobally available constants provide notifications for observing model download successes and failures.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eMLKModelDownloadDidSucceedNotification\u003c/code\u003e and \u003ccode\u003eMLKModelDownloadDidFailNotification\u003c/code\u003e are the notification names for observing model download tasks.\u003c/p\u003e\n"],["\u003cp\u003eThe user info dictionary provides access to the \u003ccode\u003eRemoteModel\u003c/code\u003e and potential errors using keys \u003ccode\u003eMLKModelDownloadUserInfoKeyRemoteModel\u003c/code\u003e and \u003ccode\u003eMLKModelDownloadUserInfoKeyError\u003c/code\u003e respectively.\u003c/p\u003e\n"]]],[],null,["# MLKitCommon Framework Reference\n\nConstants\n=========\n\nThe following constants are available globally.\n- `\n ``\n ``\n `\n\n ### [MLKModelDownloadDidSucceedNotification](#/c:@MLKModelDownloadDidSucceedNotification)\n\n `\n ` \n `Notification` name for observing model download tasks that succeed. The user info dictionary\n will contain `{ModelDownloadUserInfoKey.remoteModel : RemoteModel}`. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(mlkitModelDownloadDidSucceed) const NSNotificationName\n MLKModelDownloadDidSucceedNotification\n\n- `\n ``\n ``\n `\n\n ### [MLKModelDownloadDidFailNotification](#/c:@MLKModelDownloadDidFailNotification)\n\n `\n ` \n `Notification` name for observing model download tasks that fail. The user info dictionary will\n contain `{ModelDownloadUserInfoKey.remoteModel : RemoteModel}` and\n `{ModelDownloadUserInfoKey.error : NSError}`. \n\n #### Declaration\n\n Objective-C \n\n extern NS_SWIFT_NAME(mlkitModelDownloadDidFail) const NSNotificationName\n MLKModelDownloadDidFailNotification\n\n- `\n ``\n ``\n `\n\n ### [MLKModelDownloadUserInfoKeyRemoteModel](#/c:@MLKModelDownloadUserInfoKeyRemoteModel)\n\n `\n ` \n The key for retrieving the `RemoteModel` from the user info dictionary. \n\n #### Declaration\n\n Objective-C \n\n extern const /ml-kit/reference/ios/mlkitcommon/api/reference/Type-Definitions#/c:MLKModelDownloadNotifications.h@T@MLKModelDownloadUserInfoKey _Nonnull MLKModelDownloadUserInfoKeyRemoteModel\n\n- `\n ``\n ``\n `\n\n ### [MLKModelDownloadUserInfoKeyError](#/c:@MLKModelDownloadUserInfoKeyError)\n\n `\n ` \n The key for retrieving the `NSError` from the user info dictionary. The corresponding value is\n `nil` if the model download completed successfully. \n\n #### Declaration\n\n Objective-C \n\n extern const /ml-kit/reference/ios/mlkitcommon/api/reference/Type-Definitions#/c:MLKModelDownloadNotifications.h@T@MLKModelDownloadUserInfoKey _Nonnull MLKModelDownloadUserInfoKeyError"]]