Thursday, June 8, 2023

Apollo Shutting Down June 30th

Christian Selig (tweet, Mastodon, Hacker News, MacRumors):

I’ve talked to a lot of people, and come to terms with this over the last weeks as talks with Reddit have deteriorated to an ugly point, and in the interest of transparency with the community, I wanted to talk about how I arrived at this decision[…]

[…]

Another common claim by Reddit is that Apollo is inherently inefficient, using on average 345 requests per day per user, while some other apps use 100. I’d like to use some numbers to illustrate why I think this is very unfairly framing it.

[…]

Hopefully that illustrates why, even more than the large price associated with the API, the 30 day timeline between when the pricing was announced and developers will be charged is a far, far, far bigger issue and not one I can overcome. Much more time would be needed to overhaul the payment model in my app, transition existing users from existing plans, test the changes, and have users update to the new version.

[…]

I was assured this year by Reddit not even that long ago that no changes were planned to be made to the API Apollo uses, and I’ve made decisions about how to monetize my business based on what Reddit has said.

Jason Snell:

Apparently in a conversation with moderators, Reddit CEO Steve Huffman alleged that Selig was attempting to threaten the company into paying him millions of dollars. Unfortunately for Huffman, Selig has receipts—namely recordings of all his dealings with Reddit.

I gotta be honest, this Huffman guy sure looks like a lying creep, and all of Reddit’s public statements about honoring third-party apps seem like an attempt to lie to Redditors so they don’t look like the bad guys.

Quinn Nelson:

I speak with Christian Selig (former Apple intern turned star indie dev) on why and how Apollo’s $20M API maintenance fees are a no-go and how Reddit’s changes will make the site worse for everyone.

Toptomcat (Hacker News):

Reddit announced they were raising the price to make calls to their API from being free to a level that will kill every third party app on Reddit, from Apollo to Reddit is Fun to Narwhal to BaconReader.

Even if you’re not a mobile user and don’t use any of those apps, this is a step toward killing other ways of customizing Reddit, such as Reddit Enhancement Suite or the use of the old.reddit.com desktop interface .

This isn’t only a problem on the user level: many subreddit moderators depend on tools only available outside the official app to keep their communities on-topic and spam-free.

[…]

On June 12th, many subreddits will be going dark to protest this policy.

Mark Hughes:

When a site tells you they don’t want you using it, except by their captured clients, you should stop using it. All they want is to control you and put ads in your eyeballs, until you explode.

That happened for me years ago with Twitter. It happened before that with MySpace; I know it sounds like a joke now, but if you liked music and web design, MySpace was a fantastic place to meet people. And before that, there was LiveJournal; now owned by Russian criminals. Reddit came out of Digg being fed into a woodchipper just because Kevin Rose wanted a little bit of money. I dunno what keeps a billion people trapped in Facebook, but they’ve never had open clients, those people like being property.

Previously:

iCloud Drive Now Supports File Versions

Howard Oakley:

In almost all cases, ‘cloning’ a volume also loses all versions in the Document Revisions database, unless the method of duplication creates an absolutely identical copy, with the same inodes and file system.

iCloud is more complicated. There was a time when it didn’t support versions at all, then it started to support them but had some serious bugs making them unreliable. Those have been gradually resolved, and iCloud Drive now effectively keeps its own Document Revisions database, making versions available to all Macs and devices accessing them.

Previously:

The Rust I Wanted Had No Future

Graydon Hoare (Hacker News):

This is maybe not clear enough, and it might make the question of whether the project “really should have had a BDFL” a little sharper to know this: the Rust We Got is many, many miles away from The Rust I Wanted.

[…]

I wanted crates to allow inlining inside but present stable entrypoints to the outside. Swift wound up close to here, it’s a huge technical headache but failure to do so is also a big part of Rust’s terrible compile times and lack of a stable ABI. I resisted this at the time and have objected to the choice ever since. It’s likely necessary in today’s Rust given the next point though.

[…]

Another thing that’s great to have a compiler open-code is an integer type that overflows to an owned or refcounted bignum type: shipping enough stuff to let this happen efficiently in libraries is a huge pain (even if you get as far as stable inline assembly it won’t go as fast as doing it in the compiler) and .. Rust just decided not to. I wanted it to, but I lost. Integers overflow and either trap or wrap. Great. Maybe in another decade we can collectively decide this is also an important enough class of errors to catch?

[…]

Tail calls. I actually wanted them! I think they’re great. And I got argued into not having them because the project in general got argued into the position of “compete to win with C++ on performance” and so I wound up writing a sad post rejecting them which is one of the saddest things ever written on the subject.

[…]

The priorities I had while working on the language are broadly not the revealed priorities of the community that’s developed around the language in the years since, or even that were being-revealed in the years during. I would have traded performance and expressivity away for simplicity -- both end-user cognitive load and implementation simplicity in the compiler -- and by doing so I would have taken the language in a direction broadly opposed to where a lot of people wanted it to go.

Network Path Monitoring

Keith Harrison:

In iOS 11, Apple recommended you stop using the reachability API to check network availability before attempting a connection. Instead you configure a URLSession to wait for connectivity.

The wait for connectivity model works better for creating connections but I still sometimes want to show the user a network status indicator.

[…]

Apple released the Network framework in iOS 12, macOS 10.14. It includes a NWPathMonitor that is now the preferred way to monitor changes to network status. The three steps to monitor network changes[…]

Wednesday, June 7, 2023

Stage Manager in iPadOS 17 Beta

Federico Viticci:

Apple listened to feedback about Stage Manager and – at least so far – implemented the key improvements I wanted to see. I’ve been using Stage Manager on my iPad Pro since yesterday afternoon, and I even tested it on a portable external display that I brought with me for this trip. If this early, limited experience is of any indication, I think I’m going to be happy with Apple’s revised version of Stage Manager for iPad by the end of the summer. But then again, caution is necessary given how last year’s beta evolved over time.

[…]

Based on what I’ve seen so far, Stage Manager for iPad is still based on different size classes for apps, which means that when you resize a window, you’re effectively choosing from a list of invisible presets that control how small or big a window can be and how its contents are laid out. However, compared to iPadOS 16, it feels to me as if the process of resizing a window is smoother and more lenient than before. You still see a window “blink” as it gets resized, but I’m under the impression that there are more “intermediate steps” when it comes to the sizes you can choose from. I understand why resizing an iPad app cannot be as pixel-precise as resizing a Mac one, but as long as Apple figures out a system to make layouts more flexible given the limitations of iPadOS, I’m good with that.

There’s even better news on the window placement front: unlike the original Stage Manager, you can now almost freely place windows anywhere and make them overlap as much as you want if necessary. The “almost” part is necessary since I believe there is still a rail-based system underneath Stage Manager, but in iPadOS 17, it’s like those rails have gotten way denser than iPadOS 16, giving you a lot more options for placing a window somewhere and making it stay there.

Previously:

Public Developer Betas

Juli Clover (Slashdot, Hacker News):

Apple’s developer betas have historically been limited to developers who have a paid account that costs $99 per year, but with the launch of the most recent betas, that’s changing.

Anyone can now enroll in the free version of the Apple Developer program and get access to beta releases. All that’s required to download betas is an Apple ID.

I don’t see how this now differs from the public beta, which also required signing in.

Howard Oakley:

With the annual resurgence of interest in running macOS betas, this article considers how you can run a developer or public beta-release of macOS on an Apple silicon Mac.

[…]

Now, that Mac has to be connected using the Apple ID registered with the beta programme; for developer betas, that’s the Apple ID by which you’re recognised as a developer. You should then be able to opt for Beta Updates in Software Update, in System Settings > General. Click on the Info tool on that line, and select the beta you want to install. You can also use that to connect using an Apple ID specifically for betas.

I ran into trouble when I instead signed into my Mac as a whole using my developer Apple ID.

Running macOS in a lightweight virtual machine (VM) on Apple silicon is free, simple, and performs at close to native speeds. Although it has some significant limitations, notably no iCloud access and App Store apps (and others depending on your Apple ID) can’t run in the VM[…]

Previously:

Tablet Standby

Mysk:

“Over a month of standby” This is how Apple used to market the iPad’s battery. Today, the iPad runs several background processes while in standby. My HomeKit experiment clearly shows that. I achieved 20 days of standby on my iPad Pro. Without disabling Home the battery would have died after a week.

I doubt I would even get a week on my iPad Air. If I don’t leave it plugged in, it’s always dead when I reach for it.

It’s not great with my Kindle, either, unless I put it in Airplane Mode. Then the battery life is amazing.

For iPad, I think the available settings don’t really match how I use it. I don’t want to turn off Background App Refresh because then apps will be out-of-date when I’m actively using it. But I don’t want them constantly doing stuff when the iPad is “off,” either. I think what I’d like is for it to automatically go into Airplane Mode when I turn off the screen.

Previously:

Swift’s Upcoming Feature Flags

James Dempsey:

The idea of being able to adopt upcoming changes sooner rather than later is a good one. However, adding an ever-increasing number of separate compiler flags for each upcoming feature does not scale well.

To address this, Swift evolution proposal SE-0362, implemented in Swift 5.8, details a generalized mechanism for enabling upcoming features.

[…]

SE-0362 also introduces a new hasFeature() compilation condition that checks whether a feature is enabled. This allows you to write code that uses a feature if present or uses alternate code if not present.

Previously:

Tuesday, June 6, 2023

WWDC 2023 Links

General:

What’s New:

Release Notes:

Key Sessions:

Written Coverage:

Podcasts:

Other:

This post will be updated as I find new links. If you see anything good that I missed, please tweet, toot, or e-mail me.

Previously:

tvOS 17 Announced

Apple (MacRumors):

With tvOS 17, FaceTime comes to Apple TV 4K, so users — for the first time ever — can enjoy the popular app on their TV for even more engaging conversations with family and friends. tvOS 17 also introduces an all-new Control Center, along with other enhancements that provide a more personalized experience that works even better with iPhone.

[…]

Center Stage keeps everyone in the room perfectly framed on the screen, even as they move around, while new gesture-based reactions allow callers to use their hands to generate onscreen effects, such as hearts or fireworks, and add even more fun to the conversation. The introduction of Split View for Apple TV lets users enjoy watching shows or movies with their loved ones during a SharePlay session while also seeing everyone on the FaceTime call.

[…]

Later this year, video conferencing apps like Webex by Cisco and Zoom will launch on tvOS, bringing their communications capabilities to Apple TV 4K.

[…]

In addition, when using the remote on iPhone to wake up and control Apple TV, users will be automatically switched to their profile, ensuring they have access to their recently watched shows and personalized recommendations.

Xcode 15 Announced

Apple:

Discover the latest productivity and performance improvements in Xcode 15. Explore enhancements to code completion and Xcode Previews, learn about the test navigator and test report, and find out more about the streamlined distribution process. We’ll also highlight improved navigation, source control management, and debugging.

See also: Download, Release Notes, Update.

Previously:

Monday, June 5, 2023

Apple Vision Pro

Apple (MacRumors, Hacker News, ArsTechnica, Slashdot):

Apple today unveiled Apple Vision Pro, a revolutionary spatial computer that seamlessly blends digital content with the physical world, while allowing users to stay present and connected to others. Vision Pro creates an infinite canvas for apps that scales beyond the boundaries of a traditional display and introduces a fully three-dimensional user interface controlled by the most natural and intuitive inputs possible — a user’s eyes, hands, and voice. Featuring visionOS, the world’s first spatial operating system, Vision Pro lets users interact with digital content in a way that feels like it is physically present in their space. The breakthrough design of Vision Pro features an ultra-high-resolution display system that packs 23 million pixels across two displays, and custom Apple silicon in a unique dual-chip design to ensure every experience feels like it’s taking place in front of the user’s eyes in real time.

[…]

Apple Vision Pro enables users to be even more productive, with infinite screen real estate, access to their favorite apps, and all-new ways to multitask. And with support for Magic Keyboard and Magic Trackpad, users can set up the perfect workspace or bring the powerful capabilities of their Mac into Vision Pro wirelessly, creating an enormous, private, and portable 4K display with incredibly crisp text.

[…]

Apple Vision Pro has an all-new App Store where users can discover apps and content from developers, and access hundreds of thousands of familiar iPhone and iPad apps that run great and automatically work with the new input system for Vision Pro.

[…]

When a person approaches someone wearing Vision Pro, the device feels transparent — letting the user see them while also displaying the user’s eyes. When a user is immersed in an environment or using an app, EyeSight gives visual cues to others about what the user is focused on. […] Users with vision correction needs will use ZEISS Optical Inserts to ensure visual fidelity and eye tracking accuracy.

[…]

Apple Vision Pro starts at $3,499 (U.S.), and will be available early next year on apple.com and at Apple Store locations in the U.S., with more countries coming later next year.

Previously:

Update (2023-06-06): See also:

Update (2023-06-07):

watchOS 10 Announced

Apple (MacRumors, Hacker News):

Apple today previewed watchOS 10, bringing Apple Watch users a fresh approach to quickly view information with redesigned apps, a new Smart Stack to show relevant widgets right when they’re needed, and delightful new watch faces. New metrics, Workout Views, and Bluetooth connectivity for power meters, speed sensors, and cadence sensors arrive for cyclists, while new Compass Waypoints and Maps capabilities further help hikers. The Mindfulness app offers additional tools to support mental health.

[…]

With watchOS 10, Compass automatically generates two new waypoints: A Last Cellular Connection Waypoint will estimate the last place with cellular reception, which may be useful for checking messages or making a call. In case of emergencies, a Last Emergency Call Waypoint will estimate where on the route their device had the last connection to any available carrier’s network so that an emergency call can be made.

When preparing routes, a new Elevation view uses altimeter data, offering a three-dimensional view of saved waypoints. And starting in the U.S., Apple Maps displays a new topographic map featuring contour lines, hill shading, elevation details, and points of interest.

Previously:

Update (2023-06-06): Filipe Espósito:

This means that every Apple Watch model that runs watchOS 9 will be able to run watchOS 10. Of course, it also requires a paired iPhone running iOS 17.

Update (2023-06-07): Dan Moren:

watchOS 10 got perhaps the biggest overhaul, not only changing fundamental ways that users interact with the device, but also how information is presented on the wearable.

Some of this information was shown off during the keynote, but the WWDC session Meet watchOS 10 goes into more detail about how the Apple Watch’s design language is changing—and make no mistake, this is a major change.

macOS 14 Sonoma Announced

Apple (MacRumors, Hacker News, ArsTechnica, Slashdot):

Stunning screen savers and powerful widgets unlock an entirely new way to personalize. Users can now place widgets right on the desktop, interact with them with just a click, and through the magic of Continuity, access the extensive ecosystem of iPhone widgets on their Mac. In macOS Sonoma, video conferencing also gets more engaging with great new features to help users present remotely, like Presenter Overlay, which places a presenter on top of the content being shared, and Reactions, which enables fun gesture-triggered video effects in cinematic quality. Significant updates come to Safari, taking the web experience to the next level. Profiles keeps browsing separate between multiple topics or projects, and web apps provide faster access to favorite sites. And gaming gets even better, with the introduction of Game Mode, exciting new titles, and a new game porting toolkit that makes it even easier for developers to bring more games to Mac.

Joe Rossignol (Hacker News):

macOS Sonoma drops support for 2017 models of the iMac and MacBook Pro, as well as the final 12-inch MacBook model.

Previously:

Update (2023-06-06): Nick Heer:

MacOS Sonoma drops support for the 2017 iMac, which was the latest model when I bought it just over four years ago.

Howard Oakley:

