How to distribute flutter plugin (C/C++) on iOS?

68 views Asked by At

I've written a plugin that calls C++ functions via dart:ffi. It works, that's great. In my plugin.podspec, I have:

  s.static_framework = true  # statically link my C++ files
  s.public_header_files = 'Classes/**/*.h'

Problem is, in the app that uses the plugin the user has to (for iOS) manually add the files to Xcode:

  • open Runner.xcodeproj and click on Build Phases.
  • under the "Compile Sources" add the C++ files

This is terrible user experience! I can't expect the users of my library to do this. Can this somehow avoid this? I saw flutter/issues/17978 but I'm not sure if this is want I want here.

0

There are 0 answers