Engineering notes
Problems I have run into shipping mobile apps: POS hardware, AR, releases, state, real-time flows and the details that make an app dependable. Most were first shared on LinkedIn.
From a tap on the screen to a point in the room
A tap lands on flat glass. A tape measure needs a point in 3D space, in metres. This is how Span gets from one to the other.
The area formula I learned in school does not work on a wall
Shoelace area only works on a flat grid. Span measures floors and walls, so it needed Newell’s method, plus a few other lessons about 3D maths.
A camera measurement needs an honest ± range
A phone is not a tape. Span shows how far off each number could be, and getting that range right had its own bug.
Testing an AR app without AR
The iPhone simulator and Android emulator cannot run AR. Span hides AR behind one protocol and fakes a room, so everything else can be tested.
A crash that only a real iPhone could show
Span’s room scan passed every test, then crashed seconds after starting on my iPhone. The crash report led to a Swift 6 thread check.
SwiftUI layout lessons from matching a design
A page that grew wider than the phone, a white clock on a white screen and text that scaled twice. Small bugs, each with a rule behind it.
Drawing the design’s icons from their SVG paths
SF Symbols would have been easier but would not match. So Span reads the design’s SVG path data, and one lowercase letter nearly moved three icons.
The same button, two different OS rules
Camera permission and AR availability look identical in the design on both platforms. Underneath, iOS and Android follow different rules.
What changed when I rebuilt Span on Android
The maths ported over in a day. The rest needed different choices: raw OpenGL, photos as files, a hand drawn PDF and gravity pointing the other way.
Widgets are separate programs
A widget cannot open the app’s database or call its code. Building Span’s widgets on iOS and Android taught me how they actually get data.
When I changed the design on purpose
A design shows finished states. Building it shows the steps in between, and some of those needed changes the design did not have.
What React Native concepts become in Kotlin and Swift
State carried over quickly. The component names took me a couple of days, and a few ideas have no direct match.
Why my iPhone camera went black but the hand skeleton kept working
Everything worked on Android. On iPhone, the camera screen came back black after recording, with the skeleton still moving on top.
Printing images across Android app boundaries on POS hardware
The POS printer wanted a file path, and the file lived in a sandbox the printing app could not see.
Using Expo OTA updates on POS terminals
I had been rebuilding and reinstalling APKs for every change. The terminals only needed a new JavaScript bundle.
When a POS has a camera but no camera app
launchCameraAsync worked on my phone and failed on every new terminal. The hardware was there; the app to handle the intent was not.
What I learned upgrading from Expo SDK 55 to 57
Expected dependency bumps; got a lesson in component identity, hook naming and choosing what to upgrade into.
Measuring mobile performance with EAS Observe
Moving from “this feels fast” to launch times and time-to-interactive measured on real devices.
Separating server, persistent and interface state
Not every piece of state belongs in the same store. The question is who owns the truth.
Using Server-Sent Events for payment confirmation
Replacing polling with an event stream, so a trip becomes ready the moment payment is confirmed.
Crossing the React Native / native boundary intentionally
Cross-platform does not mean never writing native code. It means keeping the native surface small.
Why async workflows need more than isLoading
If a process continues after the first request finishes, it probably deserves a state machine.
Reliability is a user-facing mobile feature
Timeouts, retries and clear feedback made a field app feel dependable, which mattered more than looks.
Permission requests are product flows
Ask when the purpose is clear, explain a denial, and leave a way back to settings.
Deep linking is a coordination problem
When navigation depends on app state, “navigate now” is often the wrong instruction. “Navigate when ready” is better.
Debouncing is about more than reducing requests
Debouncing makes the system react to the input the user meant, not every keystroke on the way there.
Keep only the latest frame
A camera does not wait for your code. For live recognition, dropping old frames is the correct behaviour.
Not every crash can be caught
try/catch only sees errors in your own language’s runtime. A crash in native code ends the app before it gets there.
Debouncing, but for a hand
A recognition model changes its mind many times a second. The app has to decide when you actually meant a letter.
Your phone has more than one clock
Change the date on your phone and the wall clock moves with it. A learning streak needs a clock that cannot be moved.