Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.
This repository was archived by the owner on May 27, 2025. It is now read-only.

Failed to flutter run #16

@ifanchu

Description

@ifanchu

I followed the instruction all the way to the last flutter run

It failed at Running Xcode build...

    /Users/ifanchu/Projects/mlkit-custom-image-classifier/automl_mlkit/ios/Classes/AutomlMlkitPlugin.m:45:60: error: no visible @interface for 'FIRLocalModel' declares
    the selector 'initWithName:path:'
            FIRLocalModel *localModel = [[FIRLocalModel alloc] initWithName:modelName path:url.path];
                                         ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/ifanchu/Projects/mlkit-custom-image-classifier/automl_mlkit/ios/Classes/AutomlMlkitPlugin.m:46:41: error: no visible @interface for 'FIRModelManager' declares
    the selector 'registerLocalModel:'
            [[FIRModelManager modelManager] registerLocalModel:localModel];
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~
    /Users/ifanchu/Projects/mlkit-custom-image-classifier/automl_mlkit/ios/Classes/AutomlMlkitPlugin.m:48:65: error: no visible @interface for
    'FIRVisionOnDeviceAutoMLImageLabelerOptions' declares the selector 'initWithRemoteModelName:localModelName:'
                [[FIRVisionOnDeviceAutoMLImageLabelerOptions alloc] initWithRemoteModelName:nil localModelName:modelName];
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 errors generated.

I then used xcode to build it locally and saw exact same issue.

Did a little digging, the FIRLocalModel.h does not define initWithName:modekName:path.

Was I missing anything here? Please help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions