SwiftUI
A Girl and her @ViewBuilder
This blog post is a bit different than most other blog posts I've curated in this newsletter, in a very good way.
It describes the thought process of navigating the different options for making a SwiftUI view reusable: Should you use plain view modifiers, implement a custom view modifier, or even use Swift's result builders to create a custom view builder (am approach also used for styling views)?
I like the narrative style of Amy's post, and would love to see more of this!
A SwiftUI re-implementation in TypeScript
How would you like a SwiftUI implementation in TypeScript? Because that's what Chris Eidhof is working on. Seeing Chris' demo in this post leads me to believe this is mostly intended as a web-based tool that makes it easier for him to run web-based tutorials, but who knows - maybe there are more use cases...!
Being able to run SwiftUI code directly in a DocC interactive tutorial would be an extremely useful feature...
Swift on the Server
Are we server yet?
The community around the Swift Server Workgroup has done a great job implementing packages and frameworks for building server-side apps with Swift.
Are we server yet provides a good overview of what is there, and how to get started, whether that's using Swift for web apps, running Swift code in the browser (using WebAssembly), or using VS Code as the the IDE to write code.
Developing with Swift in Visual Studio Code
The Swift extension for VS Code has matured over the past couple of years, and I've heard many people say they use it for their day-to-day development.
Here is a quick article that provides an introduction to using VS Code and the Swift extension to build server-side apps and deploy them to a development container.
Swift on Vercel
This is a fun video that shows how to develop and deploy a serverlerss Swift application on Vercel using the swift-cloud/Vercel runtime and SDK.
A lot of work has gone into this SDK to make the developer experience as smooth as you can see in the video. Great job by Andrew and others!
AI and ML
Support for Gemini in Project IDX
For anyone who already has access to Project IDX (Google's cloud-based IDE) - it now has a built-in template for a starter project that shows how to implement a multi-modal app with Gemini.
Using Gemini in Flutter apps
There is no official package for using Gemini in Flutter apps, but the community has stepped up and created one. In this article, the creator of the package, Babak Gahremanzadeh, provides an introduction to using it in your Flutter apps.
Exploring use of Gemini Generative AI APIs in a Kotlin/Compose Multiplatform project
John O'Reilly has been working a lot on KMP recently, so it's no surprise to see this exploration for supporting Gemini in KMP.
Authentication
Develop and test OpticID for Vision Pro
Over the years, Apple has provided a number of authentication mechanisms that make it easy for users to authenticate (i.e., prove their identity) to the device: TouchID, and FaceID. With the Vision Pro, Apple introduces OpticID, which uses a scan of the user's iris to authenticate them.
Marco provides an overview of how to implement OpticID in your app, and how to test this on the Simulator (for those of us who haven't yet gotten access to a physical device).
Conferences
Swift24
"What will you make in 24 hours?"
I tried writing a summary, but the meta description of this event is more succinct than any summary I could've ever written.
Great idea by Matt - sign up today to take part!
Overview of Swift-related conferences
Looking for Swift-related conferences - no matter if as an attendee or as a speaker? Here is a list to get you started. And if you're a conference organiser, or considering to become one, the list of past conferences is a fantastic source of inspiration!
Fun stuff
LEGO Apple Collection
In the past couple of weeks, I've seen a couple of really cool AI-generated LEGO kits (I generated a few myself, check out my rendition of Firebase Developer writing SwiftUI code at their desk in the Google office, for example), but these kits of the Apple Store in New York City and of Apple Park by Marco Cornacchiaā€ˇ look stunning for sure.
Comment
So - this is the week in which we all get to pre-order our Vision Pro devices - or are we?
I'll be honest, after seeing the first photos of people wearing Vision Pro - and reading about how heavy they are, I felt a sharp drop in excitement. Don't get me wrong, I will still try to get my hands on one (or should you rather say "wrap my head around it"...), but I don't see me using it for any extended periods of time.
On a related note - if you're planning to use Firebase in your apps running on visionOS, make sure to compile Firestore from source by using one of the following command lines:
Enable compiling Firestore from source and launch Xcode:
FIREBASE_SOURCE_FIRESTORE=1 open /Applications/Xcode-15.2.0.app
Enable compiling Firestore from source and open the project or workspace in the current folder:
FIREBASE_SOURCE_FIRESTORE=1 xed .
We've just added a warning /error to the build configuration, so in case you forget to enable compiling Firestore from source, there will be a log output that explains how to enable it. This will be in the next release of the Firebase SDK for Apple platforms (or you can use the
main
branch to enable this feature now).Thanks for reading, and I will see you around!
Peter