Of the seven versions of Intel Macs that don’t have T2 chips, and are supported by macOS Ventura, only one, iMac 2019 (iMac19,x), has official Sonoma support.

Filipe Espósito:

When you choose one of these wallpapers, it’s shown as a static image on the Desktop. But as soon as your Mac enters the Lock Screen, the wallpaper moves as an aerial screen saver. When you unlock the Mac, it smoothly stops moving and stays frozen in that frame.

Chance Miller:

Here’s a rundown of the new features in macOS Sonoma that are only available to Apple Silicon users, not users with an Intel-powered Mac.

iPadOS 17 Announced

Apple (MacRumors):

Apple today previewed iPadOS 17, delivering entirely new ways for users to personalize the Lock Screen and interact with widgets. Working with PDFs is easier with AutoFill, which intelligently identifies and fills fields in forms, and Notes brings a new experience for marking up and collaborating on PDFs. Messages gets significant updates, including a new stickers experience, and users can now leave FaceTime video and audio messages. The Health app comes to iPad with interactive charts, and HealthKit enables developers to create innovative experiences designed for the iPad display.

Previously:

Update (2023-06-06): Ben Lovejoy:

You can install iPadOS 17 on all of the following models[…]

iOS 17 Announced

Apple (MacRumors, Hacker News):

The Phone app is central to the iPhone experience, and it receives a big update with personalized Contact Posters, providing a new way for users to express themselves. […] Live Voicemail gives users the ability to see real-time transcription as someone leaves a voicemail, and the opportunity to pick up while the caller is leaving their message.

[…]

[Messages] Search gets more powerful and precise with search filters, making it possible for users to start a search and add additional filters to narrow down the results and find exactly what they are seeking. […] Messages also introduces Check In, an important feature for when a user wants to notify a family member or friend that they have made it to their destination safely.

[…]

Autocorrect receives a comprehensive update with a transformer language model, a state-of-the-art on-device machine learning language model for word prediction — improving the experience and accuracy for users every time they type.

[…]

iOS 17 introduces StandBy, giving users a full-screen experience with glanceable information designed to be viewed from a distance when iPhone is on its side and charging.

[…]

Journal is a new app that helps iPhone users reflect and practice gratitude through journaling, which has been shown to improve wellbeing.

Previously:

Update (2023-06-06): Filipe Espósito:

Unfortunately, iOS 17 requires the A12 Bionic chip or later. This means that iPhone 8, iPhone 8 Plus, and iPhone X won’t get the update.

Apple M2 Ultra

Apple (MacRumors, Hacker News, Slashdot):

M2 Ultra is built using a second-generation 5-nanometer process and uses Apple’s groundbreaking UltraFusion technology to connect the die of two M2 Max chips, doubling the performance. M2 Ultra consists of 134 billion transistors — 20 billion more than M1 Ultra. Its unified memory architecture supports up to a breakthrough 192GB of memory capacity, which is 50 percent more than M1 Ultra, and features 800GB/s of memory bandwidth — twice that of M2 Max. M2 Ultra features a more powerful CPU that’s 20 percent faster than M1 Ultra, a larger GPU that’s up to 30 percent faster, and a Neural Engine that’s up to 40 percent faster. It also features a media engine with twice the capabilities of M2 Max for blazing ProRes acceleration.

Previously:

Mac Pro 2023

Apple (MacRumors, Hacker News):

Mac Pro, now featuring M2 Ultra, combines the unprecedented performance of Apple’s most powerful chip with the versatility of PCIe expansion. Mac Pro is up to 3x faster than the previous-generation Intel-based model. Featuring up to 192GB of unified memory, Mac Studio with M2 Ultra and Mac Pro have far more memory than the most advanced workstation graphics cards, taking on demanding workloads other systems can’t even process. The new Mac Pro completes the Mac transition to Apple silicon and, together with the rest of Apple’s pro systems, gives users the most powerful and capable lineup of pro products Apple has ever offered.

[…]

The wide array of connectivity in Mac Pro gets even better with eight built-in Thunderbolt 4 ports — six on the back and two on the top — which is twice as many as before. It supports up to six Pro Display XDRs, along with Wi-Fi 6E and Bluetooth 5.3, which come to the new Mac Pro for fast wireless connectivity. Additionally, Mac Pro includes three USB-A ports, two higher-bandwidth HDMI ports that support up to 8K resolution and up to 240Hz frame rates, two 10Gb Ethernet ports, and a headphone jack that enables the use of high-impedance headphones.

[…]

Available in both tower and rack-mounted enclosures, Mac Pro (Tower Enclosure) starts at $6,999 (U.S.) and $6,599 (U.S.) for education. Mac Pro (Rack Enclosure) starts at $7,499 (U.S.) and $6,999 (U.S.) for education.

There’s no quad chip, and the RAM and GPU are no longer upgradeable.

Juli Clover:

Following the introduction of the Apple silicon Mac Pro, Apple today added SSD upgrade kits to its online store. The kits offer 2TB, 4TB, and 8TB of storage space for $1,000, $1,600, and $2,800, respectively.

Previously:

Update (2023-06-06): Stephen Hackett:

However, it also comes with all the downsides of being an SoC. Gone is the 1.5 TB RAM limit of the 2019 Mac Pro, but more importantly, gone is the ability to add RAM after purchase. The same thing goes for upgrading the GPU.

The truth in 2023 is that Mac Pro you buy today will be the same core machine in five years, and that’s just not something we’re used to seeing when it comes to this machine.

[…]

Several of us who cover Apple have heard that there are those inside the company that did not want this machine to see the light of day, believing the Mac Studio to be enough to hold down the high-end of the Mac line. Seeing the machine that Apple announced this week, I think they may eventually get their way.

Update (2023-06-07): Nick Heer:

And, if you do choose to compare this Mac Pro to the Intel model it replaces, there are some changes which are difficult to swallow. It is $1,000 more expensive than the one it replaces. The outgoing model was endlessly upgradeable with dedicated video encoding hardware, graphics processors, and up to 1.5 terabytes of memory. The M2 Mac Pro appears to support none of those things. Apple has tried to preempt criticism by claiming this version effectively has the power of seven Afterburner video encoding cards built in, but there are no known differences between the M2 Ultra in the Pro and the one in the Studio. Even its PCIe slots are being marketed for comparatively less demanding workflows:

Mac Studio 2023

Apple (MacRumors, Hacker News):

Mac Studio empowers pros to build the studio of their dreams with its groundbreaking performance and extensive connectivity in a compact form that lives right on their desks. With M2 Max and M2 Ultra, the new Mac Studio provides a big boost in performance versus the previous generation and a massive leap for users coming from older Macs. Mac Studio with M2 Max is up to 50 percent faster than the previous-generation Mac Studio4 and 4x faster than the most powerful Intel-based 27-inch iMac.

[…]

[Mac Studio with M2 Ultra] features a 24-core CPU, up to a 76-core GPU, and up to 192GB of memory with 800GB/s of unified memory bandwidth for workstation-class performance.

[…]

Mac Studio now has higher-bandwidth HDMI, enabling up to 8K resolution and 240Hz frame rates. With M2 Ultra, Mac Studio supports up to six Pro Display XDRs — driving over 100 million pixels — allowing for a vast amount of screen real estate for pro workflows. Additionally, it now features advanced built-in wireless technologies. Wi-Fi 6E delivers download speeds that are up to twice as fast as the previous generation, while Bluetooth 5.3 allows users to connect to the latest Bluetooth accessories. On the back, Mac Studio includes four Thunderbolt 4 ports, a 10Gb Ethernet port, an enhanced HDMI port, and two USB-A ports. It also conveniently has two USB-C ports and an SD card slot on the front to easily import photos and video.

[…]

Mac Studio starts at $1,999 (U.S.) and $1,799 (U.S.) for education.

Previously:

MacBook Air 15-inch 2023

Apple (MacRumors, Hacker News):

