Returns the ModelManager instance for the default Firebase app. The default Firebase app
instance must be configured before calling this method; otherwise, raises FIRAppNotConfigured
exception.
Declaration
Objective-C
+(nonnullinstancetype)modelManager;
Return Value
The ModelManager instance for the default Firebase app.
Returns the ModelManager instance for the given custom Firebase app. The custom Firebase app
instance must be configured before calling this method; otherwise, raises FIRAppNotConfigured
exception.
Downloads the given model from the server to a local directory on the device. Use
isModelDownloaded(_:) to check the download status for the model. If this method is invoked and
the model has already been downloaded, a request is made to check if a newer version of the model
is available for download. If available, the new version of the model is downloaded.
To be notified when a model download request completes, observe the
.firebaseMLModelDownloadDidSucceed (indicating model is ready to use) and
.firebaseMLModelDownloadDidFail notifications defined in
FIRModelDownloadNotifications.h. If the latest model is already downloaded, completes
without additional work and posts a .firebaseMLModelDownloadDidSucceed notification,
indicating that the model is ready to use.
Gets the absolute file path on the device for the last downloaded model. Please do not use this
API if you intend to use this model through ModelInterpreter.
Handler to call back returning the absolute file path of the downloaded model.
This will return nil and will fail with the given error if the model is not yet downloaded on
the device or valid custom remote model is not provided.
[[["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 2021-02-11 UTC."],[],[],null,["FIRModelManager \n\n\n @interface FIRModelManager : NSObject\n\nManages models that are used by MLKit features.\n- `\n ``\n ``\n `\n\n [+modelManager](#/c:objc(cs)FIRModelManager(cm)modelManager)`\n ` \n Returns the `ModelManager` instance for the default Firebase app. The default Firebase app\n instance must be configured before calling this method; otherwise, raises `FIRAppNotConfigured`\n exception. \n\n Declaration \n Objective-C \n\n + (nonnull instancetype)modelManager;\n\n Return Value\n\n The `ModelManager` instance for the default Firebase app.\n- `\n ``\n ``\n `\n\n [+modelManagerForApp:](#/c:objc(cs)FIRModelManager(cm)modelManagerForApp:)`\n ` \n Returns the `ModelManager` instance for the given custom Firebase app. The custom Firebase app\n instance must be configured before calling this method; otherwise, raises `FIRAppNotConfigured`\n exception. \n\n Declaration \n Objective-C \n\n + (nonnull instancetype)modelManagerForApp:(nonnull FIRApp *)app;\n\n Parameters\n\n Return Value\n\n The `ModelManager` instance for the given custom Firebase app.\n- `\n ``\n ``\n `\n\n [-init](#/c:objc(cs)FIRModelManager(im)init)`\n ` \n Unavailable. Use the `modelManager()` or `modelManager(app:)` class methods. \n\n Declaration \n Objective-C \n\n - (nonnull instancetype)init;\n\n- `\n ``\n ``\n `\n\n [-isModelDownloaded:](#/c:objc(cs)FIRModelManager(im)isModelDownloaded:)`\n ` \n Checks whether the given model has been downloaded. \n\n Declaration \n Objective-C \n\n - (BOOL)isModelDownloaded:(nonnull ../Classes/FIRRemoteModel.html *)remoteModel;\n\n Parameters\n\n Return Value\n\n Whether the given model has been downloaded.\n- `\n ``\n ``\n `\n\n [-downloadModel:conditions:](#/c:objc(cs)FIRModelManager(im)downloadModel:conditions:)`\n ` \n Downloads the given model from the server to a local directory on the device. Use\n `isModelDownloaded(_:)` to check the download status for the model. If this method is invoked and\n the model has already been downloaded, a request is made to check if a newer version of the model\n is available for download. If available, the new version of the model is downloaded.\n\n To be notified when a model download request completes, observe the\n `.firebaseMLModelDownloadDidSucceed` (indicating model is ready to use) and\n `.firebaseMLModelDownloadDidFail` notifications defined in\n `FIRModelDownloadNotifications.h`. If the latest model is already downloaded, completes\n without additional work and posts a `.firebaseMLModelDownloadDidSucceed` notification,\n indicating that the model is ready to use. \n\n Declaration \n Objective-C \n\n - (nonnull NSProgress *)downloadModel:(nonnull ../Classes/FIRRemoteModel.html *)remoteModel\n conditions:\n (nonnull ../Classes/FIRModelDownloadConditions.html *)conditions;\n\n Parameters\n\n Return Value\n\n Progress for downloading the model.\n- `\n ``\n ``\n `\n\n [-deleteDownloadedModel:completion:](#/c:objc(cs)FIRModelManager(im)deleteDownloadedModel:completion:)`\n ` \n Deletes the downloaded model from the device. \n\n Declaration \n Objective-C \n\n - (void)deleteDownloadedModel:(nonnull ../Classes/FIRRemoteModel.html *)remoteModel\n completion:(nonnull void (^)(NSError *_Nullable))completion;\n\n Parameters\n\n- `\n ``\n ``\n `\n\n [-getLatestModelFilePath:completion:](#/c:objc(cs)FIRModelManager(im)getLatestModelFilePath:completion:)`\n ` \n Gets the absolute file path on the device for the last downloaded model. Please do not use this\n API if you intend to use this model through `ModelInterpreter`. \n\n Declaration \n Objective-C \n\n - (void)getLatestModelFilePath:(nonnull ../Classes/FIRRemoteModel.html *)remoteModel\n completion:(nonnull void (^)(NSString *_Nullable,\n NSError *_Nullable))completion;\n\n Parameters"]]