Firebase
Best practices when sending FCM messages at scale
In this short video, Marina introduces a couple of key concepts that are useful to understand when using a system like Firebase Cloud Messaging that is capable of sending a large number of messages to your users:
- RPS (requests per second)
- quota tokens and token buckets
- server-side throttling
- exponential back-off
- and jittering
To get an idea of what "large number of messages" means and how FCM works behind the scenes to make this possible check out Delivering Messages at the scale of the World Cup.
Marina goes over some best practices that you should implement if you want to send messages at scale - for example sending local notifications instead, not sending messages at the top of the hour, and more.
Swift
Use cases for self, Self and Self.self in Swift
Are you confused about when to use self
, Self
, or even Self.self
in your Swift code? Check out Natalia's blog post to be become more self
aware.
AnyObject, Any, and any: When to use which?
On that note, I simply had to include Antoine's blog post about AnyObject
, Any
, and any
. What's what, and when to use which?
SwiftUI
SwiftUI Binding Tips
Chris Eidhof with a couple of neat tricks for SwiftUI bindings that make your code easier to read and reason about.
Mock data for your SwiftUI previews
Here is a great idea for mocking data for your SwiftUI previews. I've been using a similar approach in my own code, but using a protocol makes this approach more discoverable.
Vision Pro / visionOS
Vision Pro Reviews
For those of us who haven't yet gotten a Vision Pro (or those who are suffering from choice-supportive bias), here are some reviews:
- Apple Vision Pro review: magic, until it’s not - The Verge
- Why Tim Cook Is Going All In on the Apple Vision Pro - Vanity Fair
- Apple Vision Pro Reviews - Is it Really THAT Bad? - MKBHD
- Using Apple Vision Pro: What It’s Actually Like! - MKBHD
No time to read or watch them all? No worries - Om Malik has you covered - check out his meta review: Apple’s Vision Pro -The Meta-Review
List(s) of apps for the Vision Pro
For those of you who got a Vision Pro on day one and are looking for some apps to try out on their shiny new device, here are two lists of apps made for the Vision Pro:
- Ariel is using Appfigures Explorer to produce this list.
- And here is another list of apps, curated by Krist
These are also a great source of inspiration for everyone who didn't get a device and is trying to figure out if it's worth building for this new platform.
Here's a killer use case for the Vision Pro
Kevin and Casey talk about the demo of the Vision Pro they got at Apple, and share their thoughts about the good and the maybe not so good parts of the device and its platform.
While most people seem to have been blown away by the phots and movie experience, Kevin talks about what I would personally consider the killer use case for the Vision Pro: it seems like Apple has added a feature to their Keynote presentation software that lets you practice your presentation in front of a virtual auditorium.
How cool is this?! Maybe this would eventually make me rehearse my presentations... :-)
Also, given the weight of the device, this would hopefully convince people to create shorter versions of their presentations...
AI and ML
iOS 17.4: Apple continues work on AI-powered Siri and Messages features, with help from ChatGPT
Apple reportedly is working on an AI-powered version of Siri - this report by 9to5Mac discusses how Apple might be using OpenAI's APIs in iOS 17.4 to test its own implementation against OpenAI's models.
In this Twitter thread, Ananay speculates about the implications of this approach - securing your API keys, anyone?
I found the prompts that Apple uses in their code to be very interesting - they are good examples of some powerful prompting techniques such as Few-Shot prompting to teach the model how to structure the output.
Making Siri smarter by connecting it to an LLM sounds like a smart move that has long been overdue, but what I am even more excited about is whether or not Apple will provide access to any AI capabilities they launch with iOS 18 to developers.
I didn't want to wait until then, and connected my AI-powered knowledge base app to Siri. Here is a slide deck of a talk in which I explain how I did this. Curious to learn more? Drop me a line and let me know if you'd rather watch a video or read a blog post in which I explain how I built this app.
What Is Apple Doing in AI? Revamping Siri, Search, Apple Music and other Apps
To understand Apple's stance on AI and how it's implementing their AI strategy on their platforms, this article provides useful insights. Were they late to the game? Maybe. Maybe not. I think Apple's investment in a powerful lineup of chips has put them in a unique position to implement an on-device, privacy-first approach to bringing AI to their user base.
Productivity
Tips & Tricks for using Raycast Snippets
I'm a huge fan of Raycast - it has completely replaced my use of Spotlight, and has been the default for launching apps for me. But it can do so much more.
Its snippets feature allows you to define customisable expansions for text shortcuts. In this thread, Thomas, one of the engineers on Raycast, goes over some really cool use cases for snippets - e.g., quickly turning a URL into a Markdown link.
Tools
Status bar overrides in the iOS Simulator
The iOS Simulator has a feature that allows you to override the status bar appearance. This is great for marketing screenshots, as it allows you to set the time of all your screenshots to the same time, make sure the battery is charged to 100%, etc.
Unfortunately, for a very long time, this feature was broken. Fun story: this was the main reason why I started using AspirinShot to create screenshots for my DocC tutorials.
In Xcode 15.3 beta, this has been fixed - finally!
As Antoine mentions in his blog post, for a very long time, the iOS status bar time in most of Apple's commercials was set to 9:42, and only changed to 9:41 a couple of years ago. But there was at least one commercial in which the time was set to 11:29 pm - do you know why?
Fun stuff
HTML: The Programming Language
The question whether or not HTML is a programming language is hotly debated (see 1, 2, and also last week's Fun stuff link).
It was only a matter of time until someone took it upon them to implement HTML Lang - "HTML, The Programming Language".
I'm not sure they made it better, though...
Comment
My Twitter feed is full of excited people picking up their Vision Pro devices at Apple stores, and without exception, they seem to be genuinely thrilled by the capabilities of the device and the new platform. The App Store is full of new apps for visionOS, and it seems like a significant portion of the more than 600 new apps that Apple claims were made specifically for the new platform are Indie apps.
In this episode, I've collected a bunch of reviews about the Vision Pro and a few lists of apps for visionOS so you can get an overview of the launch of this new platform.
Is this the start of a completely new way how we do computing? I think it's too early to tell. The device as it is available today is only the first iteration, and I am sure we will see more efficient, lightweight, and powerful versions of it in the next couple of years. Apple and Tim Cook seem to be convinced this is the next big thing, and they will make sure their investment pays off.
Now that the devices is in more people's hands (or rather on their heads), we will see more apps that make better use of the capabilities of the device and that will explore what having a passthrough vision computer on your face means.
What are your thoughts? Let me know - hit that reply button (or talk to me on Twitter, Mastodon, or Threads)
Peter