I want to run OpenCV with flutter. First of all , i try to the FFI library to bind to native code.
Flutter Dev says " On iOS, you need to tell Xcode to statically link the file:
In Xcode, open Runner.xcworkspace.
Add the C/C++/Objective-C/Swift source files to the Xcode project "
But i don’t have a file name that ‘ Runner.xcworkspace "
Its very hard to run opencv or c++ code in Flutter. I am working on it for 3 days and there is no improvement.
2
Answers
If you followed the guide on flutter.dev Binding to native code using dart:ffi it is because you created a plugin template and as such the iOS folder only contains plugin-specific files.
To find the iOS folder you are looking for, please open the "example" folder that was also created when you made the project and open the iOS folder therein.
for run OpenCV with flutter and with native code using ffi, you can do with this way:
iOS: in Podfile add next line to target
In Build Settings -> Library Search Paths add recursive path
For debug running you can add opencv.framework to your project directory
Android: for android you have two methods
android/app/build.gradle
add next partsFile CMakeList.txt