azihsoyn / flutter_mlkit

A Flutter plugin to use the Firebase ML Kit.
MIT License
391 stars 90 forks source link

Fresh install causes errors #84

Closed arrrrny closed 5 years ago

arrrrny commented 5 years ago

Getting below errors while building for IOS. I do everything as instructed. My targe ios is 10.0

/Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:234:37: error: no visible @interface for 'FIRRemoteModel' declares the selector 'initWithName:allowsModelUpdates:initialConditions:updateConditions:' [[FIRRemoteModel alloc] initWithName:modeName


    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:239:45: error: no visible @interface for 'FIRModelManager' declares the selector 'registerRemoteModel:'
                [[FIRModelManager modelManager] registerRemoteModel:remoteModelSource];
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:238:18: warning: unused variable 'registrationSuccess' [-Wunused-variable]
                BOOL registrationSuccess =
                     ^
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:247:64: error: no visible @interface for 'FIRLocalModel' declares the selector 'initWithName:path:'
                FIRLocalModel *localModel = [[FIRLocalModel alloc] initWithName:modeName
                                             ~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:250:45: error: no visible @interface for 'FIRModelManager' declares the selector 'registerLocalModel:'
                [[FIRModelManager modelManager] registerLocalModel:localModel];
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~
 /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:249:18: warning: unused variable 'registrationSuccess' [-Wunused-variable]
                BOOL registrationSuccess =
                     ^
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:261:9: error: unknown type name 'FIRModelOptions'; did you mean 'FIRModelOutputs'?
            FIRModelOptions *options = [[FIRModelOptions alloc] initWithRemoteModelName:remoteModelName                                                                localModelName:localModelName];
            ^~~~~~~~~~~~~~~
            FIRModelOutputs
    In module 'FirebaseMLModelInterpreter' imported from /Users/arrrrny/Developer/ml_test/ios/Pods/Headers/Public/Firebase/Firebase.h:69:
    /Users/arrrrny/Developer/ml_test/ios/Pods/FirebaseMLModelInterpreter/Frameworks/FirebaseMLModelInterpreter.framework/Headers/FIRModelOutputs.h:7:12: note: 'FIRModelOutputs' declared here
    @interface FIRModelOutputs : NSObject
               ^
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:261:38: error: unknown receiver 'FIRModelOptions'; did you mean 'FIRModelOutputs'?
            FIRModelOptions *options = [[FIRModelOptions alloc] initWithRemoteModelName:remoteModelName                                                                localModelName:localModelName];
                                         ^~~~~~~~~~~~~~~
                                         FIRModelOutputs
    In module 'FirebaseMLModelInterpreter' imported from /Users/arrrrny/Developer/ml_test/ios/Pods/Headers/Public/Firebase/Firebase.h:69:
    /Users/arrrrny/Developer/ml_test/ios/Pods/FirebaseMLModelInterpreter/Frameworks/FirebaseMLModelInterpreter.framework/Headers/FIRModelOutputs.h:7:12: note: 'FIRModelOutputs' declared here
    @interface FIRModelOutputs : NSObject
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:261:61: error: no visible @interface for 'FIRModelOutputs' declares the selector 'initWithRemoteModelName:localModelName:'
            FIRModelOptions *options = [[FIRModelOptions alloc] initWithRemoteModelName:remoteModelName                                                                localModelName:localModelName];
                                        ~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:262:65: error: no known class method for selector 'modelInterpreterWithOptions:'
            FIRModelInterpreter *interpreter = [FIRModelInterpreter modelInterpreterWithOptions:options];
                                                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/arrrrny/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/mlkit-0.14.1/ios/Classes/MlkitPlugin.m:365:22: warning: implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'int' [-Wshorten-64-to-32]
            int length = [((NSArray *)o) count];
tiffvan commented 5 years ago

I am also having this issue

tiffvan commented 5 years ago

Please help as soon as someone can, it is really urgent! Thanks

LampeMW commented 5 years ago

I'm also having this issue.

❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.10.15-pre.80, on Mac OS X 10.15 19A602, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.39.2)
[✓] Connected device (1 available)

• No issues found!
skzwksk commented 5 years ago

me too [✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15 19A602, locale ja-JP) • Flutter version 1.9.1+hotfix.6 at /Users/sekizawakeisuke/github/flutter/flutter • Framework revision 68587a0916 (6 weeks ago), 2019-09-13 19:46:58 -0700 • Engine revision b863200c37 • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /Users/sekizawakeisuke/Library/Android/sdk • Android NDK at /Users/sekizawakeisuke/Library/Android/sdk/ndk-bundle • Platform android-29, build-tools 29.0.2 • Java binary at: /Users/sekizawakeisuke/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5900203/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.1, Build version 11A1027 • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5) • Android Studio at /Users/sekizawakeisuke/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5900203/Android Studio.app/Contents • Flutter plugin version 40.2.2 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3) • IntelliJ at /Users/sekizawakeisuke/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app • Flutter plugin version 39.0.5 • Dart plugin version 192.6262.58

• No issues found!

skzwksk commented 5 years ago

sorry fixed https://firebase.google.com/support/release-notes/ios#ml-kit because of 6.10.0 breaking change

tiffvan commented 5 years ago

sorry fixed https://firebase.google.com/support/release-notes/ios#ml-kit because of 6.10.0 breaking change

I'm still getting the same errors

azihsoyn commented 5 years ago

Hi, all.

Sorry to late response.

I'm working to fix this issue in #85.

If you use the custom model, please try below and check works correctly.

dependencies:
  mlkit:
    git:
      url: git://github.com/azihsoyn/mlkit.git
      ref: feature/for_ios_breaking_change

Thanks.

tiffvan commented 5 years ago

Hi, all.

Sorry to late response.

I'm working to fix this issue in #85.

If you use the custom model, please try below and check works correctly.

dependencies:
  mlkit:
    git:
      url: git://github.com/azihsoyn/mlkit.git
      ref: feature/for_ios_breaking_change

Thanks.

When i try that I get:

Git error. Command: git clone --mirror git://github.com/azihsoyn/mlkit.git /Users/tiffanyvandermerwe/Development/flutter/.pub-cache/git/cache/mlkit-f6e0eb9a7e750ffb41a137d3b68e5bbcaebf0c0f

Cloning into bare repository '/Users/tiffanyvandermerwe/Development/flutter/.pub-cache/git/cache/mlkit-f6e0eb9a7e750ffb41a137d3b68e5bbcaebf0c0f'...

fatal: remote error:

Repository not found.

pub get failed (server unavailable) -- attempting retry 1 in 1 second...

azihsoyn commented 5 years ago

Thanks, @tiffvan!

And sorry, the repository URL is not correct.

Please try again below.

dependencies:
  mlkit:
    git:
      url: git://github.com/azihsoyn/flutter_mlkit.git
      ref: feature/for_ios_breaking_change
tiffvan commented 5 years ago

mlkit: git: url: git://github.com/azihsoyn/flutter_mlkit.git ref: feature/for_ios_breaking_change

YES!!! Thank you it works now!

azihsoyn commented 5 years ago

Thanks @tiffvan!

OK, I release the new version.

azihsoyn commented 5 years ago

I released 0.15.0.

Thanks.