Archive for October 11, 2021

Monday, October 11, 2021 [Tweets] [Favorites]

Firefox Can Now Fill Out PDF Forms

Mozilla (via JP):

Last year, during lockdown, many discovered the importance of PDF forms when having to deal remotely with administrations and large organizations like banks. Firefox supported displaying PDF forms, but it didn’t support filling them: users had to print them, fill them by hand, and scan them back to digital form. We decided it was time to reinvest in the PDF viewer (PDF.js) and support filling PDF forms within Firefox to make our users’ lives easier.

While we invested more time in the PDF viewer, we also went through the backlog of work and prioritized improving the accessibility of our PDF reader for users of assistive technologies. Below we’ll describe how we implemented the form support, improved accessibility, and made sure we had no regressions along the way.

This is not a full-featured PDF annotation editor, but it does let you fill in a form and save it as a new PDF file.


Simplifying Backwards Compatibility in Swift

Dave DeLong:

Every year as new OS and Swift versions are released, the question comes up over and over again: “how do I use this new thing while also supporting older versions?”. While we have a bunch of “availability” tools at our disposal (and I’ll be using them in this post), they always come across as somewhat cumbersome: we need to do inline checks, or we have conditional logic flow that obfuscates the intent of some of our code, and so on.


At first glance, this doesn’t look very useful; it’s a struct that holds a single value, and it doesn’t do anything. This is by design. Backport exists to serve as a holding space (namespace) for shims: the conditional code we must write in order to do proper availability checking.


Unfortunately, I have not come up with a good way to backport things like specific properties on SwiftUI’s EnvironmentValues, such as .headerProminence.

I have typically done this sort of thing by declaring prefixed category methods, but this technique lets you keep the original method name by adding a namespace.


Update (2021-10-19): Christian Tietze:

Behold: @davedelong’s Backport, but for cross platform SwiftUI

Update (2021-11-23): Jesse Squires:

If you are working on a multiplatform SwiftUI project, you will start accumulating #if os() checks and #if canImport() checks. Overtime, these start to accumulate and — in addition to being unsightly — they make your code much more difficult to read. When possible, I have started to encapsulate these preprocessor directives to improve code organization and readability.

Google Winds Down Material Design for iOS

Jeff Verkoeyen:

This year my team shifted the open source Material components libraries for iOS into maintenance mode.

Since 2012 and the original launch of Google Maps iOS, my team has supported the creation and maintenance of shared UI components across Google. This was originally born out of a need to fill gaps in UIKit’s design language.


With the introduction of SwiftUI and significant UIKit improvements in iOS 14+, it’s never been easier to build a great branded experience with a tiny amount of code.


The time we’re saving not building custom code is now invested in the long tail of UX details that really make products feel great on Apple platforms.

Via Charles Arthur:

I think the TL;DR of this thread is that Google apps on iOS will start looking like they were born on iOS in future, rather than looking like they’re from another planet.

Jason Snell:

This is good news. It’s good for Google’s developers, who no longer have to build that custom code. And more importantly, it’s good for people who use Google’s apps on iOS, because with any luck they’ll be updated faster, work better, and feel more like proper iOS apps, not invaders from some other platform.

Apple Appeals Anti-Steering Ruling in Epic Case

Jay Peters and Sean Hollister (PDF, tweet, MacRumors):

While Apple largely won that case (the company went so far as to call the ruling a “resounding victory”) with Judge Gonzalez Rogers ruling in favor of Apple in nine of the ten claims Epic brought against the company, it did lose in one important way: the judge found that Apple violated California’s anti-steering rules, and demanded that Apple let developers link to outside payment systems. That policy would have taken over in December, but it may be pushed out beyond that — and it seems that’s the point.


Apple claims that the new anti-steering rule is unnecessary because the company had already agreed to delete the offending section of its App Store Guidelines in the Cameron v. Apple settlement, but that’s news to us: at the time, Apple only agreed to “clarify” that app developers were allowed to communicate with consenting customers, not link to outside payment systems. That clarification was widely seen by developers as a red herring. At the time, Apple didn’t say anything about deleting a section of its App Store Guidelines entirely.