This is my personal blog
  • After 11 years, I finally had Dr. Pepper again. So refreshing. Lots of college memories attached to this one.

    A can of Dr. Pepper (beverage)

  • macOS Development

    Today marks the first full month since I began work on a new app. I started it off last week (after 3 weeks of designing layouts for iOS and macOS) using the multi-platform app template in Xcode. I quickly realised the limitation, a pure SwiftUI view architecture would bring, so I switched it out for a traditional AppDelegate based system on both platforms.

    I decided to do something different time this. I had made a prototype app two years ago in my free time to test out the idea. I personally found it useful, showed it to a few friends & family and got feedback from them. So instead of starting off with the iOS app, I decided to first work on the Mac app instead.

    I wish I had known before how easy it was to get going. A lot of things I’ve learnt over the years with developing with UIKit obviously apply here, but some interesting bits like NSGridView, Bindings and representedObject on Windows and ViewControllers make life so much simpler. Why aren’t any of these things present in UIKit land? Especially bindings!

    representedObject is definitely something I plan to bring over to the iOS app vide a simple category on UIViewController. But NSGridView and Bindings are not things I plan to implement myself. I don’t think there is a potential use-case for the grid view either, but I would love to have bindings. And before any one says it, Combine is not the same thing.


    A footnote I wanted to include is how much simpler things are for me with Swift. I still love using Objective-C where ever it makes sense now, but this project so far is all Swift. Elytra is a healthy mix of both and I don’t see myself fully replacing ObjC in it anytime soon.


    This post is absolutely not in response to the recent “Electron apps” thing going on on Twitter. Things just happened to coincide and that’s it. I think. ☺️

  • Some gorgeous displays at my MIL’s garden. 98293E50-FA8C-4B72-82B5-FF7F9BB210D2.jpg 75A7BE9B-8DD4-4F82-A7A9-F8DB214D2128.jpg D49549E6-5A52-4A3C-A449-7E06FAC759AE.jpg 1146E53C-4C25-4CA8-8500-5D270BFE7D16.jpg

  • Back when I first started working on Elytra (circa 2016), I realised that an iOS bug caused a UIScrollView to incorrectly adapt to changing the contentInsets at runtime.

    I was able to figure this out, a workaround and as usual, a closed radar.

    This bug remained present up until iOS 14.5 and with the addition of additionalSafeAreaInsets, the workaround became simpler.

    However, with iOS 15, the bug was patched either in Beta 1 or 2 and caused the entire Article Reader to go bonkers! I had no clue what happened.

    I was clueless because I forgot to add comments to my workaround about the bug. I looked through the entire Article Reader codebase trying to figure out what happened here. I’ve so far spent 4 days trying to figure this out.

    Until a few minutes ago when it just dawned on my stupid *** what was happening. I’m not exaggerating. Disabling my workaround makes everything work as expected albeit needing minor adjustments.

    What I’m trying to outline here is: Always add comments about the bug, a link to the bug tracker issue, a note about the workaround you’re employing and how it works.

    I personally also prefer mentioning the iOS version or the SDK version I’m building with so I can check whenever a new SDK version is out if the workaround is still necessary.

  • Xcode Cloud + SharePlay

    I’ve been thinking of how Xcode Cloud and SharePlay could play together to bring local iOS programming and simulation to iPads.

    You write all code locally, commit to a hosted (by Apple) git repo, your app is built and then streamed from a remote device of your choice, back to your local device.

    SharePlay seems like the kind of tech which is similar in nature to what some of the streaming gaming services do (eg. Stadia, Xcloud, Geforce Now, etc). So it should be feasible.

    Apple was very clear with their communication: Xcode Cloud will go into production later next year. That gives them enough time to iron out all the edges of building apps in the cloud, then streaming them down to our local devices.

  • For my first day off work tomorrow, I was thinking I’ll make a shareable flight plan of all the forts in Maharashtra for FlightSim2020.

    I don’t know if the game maps even have that data but it’s worth a shot.

  • Today is my last day at my current company.

    Today is also my first day as a partially vaccinated individual.

    I’d be all 🥳 about it if I didn’t have this mild fever. Tomorrow then.

  • Shot using Halide (manual focus, RAW) on an iPhone 12, edited with Snapseed. 9E081A7B-041C-426B-B92B-C8D0674E753A.jpg

  • I edited a photo today after several months. My teacher from college is doing a session sometime later this week and this is the exercise.

    I’m guessing he shot the photo somewhere near Salt Lake City given the landscape.

    Being stuck at home for over a year, and then editing a wide landscape shot: Feels so good.

  • This is going to be my first year at WWDC where I will understand most presentations. 

    Since the last few years, most of the presentations at WWDC involved Swift code (unless it’s about Metal, or any of the Core Frameworks). 

    I had take screenshots, try and understand what’s happening and translate it to Objective-C. 

    Not anymore! I’m now a bilingual Apple Platforms Developer 🥳 and I’ll be able to follow along just like most of you all. 

    I’m very excited for WWDC this year. Let’s get going!