Page Summary
-
Globally available constants provide notifications for observing model download tasks.
-
mlkitModelDownloadDidSucceedandmlkitModelDownloadDidFailare notification names for tracking model download success or failure, respectively. -
User info dictionaries within these notifications contain details about the
RemoteModeland potential errors using keys likeremoteModelanderror.
Constants
The following constants are available globally.
-
Notificationname for observing model download tasks that succeed. The user info dictionary will contain{ModelDownloadUserInfoKey.remoteModel : RemoteModel}.Declaration
Swift
static let mlkitModelDownloadDidSucceed : NSNotification . Name -
Notificationname for observing model download tasks that fail. The user info dictionary will contain{ModelDownloadUserInfoKey.remoteModel : RemoteModel}and{ModelDownloadUserInfoKey.error : NSError}.Declaration
Swift
static let mlkitModelDownloadDidFail : NSNotification . Name -
The key for retrieving the
RemoteModelfrom the user info dictionary.Declaration
Swift
static let remoteModel : ModelDownloadUserInfoKey -
The key for retrieving the
NSErrorfrom the user info dictionary. The corresponding value isnilif the model download completed successfully.Declaration
Swift
static let error : ModelDownloadUserInfoKey