With an expansive 15.3-inch Liquid Retina display, the incredible performance of M2, up to 18 hours of battery life, and a silent, fanless design, the new MacBook Air brings power and portability — all in the world’s thinnest 15-inch laptop. With an all-new six-speaker sound system, the 15-inch MacBook Air delivers immersive Spatial Audio, along with a 1080p FaceTime HD camera, MagSafe charging, and the power and ease of macOS Ventura for an unrivaled experience.

[…]

The 15-inch MacBook Air with M2, available in midnight, starlight, silver, and space gray, starts at $1,299 (U.S.) and $1,199 (U.S.) for education.

The display is 2,880×1,864, which is up from 2,560×1,664 for the 13-inch MacBook Air, but down from 3,024×1,964 for the 14-inch MacBook Pro. On the one hand, this seems disappointing in that, as with the 14-inch iBook, it seems to be more about making things look larger, rather than showing more. However, now that we have Retina displays, you will in practice be able to choose a larger scaled resolution with the 15-inch MacBook Air than the 14-inch MacBook Pro and still be able to read it, even though it may not look as sharp.

Previously:

Friday, June 2, 2023

WWDC 2023 Preview

Hartley Charlton:

Apple is overtly teasing the start of “a new era” and the ability to “code new worlds” at WWDC this year, building anticipation around the widely expected announcement of its mixed-reality headset.

Apple:

Activities are now open for sign-up for eligible developers. Designed to connect you with the developer community and Apple experts, they’ll feature Q&As, Meet the Presenters, and community icebreakers in online group chats.

Paul Hudson:

There are lots of events happening in and around Cupertino, along with other events happening around the world. Most in-person events require tickets, and are likely to sell out quickly.

Jordan Morgan:

Our favorite conference is here, which means that the ninth annual edition of the Swiftjective-C W.W.D.C. Pregame Quiz is ready to go!

MartianCraft:

Below, we share some of our talented staff’s thoughts about and predictions for WWDC and the transformative impact the forthcoming announcements might have on the industry.

Marco Arment:

Great things to do THIS week instead of next:

  • Prepare test devices with a test Apple ID to run the betas
  • Decide which devices will stay on iOS 16/watchOS 9/etc. (keeping in mind that Watches cannot downgrade!)
  • Start wearing your test watch to collect health data if applicable (thx @_Davidsmith)
  • Create a new version of your app in App Store Connect, and get its first build through TestFlight approval, so you can quickly issue another build next week if beta 1 breaks your app

Stephen Hackett:

Here are the rest of my picks on the show[…]

David Price:

Just like last year’s iPhone event, by an amazing coincidence, we’ve again stumbled across Tim Cook’s video script for Monday morning’s keynote presentation and of course, we’re going to share it all with you.

There are also a variety of books on sale, from:

See also: Who’s Going to WWDC23? and WWDC23 Keynote Bingo.

Previously:

A Vision for Using C++ From Swift

John McCall:

I’m pleased to announce that the Language Steering Group has accepted a vision document entitled Using C++ from Swift.

[…]

It is a companion to the previously-accepted vision document Using Swift from C++; together these two visions lay out a technical vision for how Swift can interoperate with C++.

Using C++ from Swift:

Swift’s memory safety is a major feature of its design, and C++’s lack of safety is a major defect. If C++’s unsafety is fully inherited when using C++ APIs from Swift, interoperability will have made Swift a worse language, and it will have undermined one of the reasons to migrate to Swift in the first place. But Swift must also make C++ APIs feel natural to use and fit into Swift’s strong language idioms. Often these goals coincide, because the better Swift understands how a C++ API is meant to be used, the more unsafety and boilerplate it can eliminate from use sites. If the Swift compiler does not understand how to import an API safely or idiomatically, it should decline to import it, requesting more information from the user (likely through the use of annotations) so that the API can be imported in a way that meets Swift’s standards.

[…]

Swift should recognize common C++ patterns like ranges (pairs of iterators) and containers and map them into Swift Collections, making them automatically work with Swift’s library of safe and idiomatic collections algorithms. For example, Swift code should be able to filter and map the contents of a std::vector[…]

[…]

There are three common patterns for managing reference object lifetimes in C++. Swift should endeavor to support all three of them[…]

[…]

Swift will need to decide how to handle projections, and more generally the use of view types, that it doesn’t recognize how to make safe. This may come with difficult trade-offs between usefulness and safety.

[…]

Generic code in Swift will not be able to use C++ templates generically without substantial new language features and a lot of implementation work. Allowing C++ templates to be used on concrete Swift types is theoretically more feasible but still a major project because of the ad hoc nature of type constraints in templates. If this feature is ever pursued, it will likely require substantial user guidance through annotations or wrappers around imported APIs.

Using Swift from C++:

For “reverse” interoperability, Swift generates a header that uses C++ language constructs to represent Swift APIs that are exposed by the Swift module. Because of the relatively high expressivity of C++ headers, the generated header is able to provide representation for most native Swift functions, methods, initializers, accessors and types without needing any extra code to be generated in the Swift module. This allows C++ programmers to call into Swift APIs using the familiar C++ function and member function call syntax.

[…]

Swift chose to require programs to opt in to Objective-C interoperability with the @objc attribute, both to make export more predictable and to avoid emitting extra code and metadata for all classes. In contrast, as long as the C++ compiler supports the Swift calling convention, a C++ header can call native Swift functions directly, and the C++ type system can be used to wrap most Swift types in a safe C++ representation. Because of this, there is no reason to require Swift module authors to opt in into C++ interoperability. Instead, any Swift module that can be imported into Swift can also be imported into C++, and most APIs will come across automatically.

Some API authors will desire explicit control over the C++ API. Swift will provide an annotation such as the proposed @expose attribute to allow precise control over which APIs get exposed to C++.

[…]

The existing Swift to Objective-C bridging layer should still be supported even when C++ bindings are generated in the generated header. Furthermore, the generated C++ bindings should use appropriate Objective-C++ types or constructs in the generated C++ declarations where it makes sense to do so. For instance, a Swift function that returns an Objective-C class instance should be usable from an Objective-C++ compilation unit.

Previously:

Xcode 14.3.1

Apple:

The Xcode 14.3.1 release supports on-device debugging in iOS 11 and later, tvOS 11 and later, and watchOS 4 and later. Xcode 14.3.1 requires a Mac running macOS Ventura 13.0 or later.

[…]

Fixed: When targeting devices running iOS 13, apps built with Xcode 14.3 and using Objective-C protocols from Swift, sometimes crash at launch.

[…]

Fixed: Applications using Swift Concurrency could crash when run on a specific OS version

Xcode 14.3 was a buggy release. It’s not clear what’s changed in Xcode 14.3.1 since the unusual second release candidate, but judging from the sparse release notes most of the issues are still outstanding. Testing is still broken for me.

Previously:

watchOS 9.5.1

Juli Clover:

Apple today released watchOS 9.5.1, a minor bug fix update designed for the Apple Watch.

[…]

According to Apple’s release notes for the update, it includes “improvements and bug fixes” for the Apple Watch, with no details on which bugs have been addressed.

Curiously, it’s not listed on the About watchOS 9 Updates page, and the security updates page says only that “the update has no published CVE entries.”

watchOS 9.5 came out at the same time as iOS 16.5 and macOS 13.4, and there have been no corresponding 0.0.1 updates for those operating systems.

Previously:

Thursday, June 1, 2023

WWDC 2023 Wish Lists

Krishna Sadasivam:

Let’s be clear: what I really and truly wish for the next iteration of macOS is a new found-focus on stability, polish and bug fixes.

Mario Guzman:

The next macOS should be a “Snow Leopard” kind of release.

Nick Heer:

