Open bsutton opened 4 years ago
If A.framework imports B.framework, we need generate both A and B. The outputs are two Flutter plugins(A and B).
Here is an example in package.json
codegen dart_native/dart_native/example/ios/Runner/RuntimeStub.h -o test/dart/ --project-name my_package -t plugin
When using -t
and --project-name
option, codegen will create a Flutter plugin.
Does it still need to be generated as a plugin? We have no native code so doesn't that make it a simple package?
Does it still need to be generated as a plugin? We have no native code so doesn't that make it a simple package?
Yeah, for system frameworks, you can make a simple package by -t package
Usage:
Usage: codegen [options] <input>
Generate dart code from native API.
Options:
-V, --version output the version number
-l, --language <language> [objc, java, auto(default)] (default: "auto")
-o, --output <output> Output directory
-t, --template <template> Generate a shareable Flutter project containing
modular Dart code.
Specify the type of project to create:
[package, plugin]
--project-name <projectName> The project name for this new Flutter project.
This must be a valid dart package name.
-h, --help display help for command
I'm trying to generate code for the ios avfoundation headers.
I'm uncertain what paths to pass to the codegen tool:
The xcode project has a Frameworks directory with a large no. of frameworks many of which are dependant on each other.
Can I just pass a single framework directory?
e.g.
Do then just look at imports to see what other frameworks should be generated or am I better of just generating code for the entire set of frameworks?
Some guidance on the conversion process in the doco might be useful.