templates/forwarder_templates library

Constants

classesDartApiDlForwarder → const String
dart_api_dl.c forwarder for CocoaPods Classes/ targets. Must be a .c file (not .cpp) so the void*/function-pointer casts inside dart_api_dl.c are accepted without C++ complaints.
classesIosDartApiDlForwarder → const String
dart_api_dl.c forwarder for CocoaPods ios/macos Classes/ targets with the comment explaining why it must remain .c.
classesMacosDartApiDlForwarder → const String

Functions

appleImplLinkAnchor(String symbol) → String
Appended to a Classes/Hybrid*.cpp impl forwarder: an external symbol the anchors file can reference, which pulls this translation unit — and the auto-register constructor in it — into a static link.
appleImplLinkAnchorSymbol(String pluginName, String implFileStem) → String
The external symbol that marks one Classes/Hybrid*.cpp impl translation unit. It carries the plugin name because in a statically linked app every nitro plugin shares one symbol namespace.
appleLinkAnchorsFileName(String pluginName) → String
The file nitrogen link writes into <platform>/Classes/ to hold the plugin's link anchors (see appleLinkAnchorsTu).
appleLinkAnchorsTu({required String pluginName, required List<String> initSymbols, required List<String> implAnchors}) → String
The anchors translation unit: an Objective-C class whose method references every bridge's <lib>_init_dart_api_dl (initSymbols) and every impl anchor (implAnchors).
classesCForwarder(String pluginName) → String
A CocoaPods-style Classes/plugin.c forwarder to src/plugin.c.
classesCppForwarder(String pluginName) → String
A CocoaPods-style Classes/plugin.cpp forwarder to src/plugin.cpp. The relative path ../../src/ is correct from {platform}/Classes/.
managedBridgeMmForwarder(String relativePath) → String
A nitrogen link managed .mm forwarder that wraps the generated C++ bridge so SPM compiles it as Obj-C++ and links the C ABI symbols.
managedCppForwarder(String relativePath) → String
A nitrogen link managed C++ source forwarder — used in both CocoaPods Classes/ and SPM Sources/<Plugin>Cpp/ targets.
spmBridgeMmForwarder(String pluginName) → String
A nitrogen init .mm forwarder for the SPM C++ target. The 4-level relative path is fixed for the nested SPM layout: {platform}/{plugin}/Sources/{Plugin}Cpp/ → lib/src/generated/cpp/
spmCppClassesForwarder(String pluginName) → String
A nitrogen init C++ source forwarder in an SPM Cpp target. Points from <platform>/<plugin>/Sources/<Plugin>Cpp/ up to Classes/.