Josh Pyles

@joshpyles
61 Followers
93 Following
48 Posts
iOS at Linear. Creator of TinyPoll. Formerly at Substack, Cocoon, and more.

Here's a fun JavaScriptCore quirk. When JavaScriptCore calls into your Swift functions with optional params, they will always receive a value, even if the caller didn't actually pass the argument, or if called with a different type.

For example, with a string param you'd get a value like "undefined" instead of nil.

Under the hood it seems to just cast whatever is passed into the expected Swift type. Safer to just use JSValue for all your parameters.

glassEffect() 👀
Something exciting is coming soon! https://linear.app/mobile
Linear Mobile – Available for iOS and Android

Move product work forward, no matter where you are. Available for iOS and Android.

I wanted to use the new #Preview macro for a UIViewController, but assumed I couldn't because it's limited to iOS 17+. Turns out you can fix this by just adding an @available directive above the macro.