Firebase
Supercharge your apps with Firebase and the Gemini API
In this blog post, my colleagues Nohe and Puf (*) demonstrate how to add AI capabilities to your Firebase app without writing a single line of code.
Magic? No - this is based on a feature that has been around for some years now: Firebase Extensions. These are pre-packaged solutions you can easily add to your app with a few clicks. Check out the Firebase Extensions Hub for a complete list of available extensions.
(*) you don't have to have a nickname to work on the Firebase team, BTW...
Swift
User-friendly descriptions and recovery suggestions for custom errors in Swift
When was the last time you really saw a helpful error message?
In this blog post, Natalia explains how you can create error messages that are not only localisable, but also helpful.
Elevated Swift
One of the funnest talks I’ve ever seen. Saroush goes over some interesting technical and historical details of elevators first, before diving into an implementation of an elevator dispatch algorithm in Swift.
If you know people who are afraid of riding on elevators, definitely show them this video - they will learn why elevators are safe.
If you are really into elevators, you can get the Elevator Traffic Handbook (sorry, no affiliate link in the video, but there is a special discount code for SwiftHeroes 2024 in the video description).
BTW, I was debating whether to add this to the "Conferences" section of the newsletter, as a fine example of why your company should allow you to attend conferences.
Encapsulate and Generalize in Swift
Should you generalise your third party dependencies? Scott argues that it's a good idea that can make it easier to transition to another vendor or replace a dependency with an in-house implementation.
I'd like to argue that more often than not, you will dig yourself into a rabbit hole when following this approach, as it will require you to implement a complete facade for the dependency, mapping all of their types to your own types. And if you forget to map one of their types, you've got a leaky abstraction.
But I am curious: how do you deal with third party dependencies? Do you hide them behind a facade? Do you use them directly? Or do you have any other fancy approach, maybe even using meta programming (using Sourcery or similar tools)? Let me know!
SwiftUI
The SwiftUI Field Guide
In issue 53, I wrote about Chris Eidhof's SwiftUI reimplementation in TypeScript. It turns out this wasn't just a research project to quench Chris' curiosity, but a building block for the SwiftUI Field Guide, "a website to visually explain how the SwiftUI layout system works". If you every wondered how the SwiftUI layout system works, and wanted to experiment with the different parameters, this site is for you: it covers a wide range of SwiftUI layout primitives, and you can modify all of the parameters, resulting in live changes - and that's why Chris had to rebuild SwiftUI in TypeScript.
Create an animated transition with Matched Geometry Effect in SwiftUI
Did you ever wonder how Apple implemented the transition from an app card in the Today stream to its details screen? They're using a Matched Geometry Effect.
In this blog post, Tiago and Matteo show how to use this transition in your own apps.
Vision Pro / visionOS
Apple fans are starting to return their Vision Pros - The Verge
Motion sickness, burst blood vessels, redness, dry eyes, headaches, and general discomfort are some of the reasons customers state for returning their Apple Vision Pros before the 14 day return window closes.
No two people are the same, and building a product that works for a majority of users is immensely challenging, particularly for a device like the Vision Pro that aims to create such an immersive experience.
I am curious if most of the readers of this newsletter who own a Vision Pro are going to keep it. If you own one, let me know if you're going to keep it or not!
Using Vision Pro for flight prep and in-flight
Not entirely sure if the FAA approves in-flight use of devices such as the Apple Vision Pro, but it definitely looks like it might be useful.
AI and ML
Gemini 1.5
Gemini 1.5 can process context windows of up to 1 million tokens. 1,000,000 sounds like an impressive number, but what does it actually mean?
This blog post contains three demos that make it a bit easier to grasp this: in the first one, Gemini is asked to find three comedic moments in the Apollo 11 transcript. This transcript has 402 pages and amounts to just shy of 327000 tokens. Even any space mission is serious business, Gemini was able to find a couple of hilarious moments in the transcript.
The demo I found most impressive was about code comprehension. Gemini was presented with the [three.js])https://github.com/mrdoob/three.js/} source code, and was asked to make some changes to the code to add a UI element to interact with the demo.
Understanding code bases (no matter if large or small) is something developers need to do on a daily basis to figure out how to make changes, or what might be the reason for a bug. Having powerful AI tools at our disposal will save so much precious time - I can't wait to use code comprehension features like this in my favourite IDEs.
Apple’s AI Plans: GitHub Copilot Rival for Developers, Tool for Testing Apps
Speaking of using LLMs in my favourite IDE - Apple seems to be working on AI powered features for Xcode for code completion and generating tests.
I wouldn't be surprised if some of the code completion improvements we've seen in Xcode 15 are paving the way for these new features.
Business
What does a PM do, anyway?
I don't know if Kirupa reads my newsletter, but it sure feels he's been inspired by last week's post titled What do executives do, anyway?.
In his video, he answer the question "What does a PM do, anyway?"
If you've been asking yourself what your PM does (except for writing documents and sitting in meetings all day long), check this out.
Comment
Last week, I linked to an article that makes the case for attending conferences. In this issue, I've included a link to a video by the amazing Saroush in which he talks about elevators and Swift. This is the kind of content that lives from a live audience and sparks great discussions among participants.
This isn't to say that YouTube videos don't inspire discussion - they do, but it's mostly a unidirectional conversation between a more (or sometimes less) friendly audience and the content creator. At a conference, people get together to exchange ideas - really, the talks are just there to inspire that exchange.
In other news, it seems like AI will finally come to the IDE we all love (and hate, at times) - Xcode. I've been using AI to help me write and analyse code a lot these past months, and I can't wait to be able to use this for my Swift code (I know, I know - you can always use VS Code with the Swift Extension, but I have to admit that Xcode has grown on me over all those years).
Before I let you go - don't forget to send me any hidden gems you come across - here is the submission form.
Thanks for reading!
Peter