Firebase
A fix for the broken Anonymous Auth > Email / Password flow
Last week, I shared with you that Google Cloud recently turned on Email Enumeration Protection by default. Unfortunately, this had a unintended impact on the Anonymous to Email / Password flow.
For those of you who don't know what Firebase Anonymous Auth is: it's a pretty cool feature of Firebase Auth that allows you to implement guest users for your app without getting a headache.
To learn more about it, check out my video and this blog post Nohe and I wrote about it.
If you run into an error saying "Please verify the new email before changing email.", you're facing this issue.
Error Domain=FIRAuthErrorDomain Code=17006 "Please verify the new email before changing email." UserInfo={NSLocalizedDescription=Please verify the new email before changing email., FIRAuthErrorUserInfoNameKey=ERROR_OPERATION_NOT_ALLOWED}
The good news is that the Firebase SDK team put together a fix for this issue (actually, multiple fixes - one for each of the SDKs). There are some more changes that need to be made on the backend side, and if things go well, this fix will roll out in one of the next releases of the Firebase SDKs.
To summarise:
- If you created your Firebase project on or after September 15, 2023, Email Enumeration Protection is on - and this is a good thing(tm)
- If you created your Firebase project before September 15, here is how you can turn on Email Enumeration Projection using the
gcloud
CLI orcurl
. - If Email Enumeration Protection is on for your project, you will run into issues when upgrading from Anonymous Auth to Email/Password Auth. This will be fixed in one of the next releases. If you need a work-around now: either use another upgrade path (e.g., Anonymous Auth > Sign in with Apple), or turn off Email Enumeration Protection (not recommended).
Recycle your waste with AI and Firebase Extensions
Knowing which bin your waste has to go in often is difficult to know, and is different from place to place. So why not use AI to help you make this decision?
Pavel built an app with Flutter and Firebase that does just that. The cool thing about this app is that Pavel was able to create a lot of the functionality by using Firebase Extensions - ready made solutions that you can add to your Firebase app with just a few clicks.
Read the article to learn how he used Cloud Vision to identify which kind of waste the user is pointing their phone at, and the PaLM API to provide some guidance as to how to best recycle this particular item.
Swift
How async/await works internally in Swift
If you ever wanted to understand how async
/await
works under the hood, check out this deep dive by Bruno Rocha. It does a great job at explaining why it was added to Swift in the first place, and how it's different from GCD.
This is a very nice complement to the WWDC 2021 session Swift Concurrency: behind the scenes.
Masking Third Party Dependencies
The question of whether you should isolate your code from third party dependencies by abstracting them away is (and always will be) hotly debated in any community.
In this article, Jordan shows an extremely light-weight approach to achieving this without using heavy-lifting tools such as dependency injection (which I personally am a fan of).
Now, Jordan says that he was able to easily swap out one analytics tool (Telemetry Deck) for another one (Elite Hoops) using this approach by just changing a single line of code. And that is great!
However, I personally think using this approach has another benefit that Jordan didn't even touch on: by wrapping code like this, you're able to give it semantic meaning - and that will make your code more readable and maintainable.
SwiftUI
Content Unavailable Views
Displaying empty state (sometime referred to as zero state) is an important aspect of UX, and can greatly improve the usability of your app.
In Using View Modifiers to Display Empty State, I demonstrated how to use a custom view modifier to implement this. Ever since, Apple has introduced a new view, ContentUnavailableView
, which makes this easier.
In his article, Keith shows how to use this in SwiftUI and UIKit.
Mastering Preview macro in Swift
A brief overview of SwiftUI's new #Preview
macro. Majid shows some of the basics, and then goes into some finer details of using this new way to interact with Xcode's Preview Canvas.
You'll learn how to set up previews for different states of your views, how to change the orientation, and how to provide a timeline provider for interactive widgets.
Business
Bootstrapping a SaaS Business in Germany: How I did it
The first real app I built was a vocabulary trainer that I built using QuickBASIC 4.x when I was 16 years old. I distributed it as shareware, and sold the main app for the equivalent of 8 EUR per license.
Knowing nothing about taxes, licensing, or business in general at all, I had a hard time getting any traction, and eventually gave up.
I wish I'd had read Lukas' article back then (however, the internet didn't even exist yet) - it's got a lot of good advice for anyone who's considering bootstrapping a SaaS business in Germany. Definitely worth reading - even if you're not living in Germany.
Tools
Shots - Create Amazing Mockups
There are countless tools for creating mockups. This one stands out because it has a fantastic selection of color gradients, useful presets, and a wide selection of devices and scenes. Worth checking out for your next product marketing page.
Podcasts
When AI is your personal tutor with Sal Khan of Khan Academy - How I Built This with Guy Raz
This is a very inspiring podcast with Sal Khan, the founder of Khan Academy. Host Guy Raz and Sal talk about how education has changed throughout (and after!) the COVID-19 pandemic, and how Khan Academy is planning to use AI to provide personal tutoring for students.
At the end of the conversation, Guy and Sal talk a bit about the mission "to provide a free, world-class education for anyone, anywhere", how they manage to achieve it despite the fact the operating costs for Khan Academy are in the tens of millions per year, and in what kind of dilemma the cost for using AI put them.
Comment
Can you believe it - the year isn't over yet, and conferences are already sending save-the-date emails!
But before the year officially draws to a close, there is DevFest season! DevFest is an annual distributed tech conference hosted by the Google Developer Groups (GDG) community, and they are open to anyone - you don't need to be a die-hard Android fanboy or fangirl to attend these!
Case in point, I think it's no secret that I'm a big fan of Apple's operating systems and platforms, and I have the honour to be speaking at DevFest Hamburg (November 3rd / 4th) and DevFest Berlin (November 25th). I will also be at Copenhagen Swift & Cocoa on December 6th (at the Google office in Copenhagen!).
My talks will be about an app that I have been working on for the past couple of weeks - a personal knowledge base powered by Firebase, Cloud SQL, PaLM, LangChain, and .... Siri! Oh, and of course the frontend is built with SwiftUI. So, if you're interested in learning how you can use Firebase to build AI-enabled apps, come to one of these events!
And don't be shy to say hi and tell me you're a subscriber - it's always great to meet people IRL that you've only known online before!
Thanks for reading, and see you soon!
Peter