Closed arozdorozhniuk closed 3 weeks ago
Using opencv_dart inside another plugin has not been tested, please provide a minimal example to reproduce it.
Using opencv_dart inside another plugin has not been tested, please provide a minimal example to reproduce it.
I've basically created a plugin wih this command:
flutter create --template=plugin --platforms=android,ios some_plugin
And added your plugin as a dependency in main pubspec.yaml like that:
dependencies:
flutter:
sdk: flutter
opencv_dart: ^1.0.5
plugin_platform_interface: ^2.0.2
Than I run example project inside plugin folder to test it. And Android downloads everything and runs well, but iOS is giving this error for some strange reasons.
I can provide full package but literally done nothing else with it.
get it. may i ask that you are running on a simulator or real device ?
@arozdorozhniuk Confirmed, You can run setup command manually to solve this, refer to README for detailed setup commands.
It's because the incorrect working directory in Makefile of ios, I am considering to compile locally instead of download from releases, please setup manually until it is finished.
I've tried calling dart run opencv_dart:setup ios --arch x64
or arm64
for simulator or device accordingly. But it seems that it does nothing.
Example output in terminal:
arozdorozhniuk@NB01ACCO006 example % dart run opencv_dart:setup ios --arch x64
Building package executable...
Built opencv_dart:setup.
opencv_dart: working for ios x64
Building with assumed project root in: /Users/arozdorozhniuk/Documents/work/some_plugin/example/
Using package:opencv_dart from /Users/arozdorozhniuk/.pub-cache/hosted/pub.dev/opencv_dart-1.0.5
Downloading https://github.com/rainyl/opencv_dart/releases/download/v1.0.5/libopencv_dart-ios-x64.tar.gz
Cached to /Users/arozdorozhniuk/.pub-cache/hosted/pub.dev/opencv_dart-1.0.5/.dart_tool/.cache/libopencv_dart-ios-x64.tar.gz
Libs already exists in /Users/arozdorozhniuk/.pub-cache/hosted/pub.dev/opencv_dart-1.0.5/ios, Skipping...
Finished
Should I refer to some other setup process in readme?
/Users/arozdorozhniuk/.pub-cache/hosted/pub.dev/opencv_dart-1.0.5/ios
please take a look at /Users/arozdorozhniuk/.pub-cache/hosted/pub.dev/opencv_dart-1.0.5/ios
and see whether opencv_dart.framework
is there and ensure the content of opencv_dart.framework
is not empty, you can manually delete it and try to re-run the setup commands.
It becomes even stranger, because it seems that opencv_dart.framework is not empty..
Try to delete the directory and re-run setup, and run the example to see whether it works
I've tried all of that, and it seems like opencv_dart exists but somehow it is not being found.
Also, i've just reilsed that 1.0.4 version is working and it is becoming even stranger now
All right, please downgrade to v1.0.4 for now and waiting for #78 to be finished.
Thanks a lot, you're really helpful!
You are welcome.
It almost finished, could you please test whether it works for you with the following deps:
opencv_dart:
git:
url: https://github.com/rainyl/opencv_dart
ref: 96a936a
Please install the dependencies before running examples if you haven't install them, especially conan:
brew install --force --overwrite ninja ffmpeg@6 conan
brew link --overwrite ffmpeg@6
conan profile detect -f
It works now!
Question
I'm getting this error trying to launch ios. I've tried launching example inside opencv_dart and it works almost fine. At least it launches. What can be the cause of this error?
P.S. It is probably because i'm trying to use your plugin inside of another plugin, and definitely doing something wrong.