I need to build TensorFlowLite Swift Framework/cocoapod from the sources and then use it instead of the original framework in one of the Swift projects.
Downloaded the code and followed the instructions in few scenarios but without success:
1) https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/experimental/swift
a) python configure.py
b) CocoaPods developers isn't applicable as it doesn't take the source from the local TensofFlow folder (or I am mistaken?)
c) Bazel developers I do:
bazel build tensorflow/lite/experimental/swift:TensorFlowLite
bazel test tensorflow/lite/experimental/swift:Tests --swiftcopt=-enable-testing
and eventually
generate_xcodeproj.sh --genconfig tensorflow/lite/experimental/swift/TensorFlowLite.tulsiproj:TensorFlowLite --outputfolder ~/path/to/generated/TensorFlowLite.xcodeproj
as a result I get a project with a libtensorflow-lite-experimental-swift-TensorFlowLite.a and few idx files. It compiles and I see the .a file (but both the app and tests don't compile for various reasons) and I don't quite understand how I can use that .a lib with Swift files as there are no module/headers etc. files.
After all these exercises there is TensorFlowLiteSwift.podspec in the root of TensorFlow and in the experimental/Swift folders. It still depends on the TensorFlowLiteC and if I refer to this podspec in another project via path param I can do import TensorFlowLiteC but not import TensorFlowLiteSwift / import TensorFlowLite and I believe the TensorFlowLiteC is still taken from the Internet, not locally.
2) Custom framework path from here: https://firebase.google.com/docs/ml-kit/ios/use-custom-tflite
Here are few problems:
a) if I try to just use a project with tensorflow_lite.framework added internally then I can't reference TensorFlowLite / TensorFlowLiteC etc. in the Swift file.
b) if I try to follow a route of creating the local pod and reference the pod project then pod install doesn't work because mandatory parameters are not set (used provided example).
I expect to get a Xcode project or workspace which is built from the local TensorFlowFiles and which I can reference from other projects like 'import TensorFlowLiteSwift' or 'import TensorFlowLite'
The problem is that I don't understand even what's the correct route to make it happen.
Thanks.