As Apple’s operating system line has grown from one to at least five — more if you count the HomePod’s audioOS and BridgeOS for Macs with T-series chips — the limitations of scale have begun to show. New versions of iPadOS oscillate between key feature updates to fundamental parts of the system, like multitasking, one year, and tepid improvements the next. iOS is a mature platform and, so, it makes sense for there to be fewer core feature updates, but one wishes the slower development cycle would bring increased stability and refinement; actual results have been mixed. MacOS is the system which feels like it ought to be the closest to some imagined finish line, but it also seems like it is decaying in its most core qualities — I am having problems with windows losing foregrounding or not becoming focused when they should. Also, why are Notifications still like that?

Daniel Andrews:

A general theme on speed and reliability at the OS and app level. Especially Mail and Music.

[…]

Extensions for 3rd party browsers.

Dan Moren:

For example, one addition I’d really like to see is improvements to iOS’s autocorrect system.

[…]

Other small improvements that would be nice to have could include breaking the Passwords section of Settings out into its own app, tweaking the way multiple calendars appear in the Calendar app, and allowing more widgets on the lock screen, just to name a few.

[…]

One big nice to have feature I’d like to see in macOS 14 is letting widgets live outside of their little column in Notification Center.

Jack Brewster:

My iOS 17 feature request is for Safari extensions to work in embedded views.

Francisco Tolmasky:

All I want out of macOS 14 is for a screenshot naming scheme that results in them being in chronological order when they are sorted alphabetically.

Kelly Guimont:

Here’s my dream for WWDC23:

In macOS 14, when you open a new Mail draft, if you close it within 5 seconds you will not be prompted to save that unaddressed, empty, clearly accidental draft.

Christian Beer:

  • Xcode only shows actual, current errors
  • Xcode shows errors where they happened
  • Xcode doesn’t run an old version of an app if there were build errors
  • Xcode doesn’t come up with some strange error if I forgot a „?“

Miguel Arroz:

Xcode can actually attach the debugger to the test runner app reliably.

Guilherme Rambo:

  • When a build fails, actually show me the build errors, every time, without me having to attempt the build again or restart Xcode
  • When a build error/warning is corrected, stop showing it, instead of leaving it on the list, sometimes for days, unless I do a full derived data delete and restart

Juri Pakaste:

WWDC 23 wish: fast, reliable UI tests.

This message brought to you by Failed to launch app with identifier and Failed to terminate.

My top Xcode issues are showing incorrect errors, compiler crashes, tests failing to run, and tests not running in Instruments.

Jack Brewster:

If the only new feature in the next macOS is that they’d quit hiding controls (like the button on Reminders notifications), I’d be pretty dang happy.

Jesse Squires :

If the only bug fix in macOS 14 is the server icon in the Finder sidebar, I will be happy.

I really shouldn't be so bothered by this. But goddamn. It annoys the hell out of me every. single. time.

Pierre Igot:

For the record, it’s not just the server icon in the sidebar. It’s also the server icon on the desktop and in Finder windows. And it’s network folder icons too. In other words, it’s even more annoying than what Jesse says. But of course it’s intermittent, so Apple’s software engineers cannot be bothered to make the effort to reproduce and fix.

Simon B. Støvring:

Me if iOS 17 does not let me replace the flashlight and camera buttons on the Lock Screen with buttons that run any shortcut.

Mysk:

The top feature on our iOS wishlist remains: “Allow app access to location for 10 minutes”

Beardy Guy:

What I’m hoping or expecting to see in terms of iPadOS and apps[…]

John Voorhees:

This week on AppStories, we talk about Logic Pro for iPad and our wishes for Apple’s rumored mixed reality OS, xrOS.

Timothy Perfitt:

macos wishes for wwdc that will not happen but totally should:

  1. netboot returns.
  2. configuration xml at root of drive to configure setup assistant
  3. system preferences that work like a mac app
  4. don’t have to quit apps when enabling sharing screen
  5. ability to install profiles without an mdm or user approval each time.
  6. a pony

John C. Welch:

A single, coherent, OS-wide automation framework that allows non-devs to create their own automation solutions and not rely on app devs to build shortcuts.

You’ll absolutely get a pony first.

Previously:

Update (2023-06-02): Brian Stucki:

Another wish list item: fix screen time.

Lickability:

We asked our team to share their biggest wishes and predictions for the event, from SwiftUI APIs to interactive widgets on iOS.

Dave Wood:

Every single year: “The next macOS should be a ‘Snow Leopard’ kind of release.”

John Gordon:

Every year we ask Santa for a Snow Leopard and we get whatever iOS didn’t want.

Aaron Pearce:

All I want for WWDC is to be able to delete this:

UIControl().sendAction(#selector(URLSessionTask.suspend), to: UIApplication.shared, for: nil)

Chris Turner:

My wish for WWDC2023 is if I get a voice mail on my iPhone, I actually have the voice mail available before or at the same time as the transcribed text message, instead of hours or days later.

Robert Hammen:

A softwareupdate function that works repeatably and reliably to present the user with pending updates. This functionality has been broken and unreliable on macOS since macOS 11 and the changes revolving around Apple Silicon (volume ownership).

Same here.

Jeff Johnson:

My WWDC wishlist is an M3 processor for the App Store Connect server.

Reddit to Charge for API

Christian Selig (tweet, Mastodon, Hacker News, AppleInsider):

Had a call with Reddit to discuss pricing. Bad news for third-party apps, their announced pricing is close to Twitter’s pricing, and Apollo would have to pay Reddit $20 million per year to keep running as-is.

[…]

I’m deeply disappointed in this price. Reddit iterated that the price would be A) reasonable and based in reality, and B) they would not operate like Twitter. Twitter’s pricing was publicly ridiculed for its obscene price of $42,000 for 50 million tweets. Reddit’s is still $12,000. For reference, I pay Imgur (a site similar to Reddit in user base and media) $166 for the same 50 million API calls.

John Gruber:

Right now Apollo is free to use, but offers a Pro tier with a slew of additional features and fun stuff for a one-time payment of $5, and an Ultra tier with even more for a $13/year subscription. If Reddit goes through with this API pricing, Apollo’s free and Pro tiers would be unsustainable, and the Ultra subscription would have to cost at least $50 or $60 per year.

Jason Snell:

As with Twitter, there is a path for Reddit to walk that allows Selig to build a sustainable app business and for Reddit to be compensated for its service. But this isn’t it.

Adam Chandler:

I’m an Apollo for iPad user and pay for the highest tier to compensate the developer for their time. I also pay Reddit for their premium service to compensate them for their time and so I don’t see any ads.

Why can’t Reddit just require Apollo only work with users who are paying for Reddit Premium? Introduce an Ads-API that’s free to Apollo and charge the end user to disable ads?

I had the same thought about Twitter, but I guess it’s more about control or LLMs than money.

Brent Simmons:

NetNewsWire has special support for Reddit — we use the Reddit API.

[…]

We already went through this with Twitter. Not happy to be doing it again.

Federico Viticci:

To be fair, I feel like Reddit should pay @christianselig $20 million to help them improve their shitty app.

Apps like Apollo have made Reddit usable for millions of people. This is an idiotic move.

Sören:

Tweetbot was the one way I could enjoy reading the Twitter timeline. Without it, my Twitter use is reduced to occasional glances at individual profiles.

Apollo and old.reddit.com are enjoyable ways to use Reddit. The latter’s days are presumably numbered, and the former soon won’t be able to afford paying for the API.

The app is awful, and the new website is worse than the old one.

Kevin R Jones:

The other big problem about this Reddit stuff, is that a third party client is about the only efficient way a screen reader user can use it. Blind screen reader users will basically be prohibited from using Reddit from now on.

Sean Heber:

It’s amazing that Reddit, having watched the fallout after Twitter killed off their third party developers, would go on to say, “You know what, that’s an excellent idea and we should do it too!”

Paul Haddad:

The thing that bothers me most about this Reddit stuff is the Gaslighting. If you are going to kill off all clients, just own it. Don’t lie and say you value 3rd party clients and then act like they should be thankful for your over priced, unsustainable access plans.

Khaled:

At least they talked with him. 🙄

