0

I have some open source c++ library , I have converted into lib.a for different IOS architecture, how can I link this library in Xcode For IOS Devices.

http://wiki.zeromq.org/build:iphone

Reference Link

The Main Target is to first test this in IOS environment and then add it to Flutter, using Flutter FFi package, If anyone have done such kind of work please guide.

Richard Heap
  • 48,344
  • 9
  • 130
  • 112
  • When you get to doing this in Flutter, it's often easiest to have the Flutter toolchain compile the source - see https://docs.flutter.dev/development/platform-integration/android/c-interop#open-source-third-party – Richard Heap Oct 26 '22 at 13:13
  • For Reference https://pub.dev/packages/dartzmq This Library has Android Support ,But does not Work On IOs, I have Tried Many things but nothing Worked for me – wajahat akram Oct 31 '22 at 09:37
  • Yes I have Read the Documentation, but did'nt understood for IOS, For Android It is Simple , we have .so lib files, but for ios It is confusing me what to do? – wajahat akram Oct 31 '22 at 09:40

1 Answers1

0

I got my Solution,if using cocoa pods for managing dependencies I had to add these lines s.vendored_libraries = 'Frameworks/lib.a' s.pod_target_xcconfig = { "OTHER_LDFLAGS" => "-force_load $(PODS_TARGET_SRCROOT)/Frameworks/lib.a -lstdc++" }

other way to is to in Build Setting of Xcode go to tab Link libraries with binary and chose the lib.a file, add compiler linker flag in other flag section, compiler flags should be same with which to you build the library, add necessary header search path,