Code Monkey home page Code Monkey logo

Comments (7)

shaqian avatar shaqian commented on July 20, 2024 3

Thanks for the update.

The second error is because the tflite plugin uses Objective-C++ code. I added the solution in readme:
https://github.com/shaqian/flutter_tflite#ios
If you get error like "'vector' file not found", please open ios/Runner.xcworkspace in Xcode, click Runner > Tagets > Runner > Build Settings, search Compile Sources As, change the value to Objective-C++;

Regards,
Qian

from flutter_tflite.

shaqian avatar shaqian commented on July 20, 2024 1

Hi @shaqian . I've tried to add modular headers as suggested http://blog.cocoapods.org/CocoaPods-1.5.0/ but it seems the Swift plugin does not work without use_frameworks! in place, even with modular headers. So I had to revert that.

I guess you have more iOS experience than me, so any suggestions are welcome. I don't know in which plugin the problem is, all I know is that when you create a new project with flutter create -i swift it automatically adds use_frameworks!, and your plugin does not seem to work with that enabled.

Hi Sh1d0w,

Thank you for the information. My plugin hasn't been tested with projects created with -i swift flag. I will give that a look.

Regards,
Qian

from flutter_tflite.

shaqian avatar shaqian commented on July 20, 2024 1

@sosospicy
I added support for Swift based flutter project in the new version 0.0.4. Could you please give it a try?

Thanks,
Qian

from flutter_tflite.

sosospicy avatar sosospicy commented on July 20, 2024 1

@shaqian Now it runs as expected. Thanks again!
I'll fork your repo and try to add some new methods like loading model from files etc..

from flutter_tflite.

shaqian avatar shaqian commented on July 20, 2024

Hi sosospicy,

I see you raised another issue related to this. Have you tested the solution suggested by Sh1d0w?
https://github.com/Sh1d0w/multi_image_picker/issues/30

Thanks,
Qian

from flutter_tflite.

Sh1d0w avatar Sh1d0w commented on July 20, 2024

Hi @shaqian . I've tried to add modular headers as suggested http://blog.cocoapods.org/CocoaPods-1.5.0/ but it seems the Swift plugin does not work without use_frameworks! in place, even with modular headers. So I had to revert that.

I guess you have more iOS experience than me, so any suggestions are welcome. I don't know in which plugin the problem is, all I know is that when you create a new project with flutter create -i swift it automatically adds use_frameworks!, and your plugin does not seem to work with that enabled.

from flutter_tflite.

sosospicy avatar sosospicy commented on July 20, 2024

Thank both of you for working so late for this issue.
I tried version 0.0.4, still build error:
After flutter clean, rm -rf ios/Pods, rm ios/Podfile, and then flutter run, got this:
7 warnings generated. <unknown>:0: error: merge-module command failed with exit code 1 (use -v to see invocation) Command /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1 <unknown>:0: error: underlying Objective-C module 'BSImagePicker' not found

Then run flutter run again, got this:
Xcode's output: ↳ === BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug === While building module 'tflite' imported from /test_app/ios/Runner/GeneratedPluginRegistrant.m:8: In file included from <module-includes>:1: In file included from /test_app/build/ios/Debug-iphoneos/tflite/tflite.framework/Headers/tflite-umbrella.h:13: /test_app/build/ios/Debug-iphoneos/tflite/tflite.framework/Headers/ios_image_load.h:1:10: fatal error: 'vector' file not found #include <vector> ^~~~~~~~ 1 error generated. /test_app/ios/Runner/GeneratedPluginRegistrant.m:8:9: fatal error: could not build module 'tflite' #import <tflite/TflitePlugin.h> ~~~~~~~^ 2 errors generated.

from flutter_tflite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.