Archive for July 29, 2024

Monday, July 29, 2024

The First Apple Intelligence Beta

Joe Rossignol:

Apple Intelligence is still not available as of the fourth developer beta of iOS 18 this week, leading some to wonder if the features have been delayed. However, we have confirmed that Apple still plans to add some of the new Apple Intelligence features to an upcoming beta this summer.

Matthew Cassinelli:

I still can’t tell if this means App Intents.

Hartley Charlton:

According to individuals with knowledge about Apple’s plans, the company now plans to start rolling out Apple Intelligence in software updates by October, arriving several weeks after the launch of iOS 18, iPadOS 18, and macOS Sequoia. This means that Apple Intelligence will now effectively be split out of the initial launch of the new software updates. The reason for the delay is said to be concern about the stability of Apple Intelligence features and need for developers to have sufficient testing time.

Apple Intelligence will still be made available to software developers for the first time as soon as next week with the first betas of iOS 18.1 and iPadOS 18.1, which would be extremely unusual as the company does not normally release previews of follow-up software updates until the first version has been released.

Juli Clover:

Apple is today providing developers with the first betas of iOS 18.1, iPadOS 18.1, and macOS Sequoia 15.1, with the new software introducing an early version of the Apple Intelligence features.

[…]

Several Apple Intelligence features are available as of today, including Writing Tools, Siri’s revamped design, the option to move between voice commands and typing to Siri, summaries for transcripts and other content, the new Mail categories and smart replies, smart replies in Messages, and more.

Dan Moren:

As for what you won’t find here, don’t expect the contentious image generation features like Image Playground, the ability to clean up and remove unwanted details from photos, and integration with ChatGPT. It’s unclear if those will appear in future builds of these betas, or as subsequent updates after public release. Also unclear is whether there will be a public beta of these versions down the road for non-developers.

Ezekiel Elin:

If you’re confused, macOS Sequoia 15.1 is on a different update track than 15.0 (versus iOS that just has one track for all iOS 18)

However, even after switching to the new track, no updates show up for me in Software Update. Apple’s announcement includes a link to the macOS 15.1 release notes, but they don’t exist yet.

Jeff Johnson:

The dual beta track proves irrefutably that Apple’s annual release schedule is irreparably broken and desperately needs to be abolished.

Previously:

Update (2024-07-30): Apple has posted the release notes at a different link. Although they don’t say so, it appears that macOS only offers the beta update when running on a Mac that supports Apple Intelligence (even though macOS 15.1 will ship for Intel Macs, too) and which is not in the EU.

Craig Hockenberry:

Giving developers two beta versions to test is going to be a disaster for a lot of folks.

Developers install 18.1 because it’s the new hotness. And then September rolls around and everyone realizes they haven’t been testing their apps on the 18.0 release shipping to customers.

There is no way I’m installing 18.1 on my primary device until the day after 18.0 ships.

jedmund:

i feel like this is the problem with Apple’s “everything releases at the same time” approach. one thing being late means everything gets thrown out of alignment to the point where individual developers can’t effectively do their jobs.

Ezekiel Elin:

Siri is still incompetent in 18.1 so that’s good…

Helge Heß:

“IntelligencePlatformComputeService”, hmm…

Gui Rambo:

PSA: if you’re thinking of installing the Sequoia beta to an external disk in order to test the new AI features, don’t. It looks like those features do not work when booted from an external disk.

Before anyone asks: Apple Intelligence features aren’t available in virtual machines either.

Update (2024-08-01): Although I’ve updated to the macOS 15.1 beta, I have not been able to test Apple Intelligence yet. It took about a day in the “Preparing” stage before it would allow me to join the waitlist, and I’m still waiting.

Magic Lasso Redesigned

Matthew Bickham:

Under the covers, Magic Lasso has been re-architected using SwiftUI which enables a shared but tailored UI implementation across the iPhone, iPad and Mac apps.

The move to SwiftUI delivers improved user accessibility including complete support for variable type sizing and Dark mode. In the future, multilingual support will also be considerably easier to rollout.

Over 95% of the app’s UI is now written in SwiftUI, an increase from less than 30% this time last year.

Matthew Bickham:

What I did notice going through the process though is that if you base the implementation on the SwiftUI defaults you will definitely get some strange, and especially on macOS, less than ideal behaviour. This led me to not use some of the inbuilt SwiftUI approaches for certain UI elements. Instead, I created custom implementations that better fit within user expectations and best practice iOS and macOS conventions.

[…]

A huge part of the work was actually prototyping approaches in SwiftUI to see what works well and what doesn’t. Once a clean path was discovered, the final implementation was relatively straightforward but it was based upon those learnings. The hard part was ensuring simplicity and not falling into the many traps of weird behaviour that are present in the System Settings UI for instance.

Personally I prefer working in SwiftUI now – probably because I no longer need to implement two similar UIs in both UIKit and AppKit.

Previously:

Actor Reentrancy in Swift

Donny Wals (Mastodon):

When you start learning about actors in Swift, you’ll find that explanations will always contain something along the lines of “Actors protect shared mutable state by making sure the actor only does one thing at a time”. As a single sentence summary of actors, this is great but it misses an important nuance. While it’s true that actors do only one thing at a time, they don’t always execute function calls atomically.

[…]

However, when we introduce an async function that has a suspension point the actor will not sit around and wait for the suspension point to resume. Instead, the actor will grab the next message in its “mailbox” and start making progress on that instead. When the thing we were awaiting returns, the actor will continue working on our original function.

[…]

Things become trickier when you try and make your actor into a serial queue that runs async tasks. In a future post I’d like to dig into why that’s so tricky and explore possible solutions.

Holly Borla:

I think something like an async queue should be included in the concurrency library. The AsyncStream boilerplate is repeated everywhere for this sort of pattern, and we should make it easier to write because it’s a pattern that a lot of people need when order has to be guaranteed.

Marcin Krzyzanowski:

what’s worse:

  • undetectable actor reenteancy bugs that freeze the process
  • data race bugs that crash the app

can’t decide. hate both. one was not a big deal until recently in Swift

Drew McCormack:

When most people first learn about actors, I think they expect it to work this way, ie, that each call completes, and the next begins, like a class with a serial queue. So I don’t think there is anything fundamentally wrong with the idea. Of course, what you open your door to are reentrances which can deadlock. Apple chose their evil, namely races, over the alternative, deadlocking. I find races harder to debug in general.

Helge Heß:

It is pretty clear that the reentrancy issue of Swift “actors” exists specifically to avoid the chance of deadlock, which an atomic, async, actor has.

I can’t say whether that is better or worse in practice, I’d say probably worse. Maybe it would have been better if an actor wouldn’t be allowed to issue async calls, and hence have real-actor-like atomic behaviour guaranteed. I’m pretty sure a ton of people are going to shoot themselves in the foot over the reentrancy issue.

Drew McCormack:

Seems you can write a Swift macro to serialize execution of an async func. Trick is to embed a queue in the func, generating the appropriate return values etc.

Tobias:

Since the introduction of Actors, the Swift community is highly focused on them. I very rarely see Stuff like “Here is this cool new API and what you can do with it” anymore but only “How do I avoid data races and how does this Actor stuff actually work”. It is sad.

Matt Massicotte:

I took a shot at building an async-compatible lock.

Great for dealing with actor reentrancy. It’s kinda hard to use right now, becuase it cannot be built with the compiler in Xcode 16b4. I’d still love to hear what you think, even just about the concept.

Previously: