Comparing ways of accessing native functionality
summary
An app called Posture Pal reads AirPods motion sensors via CMHeadphoneMotionManager to count push‑ups and streams attitude quaternions every 10 ms, proving native access works. Two approaches get shown: method/event channels (JSON over an event stream) and FFI gen which generates long Objective‑C bindings from one config file. Setup costs around 2 hours, output can be awkward (multiple generated constructors) and Obj‑C/Swift support is experimental, but FFI gen scales well for many APIs and enables direct Dart calls.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:45Motivation and use case
- 2:29Demo with push-ups
- 3:52Method and event channels
- 7:03Introducing FFI gen
- 8:07FFI gen setup and demo
- 10:58Dart vs Swift comparison
- 12:01Downsides of FFI gen
- 13:45Benefits of FFI gen
- 14:27Conclusion and Q&A
related talks
43mSummit Session 2 - Past, Present and Future of Native Interop
36mFlutter Plugins - From Method Channels to Native Interop
50mPast, Present and Future of Native Interop
38mThe past, present, and future of native interop
30mBinding Native Plugins with Flutter and Dart
21mNative, React Native, Flutter and More
40mWho is a Native Bindings Author and why you should be one
39mAdopting native assets for cross-platform FFI plugins
