I'm integrating the native iOS VStarCam SDK into my Flutter project using MethodChannel. On iOS, I get multiple "Undefined symbol" linker errors when building the app for a physical device. It looks like certain native undefined symbols error.
What I'm Trying to Do
- I'm calling native iOS functions via Flutter MethodChannel
- The VStarCam SDK is added to my Xcode project (via
.aand.hfiles) - I want to use a native function like
StartVUID(...)
Error I'm Getting
When I build the iOS app, I get over 100 linker errors like:
Undefined symbol: _DeblockingFilterChromaHor_arm
Undefined symbol: _FT_Done_Glyph
Undefined symbol: _JS_CallFunction
These symbols appear related to FreeType, JavaScriptCore, and H.265 decoding.
What I tried to fix the errors
- Added all required
.astatic libraries from VStarCam SDK to "Link Binary With Libraries" - Verified header files are imported in
.mmfile - Set “Other Linker Flags” to
-ObjCand-all_load - Ensured the file calling native functions has
.mmextension (Objective-C++) - Cleaned and rebuilt the project
- Tried building on physical device and simulator
Flutter/Xcode Setup Details
Flutter version: 3.22.1
Target iOS version: 13.0+
Xcode version: 16.4
VStarCam SDK: iOS static lib (.a + .h)
Platform: iOS only