googlesamples / mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS
Apache License 2.0
3.55k stars 2.93k forks source link

[Bug report] no such module 'MLKit' #618

Closed konstantinlois closed 1 year ago

konstantinlois commented 1 year ago

Describe the bug I am trying to build an ios library that leverages the Google digital ink library. However, I am struggling to import the digital ink library into my own library as a dependency.

To Reproduce Example Steps to reproduce the behavior in sample app:

  1. add s.dependency 'GoogleMLKit/DigitalInkRecognition', '~> 3.2.0' in the podspec of my library
  2. add import MLKit somewhere in the project (for example in some view file)
  3. run pod install
  4. try to build the project
  5. the following error is shown: no such module ‘MLKit’ (it’s complaining about the import MLKit line)

Am I missing something?

If applicable, please include code snippet and sample input(image, video, text, etc)

Expected behavior App building successfully.

SDK Info:

Smartphone: (not applicable)

Development Environment: (can be provided, if important) (For Android issue feel free to skip this section)

Thank you for your help.

miworking3 commented 1 year ago

Are you using a Podfile, could you share your Podfile?

konstantinlois commented 1 year ago

Thank you for your response. Regarding your question: Since I was building a module myself, I had no podfile but a podspec.

However, I figured out a solution for the problem. I just had to specifically import only the digital ink part from MLKit (not the whole MLKit). It is working now.

Thank you.