darkmoon_uk
02/01/2024, 11:03 PMzsmb
02/01/2024, 11:38 PMdarkmoon_uk
02/01/2024, 11:48 PMPablichjenkov
02/01/2024, 11:57 PMdarkmoon_uk
02/01/2024, 11:58 PMPablichjenkov
02/01/2024, 11:58 PMdarkmoon_uk
02/02/2024, 12:02 AMPablichjenkov
02/02/2024, 12:14 AMdarkmoon_uk
02/02/2024, 1:50 AMJoel Denke
02/02/2024, 7:58 AMdarkmoon_uk
02/04/2024, 9:20 AMFlow
collection across React Native's concept of an 'Event Bus'. We did go through a couple of iterations on that; also trying an RN 'Callback' based approach which worked, but was more complex and less efficient. On the Typescript side of the Flow bridging; we inflated the JSON elements as equivalent TypeScript Objects and Protocols for the host App's consumption.
• The iOS card reader hardware was only exposed via a Swift ABI interface, so we had to write an Objective-C wrapper to go around it. The resulting framework could then be driven by K/N. Again it wasn't too complex, just 'more work'. We look forward to removing this if KMP gets direct Swift interop.
• Security was a major consideration in such a project: We needed Dev and Prod flavours across both platforms so that all debugging and logging code was not even present in the production version.
• We used Manual DI; it was a breeze, and further cemented my view that a DI framework is rather unnecessary with Kotlin.
• A major challenge was the sheer number of moving parts in the build process: Dealing with KMP, iOS builds and React Native all at the same time meant a lot of environment configuration on both Dev and CI machines; this was mitigated by defining a higher-order 'Gradle CI project' whose purpose was to:
◦ Coordinate execution of a few lower level Gradle projects.
◦ Set-up 'bottom level dependencies' which were actually environment setup tasks that verified the environment and if not satisfactory, took relevant remediation like 'Install JDK 17' or rbenv
. This made the whole project more robust.
• Though this 'CI' project helped; having nested Gradle invocations isn't desirable in itself; I really wanted to achieve the full build graph using a Gradle Composite project with dependencies across `Task`s & `TaskRef`s. So far I've failed in this particular endeavour since Gradle's model proved frustratingly limiting in this area.
• Both devs were Senior, with native experience in both Android and iOS, which helped. We had little-to-no previous experience in React Native, but could consult a RN team whenever reassurance was needed.