rishabnayak / firebase_mlkit_language

Firebase ML Kit Language Plugin for Flutter
BSD 3-Clause "New" or "Revised" License
18 stars 21 forks source link

Build failed for iOS #31

Open alexwestcott1 opened 4 years ago

alexwestcott1 commented 4 years ago

Although I've managed to implement the firebase_mlkit_language package for an Android application, I receive the following error when trying to run the application on iOS.

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Running pod install...
Running Xcode build...
Xcode build done.                                            9.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **

Xcode's output:
↳
    /Users/alexwestcott/dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_mlkit_language-1.1.2/ios/Classes/ViewModels.m:9:39: error: no visible @interface for 'FIRModelManager' declares the selector 'availableTranslateModelsWithApp:'
          [[FIRModelManager modelManager] availableTranslateModelsWithApp:FIRApp.defaultApp];
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.

I've set up Firebase for the project, and it runs as expected for Android, but it's giving me this error on iOS. Any help would be appreciated!

ankitch29 commented 4 years ago

Hi,

I'm getting the same issue and still no luck. While it's working fine on Android. I'm using the latest version (11.2.1)of Xcode.

Any help would be really appreciated!

Thank you

zxcvbnmmohd commented 4 years ago

Hey, anyone found a solution to this yet?

zxcvbnmmohd commented 4 years ago

Hours later I figured out a solution. Basically open up your app and the example project they give you in XCode. in your app build it and when the errors come up (for me was 3) locate those files and then locate those same files in their example project. I've already solved it so I forgot which files exactly (was playing around with it and it happened to work). When you locate those files, in your project I just tapped on the function when pressed jump to definition, then find the same path in their example project and you'll see that there are those functions missing in your project. Simply copy the rest of the functions to your xcode files and it'll work.

ankitch29 commented 4 years ago

@zxcvbnmmohd For me still not working :(

friebetill commented 4 years ago

Solved the problem for now in this commit. There were breaking changes in the Firebase upstream from iOS. A bit of a problem is that the latest version of Firebase is currently being used. Someone still needs to lock the version in podspec, but I'm a beginner with Objective C. I would be happy if someone would take over. Let me know if I should submit a PR, but the project looks unmaintained at the moment.

kumudamulgund commented 4 years ago

Hi guys, How did you manage to make it work for android?. I get error:- java:3: error: package android.support.annotation does not exist. Opened an issue describing it. https://github.com/rishabnayak/firebase_mlkit_language/issues/38

carman247 commented 3 years ago

I'm also having this issue ... have set iOS target to 9 like required and doesn't work .. using version 1.1.3

Any news?

carman247 commented 3 years ago

Hours later I figured out a solution. Basically open up your app and the example project they give you in XCode. in your app build it and when the errors come up (for me was 3) locate those files and then locate those same files in their example project. I've already solved it so I forgot which files exactly (was playing around with it and it happened to work). When you locate those files, in your project I just tapped on the function when pressed jump to definition, then find the same path in their example project and you'll see that there are those functions missing in your project. Simply copy the rest of the functions to your xcode files and it'll work.

What?!

niypoo commented 3 years ago

any update !!!?