Craig Hockenberry:

HOW MUCH IS APPLE GONNA CHARGE ME TO USE THE PING API

Previously:

Update (2023-06-02): See also: Luke Plunkett (via Hacker News).

Centering the macOS Ventura Form Layout

Vidit Bhargava (Mastodon):

As you can see with this design, it’s got a couple of glaring of issues when used in wide width situation:

  1. There’s too much space between the title and value. This makes reading the values veery difficult.
  2. Even when grouping, the sameness of each item makes it look like a block of text even more so than the previous versions

[…]

The center equalise process, solves the issue of tracking values very elegantly, and overall offers a much more readable UI.

The design where the control and its label are as far from each other as possible makes a lot more sense on a narrow phone screen that’s in portrait orientation. There, they’re not actually that far apart, and it makes everything line up. Federighi claims that this is not where the idea for the macOS System Settings came from, but it’s hard to see why this design would make sense on its own. He says that the main goal was “consistency,” but System Settings is not consistent, with some areas using the sidebar and form interface and other areas using:

A modal sheet has a navigation link to another… sheet? which can close the modals or take you back. But the back button is now in the bottom bar.

This is just so odd because you see the gymnastics they had to do because they brought a design that was born out of mobile, extended for tablet, and now trying to make it work on desktop.

Previously:

Update (2023-06-02): Clarko:

SwiftUI isn’t responsible for what you dislike about System Settings.

By default, SwiftUI uses the AppKit widgets. You have to opt in to different styles, which System Settings has done.

And you can quibble about those styles, for sure. But this is about the designers, not the technology.

Difference between the screenshots below:

.formStyle(.grouped)
.toggleStyle(.switch)

Otherwise it’s the same code in both cases.

Sarah Reichelt:

The things people object to in the System Settings app are design decisions, not SwiftUI bugs. It also seems that a different team designed each pane, leading to a lot of inconsistent UI. But I seem to be in the minority who actually likes the formStyle(.grouped) look.

I mostly agree with this, but I would note that (especially early on) there were a lot of glitches that seemed to be due to SwiftUI bugs, or I suppose perhaps the developers not knowing how to use SwiftUI properly. Secondly, it’s not only about widget styles but also layouts and navigation. Using SwiftUI encourages the developer to choose certain kinds of designs. And perhaps it also influences which engineers management assigns to the project and how much time they are given to work on it.

StopTheMadness 39: Hiding Page Elements

Jeff Johnson:

StopTheMadness already allowed you to write your own site-specific CSS, but along with knowing CSS, this requires digging around in the browser’s web inspector, which is particularly difficult on iOS. I needed a solution that avoids both of these problems, and I think I finally got something decent.

To use the new feature, you first click the Hide Page Element button in the StopTheMadness extension popup, which triggers element selection mode. Then you close the popup and click on the web page element that you want to hide. If your device (a Mac or an iPad) has a physical keyboard, you can skip the clicks with a keyboard shortcut: hover the pointer over the web page element that you want to hide, and press ⌘-delete. In either case, you’ll get a list of one or more elements to hide (there’s a 3D hierarchy of elements on the page). You can select each of the elements in the list, previewing what the page looks like when it’s hidden, and then click Save when you’ve found what you want.

[…]

I’ve recently learned that Medium, for example, exploits a newer technique to detect whether you’re viewing the web page in a Safari private window. I’ve created my own test page to demonstrate the technique. I’ve also created a new StopTheMadness website option to stop it: Protect private windows.

I don’t really care about the privacy aspect of a site knowing that I’m using a private window, but some sites nag you about it or refuse to work, so hopefully this will be able to foil them.

Previously:

Wednesday, May 31, 2023

WordPress at 20

Matt Mullenweg:

Today is the 20th anniversary of the first release of WordPress. None of us knew what we were getting into when it started, but we had a shared conviction that the four freedoms of the GPL combined with a mission to democratize publishing was something worth spending our time on.

Om Malik:

The software’s first official release (WordPress 1.0) was made available on May 27, 2003. I had been using the software for a little longer when it was still in alpha. In 2004, I switched my old website to WordPress, becoming the first major blog to embrace the platform. Considering obsolescence is a given, nothing lasts that long in the technology industry. It might not be as nimble or as basic as it started out, but it can still do one thing — help me maintain a homestead on the Internet, not controlled or defined by a platform.

John Gruber:

I, for one, never would have predicted that WordPress would grow to become, by far, the most popular CMS in the world, and the foundation of a thriving company whose primary goal is making the web a better platform.

Previously:

Update (2023-06-02): Hide Shidara (via Hacker News):

Out of a sample set of 600+ pre-seed to seed stage startups we’ve found that 29 startups still use WordPress and various plugins. At this point marketing site architecture is outsourced to no-code tools like WP and Webflow, so I expect that 100% of these startups are just using WP as a blog, hiring board, or a landing page builder.

Tuesday, May 30, 2023

Rewriting Remotion in SwiftUI

Dan Wood:

It took a while — August 2022 — before we felt that we were targeting a new enough version of macOS that we could feasibly start using SwiftUI in our code base. Since then we haven’t looked back: Development is faster, the app is more stable, and new teammates are ramping up faster thanks to the simpler code base.

We now think: If you are a macOS or iOS developer who hasn’t yet taken the plunge yet, now is a great time to start writing a new app using almost exclusively SwiftUI, and use its friends Combine and concurrency for the data flow.

[…]

While SwiftUI is all you’ll need for a basic Mac or iOS application, there are still quite a few gaps that will require you to partially make use of classic Cocoa views. In our code base, for example, we need some access to NSEvents, text input, and tweaking the first responder that just aren’t possible with pure SwiftUI. Fortunately Apple has provided bridges — the NSHostingView and NSHostingController for embedding SwiftUI in a Cocoa view, and NSViewRepresentable and NSViewControllerRepresentable for embedding a Cocoa view in a SwiftUI view. A really powerful technique we can’t neglect to mention is combining these two together, as described in this SwiftUI Lab article.

Previously:

Rewriting SoundCloud in SwiftUI

Matias Villaverde and Rens Breur:

We will share all the mistakes we made in the past two years while rewriting the whole SoundCloud iOS application in SwiftUI. The talk emphasizes problems that can happen when writing SwiftUI applications at scale. Hopefully, many engineers find our mistakes and learnings useful for adopting and migrating UIKit to SwiftUI.

Previously:

SwiftUI Notes Before WWDC 2023

Here are some posts I’ve been collecting since iOS 16 and macOS 13. Hopefully they will soon be outdated.

Phillip Caudell:

Has anyone got NavigationSplitView working reliably on macOS yet? Even the NavigationCookbook demo from Apple has broken things like double clicking to open new window?

Peter Steinberger:

“It is really cool, wild even, but also, if you use this, it crashes. Really unfortunate. Made it into iOS 16 GM as well.” -@mbrandonw on NavigationPath in SwiftUI

[Update (2023-06-02): Brandon Williams: “[This] bug was fixed in Xcode 14.1 beta 3. There are still plenty of bugs in SwiftUI navigation APIs though.”]

Phillip Caudell:

The new SwiftUI navigation API straight up doesn’t work if you have a List that supports selection.

Worse, the same code works on macOS but silently fails on iOS.

This is what drives me nuts about SwiftUI: how can something so simple be so broken?

Gwendal Roué:

Both List and LazyVStack are not as lazy as expected: they both access all elements in the collection, even if they are not rendered (it’s still iterating the million items as I’m writing, poor boy).

Damien Petrilli:

So it seems Apple changed the way the TabView with paging is rendered causing the bug when you resize the content of a page within it.

The lesson I am learning doing SwiftUI is to never trust Apple provided views and always make your own… unlike it used to be in Cocoa

Phillip Caudell:

Another day, another serious SwiftUI bug: List on macOS won’t select its initial value if the binding has an optional value type. Works on iOS, fails on macOS.

