salkuadrat / learning

The easy way to use Machine Learning Kit in Flutter.
https://pub.dev/packages/learning
MIT License
63 stars 56 forks source link

iOS build failure: No such module 'MLKit' #18

Open mityax opened 2 years ago

mityax commented 2 years ago

Hey @salkuadrat, thanks for the great work on this plugin - it's really helpful. I set up learning_translate and learning_language and they work perfectly on android. However, the iOS build is still failing. Not sure if the problem is related to this plugin or if it's my setup.

This is the error message when running flutter build ios. Same error happens using Xcode (and yes, I made sure to open xcworkspace and not xcodeproj as suggested here):

Swift Compiler Error (Xcode): No such module 'MLKit'
/Users/x/.pub-cache/hosted/pub.dartlang.org/learning_translate-0.0.4/ios/Classes/SwiftLearningTranslatePlugin.swift:3:7

In Xcode, it looks like this module doesn't exist either, however, there's one called "GoogleMLKit" (in case this has something to do with it (?)):

I'd greatly appreciate any help on this.

fbernaly commented 2 years ago

I noticed that most of the APIs in this plugin are only implemented for Android, and not for iOS, this other plugin works for me: google_ml_kit and has the same functionalities.