1

I am trying to use tflite_flutter plugin for running a custom ml function from a tflite model. It is working fine on android but for the iOS setup, it requires us to add TensorFlowLiteC.framework on ~/.pub-cache/hosted/pub.dartlang.org/tflite_flutter-<plugin-version>/ios/ folder but I cannot find this folder no matter what I do. It is not just because it is hidden, the tflite_flutter-<plugin-version> folder is not there at all.

I tried:

  1. Adding dependency directly from git.
tflite_flutter:
   git:
     url: git://github.com/am15h/tflite_flutter_plugin.git
     ref: v0.9.0
  1. Running
flutter pub cache repair
flutter pub cache add tflite_flutter

Help would be much appreciated.

2
  • you won't find it in above folder as it's for pub.dartlang.org. try searching in ~/.pub-cache/git/ folder. You can try my answer as well. Commented Jul 25, 2021 at 20:51
  • Thank you for the response. But unfortunately, this folder doesn't exist. Commented Jul 25, 2021 at 21:05

2 Answers 2

2
use_frameworks!
pod 'TensorFlowLiteSwift'

followed by running pod install in your ios folder.

From official doc https://www.tensorflow.org/lite/guide/ios

As a developer, you are not bound to using flutter packages only. You can directly add dependencies to your podfile or build.gradle as well.

Sign up to request clarification or add additional context in comments.

1 Comment

I did try the steps in here to manually install framework but even if I do it, I still run into issues in iOS build.
0

You'll find your package in ~/development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.