Archive for February 16, 2024

Friday, February 16, 2024

The SwiftUI Field Guide

Chris Eidhof:

We built this website to visually explain how the SwiftUI layout system works, and we hope you find it useful.

To make the examples work, we ported large parts of SwiftUI’s layout system to TypeScript. While we’ve tested our implementation extensively, there might still be discrepancies between SwiftUI’s behavior and what you see here.

Christian Tietze:

As a resource to learn, the approximations are more than good enough. They are excellent and by virtue of being interactive, they are also much better to get a feeling for everything than the SwiftUI documentation’s images can ever be. There’s only so much an API documentation can teach you before you need to observe how it really behaves.

Since it’s in a browser, the preview is of course even faster than Xcode Previews would be, and without the crashes. (Oh, the crashes …)

Update (2024-02-20): Chris Eidhof:

There are so many little fun details in there: the site changes color when you’re in dark mode (and the “SwiftUI” colors change, too). The code is formatted using a pretty printer, making it responsive on mobile (this isn’t perfect, but in most examples it is better than doing nothing). The more complex animations are done in “SwiftUI”.

Update (2024-03-07): Helge Heß:

I think it is still worth mentioning “The SwiftUI Lab” site, which also has a great set of articles about SwiftUI. E.g. alignment guides.

Meta to Pass Along Fee for Boosted Posts


To support the millions of small businesses that use boosted posts on Facebook and Instagram, advertisers can now go to and on mobile and desktop to boost their content and avoid a 30% Apple service charge.

The Apple service charge is a result of updates Apple made to the App Store Review Guidelines. Starting later this month, when an advertiser uses the Facebook or Instagram iOS app to Boost a post, they will be billed through Apple, which retains a 30% service charge on the total ad payment, before any applicable taxes. This service charge is retained by Apple, not Meta.

In other words, they are charging extra if the payment is processed by Apple, passing Apple’s fee along to the customer. You can avoid the fee by purchasing on the Web, but they probably aren’t allowed to tell you that in the app.

We are required to either comply with Apple’s guidelines, or remove boosted posts from our apps. We do not want to remove the ability to boost posts, as this would hurt small businesses by making the feature less discoverable and potentially deprive them of a valuable way to promote their business.


Another change happening as a result of Apple’s update is that advertisers will need to go through a different payment process when boosting posts through the Facebook and Instagram iOS apps. Unlike the previous experience, where advertisers were charged after their boosted posts ran, businesses on iOS will now be required to pay in advance, and add prepaid funds to their account to draw from to boost a post.

Joe Rossignol:

“We have always required that purchases of digital goods and services within apps must use In-App Purchase,” said Apple, in a statement shared with MacRumors today. “Boosting, which allows an individual or organization to pay to increase the reach of a post or profile, is a digital service — so of course In-App Purchase is required. This has always been the case and there are many examples of apps that do it successfully.”

As Rossignol points out, Apple loves to say stuff like this even when it clearly isn’t true so that they can pretend they’ve never raised any fees. Meta has been selling boosts for years without paying this fee, which is why Apple updated the rules in 2022 to say that the policy was changing. The statement above is the exact same one they offered to the press at that time. If boosting has always required a fee, why did Phil Schiller testify in the Epic trial that Apple had never taken a cut of ad revenue? The bottom line is that Apple changed the rules and gave Facebook a special temporary exception that was not available to other developers.


iOS 17: Assistive Access

Mike Rockwell:

Assistive Access gives you a simplified, focused interface with access to only the apps and features you choose to enable. It was designed for people with cognitive disabilities, but there are plenty of other uses.


Some applications are built with Assistive Access in mind. Those applications offer an entirely different user interface than what you get from the app in the traditional iOS Home Screen experience. I wish that there was an option to just use the non-Assistive Access version of each app.


Lastly, it doesn’t seem that there is a way to use Bluetooth or AirPlay speakers at all while in Assistive Access.

It’s kind of like At Ease for iOS.


U.S. Internet Leaked Years of E-mails

Brian Krebs:

The Minnesota-based Internet provider U.S. Internet Corp. has a business unit called Securence, which specializes in providing filtered, secure email services to businesses, educational institutions and government agencies worldwide. But until it was notified last week, U.S. Internet was publishing more than a decade’s worth of its internal email — and that of thousands of Securence clients — in plain text out on the Internet and just a click away for anyone with a Web browser.


Hold Security founder Alex Holden said his researchers had unearthed a public link to a U.S. Internet email server listing more than 6,500 domain names, each with its own clickable link.

Drilling down into those individual domain links revealed inboxes for each employee or user of these exposed host names. Some of the emails dated back to 2008; others were as recent as the present day.

I’ve never seen anything like this.


On the Insecurity of Software Bloat

Bert Hubert (via Hacker News):

The really short version: the way we build/ship software these days is mostly ridiculous, leading to 350MB packages that draw graphs, and simple products importing 1600 dependencies of unknown provenance. Software security is dire, which is a function both of the quality of the code and the sheer amount of it. Many of us know the current situation is untenable. Many programmers (and their management) sadly haven’t ever experienced anything else. And for the rest of us, we rarely get the time to do a better job.

In this post I briefly go over the terrible state of software security, and then spend some time on why it is so bad. I also mention some regulatory/legislative things going on that we might use to make software quality a priority again. Finally, I talk about an actual useful piece of software I wrote as a reality check of the idea that one can still make minimal and simple yet modern software.

I hope that this post provides some mental and moral support for suffering programmers and technologists who want to improve things. It is not just you, we are not merely suffering from nostalgia: software really is very weird today.

Niklaus Wirth:

Reducing complexity and size must be the goal in every step—in system specification, design, and in detailed programming. A programmer's competence should be judged by the ability to find simple solutions, certainly not by productivity measured in “number of lines ejected per day.” Prolific programmers contribute to certain disaster.


With Project Oberon we have demonstrated that flexible and powerful systems can be built with substantially fewer resources in less time than usual. The plague of software explosion is not a “law of nature.” It is avoidable, and it is the software engineer’s task to curtail it.

See also: Bert Hubert (via Bruce Schneier).


Update (2024-02-20): See also: Hacker News.