Worse, changing to non-optional then works, but then doesn’t compile on iOS (FB10013937)

Phillip Caudell:

Add a .onDrag() handler to an item in a List. Now try select the item. You can’t.

Adding a drag handler literally breaks the entire List. People have been complaining since last year[…]

Christophe Sauveur (via Hacker News, tweet):

I somewhat regret not being able to use SwiftUI in this project. I have the feeling that it is a great technology, but I reckon now that it is probably not suited for my specific use case. However, I still don’t know if I was doing things the wrong way or not. I still plan to use SwiftUI for the updated version of Nihongo no Kana, but as an iOS/iPadOS app with much less frequent redraws, I suppose it won’t be an issue.

Maybe SwiftUI over AppKit is not ready yet. The authoring tools for The Untitled Project are not build as a Catalyst app and do not rely on UIKit. One of the benefits of this refactor however is that there is absolutely no delay whatsoever and everything works perfectly. Sure, it is way more verbose and Auto Layout is not the most pleasing tool to use. But you also get much more control over the behaviour of the app and everything can be meticulously tweaked to your desire.

Daniel Jilg (via Peter Steinberger):

The app is also hard to develop because we seem to be fighting against a host of bugs and unclear behaviours in SwiftUI on macOS, even in the newest versions.

[…]

The iOS app will lose its editor and become a viewer app.[…] Going forward, Dashboard [for the Web] will be our primary and canonical app. It will receive updates first, and any support requests regarding the Dashboard will float to the top. Once a feature is more stable, we’ll try and port it to the macOS and iOS apps.

Andreas Monitzer:

The weird thing is that SwiftUI has all the disadvantages of being non-native while not being cross platform (except iOS/macOS, but there’s Catalyst for that). Also, the documentation is bad.

Christian Selig:

I’m legit looooving how easy SwiftUI is making it to add some new cool views to Apollo, but it takes the wind out of your sail a little when alongside the smooth UIKit ones the SwiftUI animations look so choppy[…]

Bruno Rocha:

I can’t stress hard enough how awesome SwiftUI’s previews are. […] To be fair, the previews aren’t perfect. I had a frequent bug where the preview refused to show up and was unable to do any form of debugging on the preview itself, and a lot of people reached out to say that the previews are painfully slow on their older Macbook models, but it generally works well and I’m very happy we finally have official hot-reloading support in iOS.

[…]

While Burnout Buddy took me a couple of weeks to build, the majority of that time was spent on the logic and architecture. The UI itself for the entire app was built in just a couple of minutes.

It’s important to mention that this is not always true. As we’ll see down below there’s an entire category of “more complicated” products where SwiftUI is actually extremely detrimental to development speed, but we should still appreciate that SwiftUI works amazingly well for the more straight-forward category of projects that the majority of developers deal with. It’s also not too surprising that this is the case considering that they have been Apple’s primary target audience for Xcode features since the dawn of iOS.

[…]

SwiftUI forces you to shape your model in a way so that the complete structure and state of all views are static and known well in advance, which while not an impossible task, can be insanely difficult for views that have lots of moving parts and conditions.

Steve Troughton-Smith:

Another day, another fatal SwiftUI problem I have to now drop everything to work around.

Related to the last one, but Picker popups now auto-size to the longest menu item, ignoring all other layout cues.

[…]

I did everything right; this is a 5-line SwiftUI view wrapped in manual UIKit layout, treated with oven mitts to minimize potential damage. And it still went wrong.

[…]

Do note, as you flip through these three screenshots, that the same SwiftUI code has different layout on each. You simply can’t set it and forget it. You gotta re-test every OS you support with every SDK update and OS point release.

This kind of software decay is completely opaque to the developer; because Apple provides no kind of macOS Simulator to run older OSes, and TestFlight does not support macOS 11, devs relying on SwiftUI will be shipping bugs like this without knowing, without having a way to test.

Damien Petrilli:

Code works perfectly when compiled directly on the device but crashes when deployed through TestFlight and only for some devices…

And no way to debug as it’s internal. So you have to isolation the views and try alternatives to not trigger the bug.

Brian Webster:

So, the thing I couldn’t get SwiftUI to do is this layout, with the following conditions:

  1. Both vertical stacks should size to the width of the stack’s widest control (e.g. the “Import whatever version is available” button).
  2. The vertical stacks should be just as tall as needed to fit the controls and wrapped texts.
  3. The window should autosize to fit the stacks on both axes.
  4. The General tab is much smaller, but the window should *not* change size when switching tabs.

[…]

That’s the thing though, it’s absolutely trivial in AppKit (and I’d guess UIKit too). Just shove everything in an NSStackView and you’re done. I was genuinely surprised I couldn’t get it to work in SwiftUI without crazy shenanigans.

Helge Heß:

I’m slowly becoming a SwiftUI Table view expert. It can be a weird thing, especially cross platforms (iPadOS vs macOS have a set of different behaviours). E.g. on macOS “sections” do not become proper (sticky) group rows, which is quite weird given that this is an intrinsic NSTableView feature, they just scroll like regular contents.

On iOS there is “some” stickyness, but in a somewhat crazy way: a section title propagates to the content of the first column. Which breaks if it is short (overlaps w/ the second column). Also sections contents on macOS clip and don’t on iOS. And section contents on macOS respond to clicks, but not on iOS.

Clarko:

Anybody dealt with this macOS table-selection weirdness before?

It’s only happening for a small number of testers, and I can’t repro, so it’s a pretty frustrating bug!

Steve Troughton-Smith:

Every WWDC from here on in I’ll be looking at from the perspective of ‘can you make better apps with SwiftUI vs not-SwiftUI?’. The answer right now is ‘no’, not for the apps I want to build and the platforms I want to build them for, but boy would it sure be nice to say yes and start using more of AppKit in my cross-platform apps.

Previously:

Building Large-Scale Apps With SwiftUI

Mohammad Azam (via Christian Tietze):

I have been experimenting with MV pattern to build client/server apps and wrote about it in my original article SwiftUI Architecture - A Complete Guide to MV Pattern Approach. In this article, I will discuss how MV pattern can be applied to build large scale client/server applications. […] The main idea behind the MV Pattern is to allow views directly talk to the model.

[…]

Based on Apple’s recommendation in their WWDC videos and code samples and my own personal experience, I have been implementing a single aggregate model, which holds the entire state of the application. […] Once, you have identified different bounded contexts associated with your application you can represent them in the form of aggregate models.

[…]

To prove that a View Model unit test does not verify user interface elements, simply remove the Button view or even the Text view from the ContentView. The unit test will still pass. This can give you false confidence that your interface is working.

Pet peeve: the parameters to XCTAssertEqual() should always have the actual value first and the expected value second.

I do not recommend testing Core Data with NSInMemoryStoreType because a lot of features don’t work with it, the performance characteristics are skewed, and having an actual file helps track down memory management bugs. I find that, with modern SSDs, using NSSQLiteStoreType with a temporary folder is fine, and there are various pragmas to make it go faster. If you really need in-memory, use /dev/null/DatabaseName as the file path.

Previously:

Monday, May 29, 2023

Receipt Validation With SHA-256

TN3138:

Apple is updating the App Store receipt signing intermediate certificate with one that uses the SHA-256 algorithm in the sandbox, TestFlight, and App Store environments, on the dates shown below[…]

[…]

If your app verifies App Store receipts on the device, follow the instructions outlined in this document to ensure that your receipt validation code is compatible with this change.

[…]

If your app follows the instructions in Validating receipts on the device, the new certificate affects step 2, which involves verifying the certificate chain. Be sure your app uses the latest certificates from Apple PKI.

Previously:

Photo Stream Shutting Down

Juli Clover:

Apple’s “My Photo Stream” service is set to shut down on July 26, 2023, which means customers who are still using that feature will need to transition to using iCloud Photos prior to that date.

You can see why they are consolidating on iCloud Photos, but Photo Stream had some appealing features that will be lost. First, you could backup/sync an unlimited amount of data (for a limited time). There was no need to worry about upgrading your account temporarily or having photo storage crowd out storage for other apps. Second, you could access recent photos and videos on all devices without having to store everything in the cloud.

Stephen Hackett:

Photo Stream is one of the original components of iCloud, and was kept around even after iCloud Photo Library launched in 2014. Here’s how Apple pitched the feature when iCloud was new[…]

Update (2023-06-01): Michael Steeber:

I don’t know if my memory is toast or what, but until the news last week of Photo Stream shutting down, I cannot recall one single time before that it was ever called “My Photo Stream.” I’ve known it as just “Photo Stream” since day one.

I was thinking the same thing.

Apple Intelligence

Daniel Jalkut:

People are justifiably less confident about Apple’s prospective plans in the area of artificial intelligence (AI), and particularly in the realm of large language models: the technology behind such imagination-captivating products as OpenAI’s ChatGPT, and GitHub Copilot (which itself uses another OpenAI language model).

I zeroed in on ChatGPT and Copilot because it’s easy to imagine the functionality of these services shining in the context of two important Apple products: Siri, and its Xcode developer tools. In fact, technology is advancing so quickly that the absence of something like ChatGPT and something like Copilot in these products seems likely to be viewed as major shortcoming in the near future, if it isn’t seen that way already.

[…]

Apple Intelligence won’t be as good as ChatGPT or GitHub Copilot, at least not to start with. But it will be Apple’s. They can frame the pros and cons however they see fit, working their typical marketing magic to make its shortcomings seem less important, if not downright advantageous.

It would seem that Apple is way behind, not only in terms of announced products, but also because, as large language models become commoditized, access to proprietary training data and integrations will become key. Apple does have some unique data such as iTunes and App Store reviews, but these seem less useful than what its competitors have. Xcode Cloud could potentially be a great data source, but it, rightly, is designed for privacy:

Source code is only accessed for builds and the ephemeral build environments are destroyed when your build completes.

On the other hand, perhaps we are not that far from fitting really useful, if not market-leading, models on device. Apple has great hardware to run them, which is already deployed. It could work offline and preserve your privacy. This could be easier and cheaper to scale up to large numbers of users than models running in data centers.

Previously:

Friday, May 26, 2023

Disabling Quick Look In-Icon Previews

Craig Hockenberry:

This is ridiculous.

If you don’t have enough space to show paging arrows, you certainly don’t have enough space to view the content.

[…]

Where there’s a will, there’s a way. To disable movie, PDF, and other useless previews, but still maintain the image on the icon, use this from Terminal:

$ defaults write com.apple.finder QLInlinePreviewMinimumSupportedSize -int 512

Then relaunch the Finder.

Stop Smooth Scrolling in Safari 16.4

Jeff Johnson:

Smooth scrolling means that when you press the arrow keys to scroll down or up on a web page, the scrolling is animated rather than immediate.

[…]

My blog post macOS Containers and defaults explained why Terminal needs Full Disk Access. Next, you need to quit Safari and enter the following command in Terminal:

defaults write com.apple.Safari IncludeInternalDebugMenu -bool true

Then launch Safari, open the Debug menu at the end of the main menu, select WebKit Internal Features, and uncheck “EventHandler driven smooth keyboard scrolling”.

I see smooth scrolling as an accessibility issue and wish I could turn it off in all apps.

I’d been meaning to post about this and was reminded about it after installing Ivory, which doesn’t follow the NSScrollAnimationEnabled system setting.

See also: Glenn Fleishman.

Wallaroo and SwiftUI on macOS

Craig Hockenberry:

We have a View in the app that uses SceneKit to display a 3D scene with a confetti flourish after a customer starts a subscription. I was expecting stuff like that to take a lot of effort to get working on the Mac. Instead, it ran 100% out of the box with no modifications at all.

And the stuff that I was expecting to be easy, like a settings view, buttons, and menu commands, turned out to be hard. To put that “hard” in context, it took me about a month to go from an app that we were proud of on iOS to one that we were equally proud of on macOS[…]

[…]

We also found that many of the issues encountered on macOS were things we had done wrong on iOS. Porting the app to the Mac made both platforms better. We’re also rethinking our View architecture so things that are currently Mac-only can be used to improve the iPad experience.

[…]

You’re going to have platform-specific code. More than you realize: certainly more than I expected!

[…]

It took me three days to hook up a Save menu item and have it work reliably.

I don’t understand why they had to use a custom button style and a hard-coded radius to get buttons that looked good on both platforms. I thought the point of SwiftUI was that you’re supposed ot just specify that you want a button and it does the right thing on each platform.

Craig Hockenberry:

SwiftUI’s default mechanism for handling URLs on macOS isn’t great. If you’ve used .onOpenURL on a View to handle external events, you’ll be disappointed to learn that a URL scheme on macOS opens a new window (Scene) before it hands the URL to the view modifier. And if you’re using a single Window instead of a WindowGroup, nothing happens at all.

[…]

One thing we wanted to do was use the Escape key to pop the NavigationStack. On the Mac, it’s a key that has always represented “go back” and many apps (like Photos) take advantage of that. Unfortunately, to accomplish that in Wallaroo, we had to use an invisible ToolbarItem with a .keyboardShortcut(.escape, modifiers: []).

[…]

While you’re struggling with window and sidebar size constraints, you end up with UserDefaults for frames that have “fun” keys like "NSWindow Frame SwiftUI.(unknown context at $1acd3d768).SceneBridgeReader, SwiftUI.ModifiedContent>, SwiftUI._PreferenceWritingModifierSwiftUI.PreferredColorSchemeKey>, SwiftUI._EnvironmentKeyWritingModifier>>>>-1-AppWindow-1".

Craig Hockenberry (Mastodon):

You won’t realize how much you depend on SwiftUI previews until you start working on macOS.

Sometimes they kinda work, but more often than not you’ll get an endless spinner. When they do work, they’re not interactive (you have to use the selectable mode with the arrow icon).

[…]

The similarity of the key names makes this a hard lesson to learn. I looked at “aps-environment” and “com.apple.developer.aps-environment” for hours before I realized they were different. After you add the one for macOS manually, everything is golden.

[…]

We weren’t able to get FileRepresentation working in a Transferable. Other applications can’t access a temporary file that’s created for the export. This feels like a sandbox problem that we couldn’t work around.

Previously:

Thursday, May 25, 2023

Kaleidoscope 4

Leitmotif:

  • Syntax coloring, with multiple built-in themes.
  • Transform any comparison into a merge document that can be edited inline.
  • Text filters to clean up diffs by removing irrelevant data, such as time stamps, object addresses and unique identifiers.
  • Kaleidoscope Prism, a new helper app in the menu bar to quickly launch comparisons even if Kaleidoscope is not running.
  • Debugger integration for Python developers.
  • File properties show metadata, including size, file type, dates, and encoding.
  • A welcome window that speeds up the processes of creating new comparisons or finding recent ones.

The syntax coloring is nice. The most interesting feature for me is the text filters, which have a nifty interface that reminds me of BBEdit pattern playgrounds. I expect that they will prove useful when comparing Xcode debug or test output.

It’s not available from the Mac App Store.

Previously:

Update (2023-05-30): Florian Albrecht:

While the new version is very much a continuation of what we started 2.5 years ago with Kaleidoscope 3, we modernized many aspects of the app. This screenshot of a simple text comparison shows off some of the changes[…]

Update (2023-06-01): Florian Albrecht:

Kaleidoscope 4.0 comes with 7 predefined [text] filters. Most of them are designed for immediate real-world use. To illustrate how to use them, I am just going to run a simple and unfinished SwiftUI app to create license files from Xcode, twice, and copy the log output into Kaleidoscope.

[…]

While this result is not hard to understand, it contains a lot of “noise”, i.e. data that is not relevant to finding important differences. Let’s go ahead and clean this up a little.