Swift
Getting Started with SwiftPM Snippets
SwiftPM Snippets are a pretty powerful, yet extremely underrated feature. They allow you to ship compilable source code snippets as part of your Swift packages. This enables a couple of really cool use cases, such as including lightweight sample code projects in your package, or making it easier to write code listings you might want to include in your documentation - all while ensuring that they compile against the latest version of your package.
If you want to see SPM Code Snippets in action, check out Marco Eidinger's demo, and then follow this tutorial to learn how to use them in your own packages.
SwiftUI
SwiftUI's Observable macro is not a drop-in replacement for ObservableObject
Apple's documentation might make it sound like the @Observable
macro is more or less a drop-in replacement for ObservableObject
. However - there are subtle differences that are not covered in the official migration guide.
Jesse Squires (@jesse_squires, @jsq@mastodon.social) explains a very common issue that is caused by the differences in how the @State
and @ObservedObject
property wrappers initialise the underlying object.
As Jesse points out in the conclusion, this is a lesson in API design:
I suppose the moral of this story is, “I was holding it wrong.” But honestly, if you cannot design your API such that a user is unable to hold it wrong in the first place, then it is not entirely the user’s fault when things go wrong.
Swift on the Server
Swift on Server: How it powers Private Cloud Compute
It's exciting to see Apple talking about how they use Swift to build server-side applications, and given their notorious secrecy, it is even more surprising to see a talk about how they used Swift to build the Private Cloud Compute, which powers Apple Intelligence.
Really looking forward to this talk by Cory Benfield at the Server-Side Swift Conference in London next week.
AI and ML
Generating podcasts from blog posts
At it's core, NotebookLM is a tool that helps you make sense of complex information - you can upload sources like blog posts, PDFs, text files, or even slide decks, and then create FAQs, study guides, briefing docs, and other derivative works from the material. Essentially, you ground the LLM in the knowledge base you provide it with.
So far, so good. But with this recently launched feature, you can turn the knowledge in a notebook into a podcast. I've tried it out with one of my blogposts, and it is actually really good. The conversation between the podcast hosts is pretty engaging, and they even came up with new analogies that hadn't thought about - so even though I wrote the blogpost myself, I learned something new by looking at the material from a different perspective.
Have a listen for yourself, and let me know what you think - is this something you'd find useful or entertaining?
Creating a full Mac app with Cursor Composer and Claude—without any programming knowledge!
Over the past couple of weeks, I've seen a bunch of posts and videos going over how people built apps with little to no programming knowledge.
It's definitely interesting to see how AI and large language models can lower the barrier to entry for coding, but there is a lot more to building a production grade app than any AI can do at the moment, and I side with Mustafa on this.
However, I still found this post interesting, as it shows all the hoops you have to jump through at this time to use AI to support you when building apps for Apple's platforms.
Build iOS apps using Cursor
Speaking of a tighter integration of development tools and AI, Rudrank (@rudrankriyam. @rudrank@mastodon.social) has been looking into using AI tools to build iOS apps, and this approach using Cursor and using Krzysztof Zabłocki's Inject looks very promising. I tried this out myself, and the experience wasn't too bad (I did experience a couple of Simulator crashes when Inject tried to update my code, though - not sure if that was due to me using a beta version of Xcode 16...).
Productivity
Xcode Folders & Groups
After more than two decades, Xcode finally supports using file system folder semantics for organising your project files.
While this means you can add new files to a project by just dropping them into the corresponding folder in your disk, this also means the contents of a folder will appear in lexical order.
This sounds great at first, but it also results in somewhat unexpected sorting order for the root folder of your projects. I like to have my assets folder and any config files (like Firebase’s GoogleServices-Info.plist
) at the bottom of the root folder. With the new version of Xcode, this no longer is possible - unless you convert the folder to a group.
Sarah (@trozware, @troz@mastodon.social) has all the details - check out her article!
Podcasts
Ken Shirriff - On The Metal
I've mentioned Ken Shirriff (@kenshirriff), @kenshirriff@oldbytes.space) and his work on reverse engineering chips and processors in issue 66, so I was really pleased to see him being interviewed on the On The Metal podcast.
Ken's passion for reverse engineering silicon, retro computing and the history of computing make for some really amazing stories - for example, did you know that the Space Shuttle used core memory, and that the term “core dump” stems from those little donuts you could magnetize to store bits?
Fun stuff
Making the iPhone DN 40 Dock - a Dieter Rams-inspired iPhone standby dock
Standby mode is one of my favourite features introduced in iOS 17. Even without a custom nightstand, it makes your iPhone look like a Braun alarm clock.
In this video, Scott Yu-Jan (@scottyujan) demonstrates how he created an iPhone standby dock that is inspired by Dieter Rams' DN 40 alarm clock, in collaboration with OVERWERK (@OVERWERK).
The video is a great production and very entertaining, so even if you're not on the market for a standby stand (or a 3D printer!), it's fun to watch.
Now, before you order any of the unofficial clones from Etsy or Ebay, it might be worth waiting a bit, as it seems like there will be an official release coming soon.
Comment
I've (finally) had the chance to get my hands on the new predictive code completion in Xcode, and while it sometimes does exactly the right thing, it also often gets it completely wrong, and I find myself throwing away most of the code it generates.
I have to agree with Stewart in that it might be useful for some very narrow use cases, but it might actually better to turn if off if you're trying to properly learn how to code in Swift.
Overall it feels like this feature is more a waste of time than a time saver.
It is quite interesting to observe how the love/hate relationship a lot of developers have with Xcode is slowly resulting in third party IDEs becoming more and more attractive for Swift and iOS development - in this issue of Not only Swift, I included some interesting articles that show how you can use third party IDEs to better integrate with AI coding tools.
We've seen this before with IDEs like Eclipse (which initially was created to challenge Microsoft's Visual Studio, and then got eclipsed by IDEs like JetBrains IntelliJ). Will Apple be able to turn things around for Xcode, and win back the love of the developer community?
Let me know what you think - you can tweet at me @peterfriese, or just reply to this email.
Thanks for reading,
Peter