Kotlin and Swift meet the OS
Prerequisites: Start here / basic technical literacy
Platform resource ownership
Mental model verified
Android native code interacts with Activity, View, SDK callbacks and the main Looper. iOS code interacts with UIKit, application/scene lifecycle and the main actor or main queue. A module mediates these APIs for JS; the native platform still owns its resources and permissions.
[S12] [S15] [S17] [S18]Worked flow synthesis
A camera picker starts platform UI, returns a URI or asset handle, and is cancelled or completed by an OS callback. The module must translate that outcome into the JS contract and clean up if its owning screen disappears.
[S12] [S15] [S17]Engineering decision synthesis
Make thread, ownership and lifecycle explicit for every native resource. Design cancellation, error mapping and permission denial before exposing a JS function.
[S12] [S16] [S18]Failure mode and improvement synthesis
Holding an old Activity or view reference after recreation can leak or crash. Tie work to a valid owner and test background/foreground, dismissal and recreation on devices.
[S12] [S16]Check yourself: Which thread should create or mutate host UI views?
The platform UI/main thread; background work belongs on an appropriate worker or async execution context.