A practical guide covering lessons learned from using jnigen and swiftgen for Flutter native interop in 2026. Covers migration from jni 0.14/0.15 to 1.0.0 including API changes, the new Dart-script-based binding configuration, callback patterns using Kotlin interfaces and Swift @objc protocols, memory management, ffigen include filters, cross-platform Dart wrapper patterns, and a side-by-side Android vs iOS API comparison. Includes concrete code examples for generator scripts, casting, arrays, and lifecycle management.
Table of contents
Migration to jni@1.0.0jnigen (Android)swiftgen (iOS)Writing ObjC-compatible Swiftffigen include filtersCross-platform Dart wrapperAndroid vs iOS API comparisonFinal wordsSort: