Firebase
Behind the scenes with Firebase!
A lot of work goes into all the videos we create for the Firebase YouTube channel, but - you might have guessed it - things don't always go to plan. Check out the Holiday Blooper Reel for some of our most hilarious outtakes.
Thanks for watching - and we will see you in the next one!
Use MFA, blocking functions, and cross-service Security Rules
Security is an important aspect of building applications. We recently added a couple of features to Firebase that give your more flexibility for implementing secure backends for your app, such as multi-factor authentication (MFA), blocking functions, and cross-service Security Rules.
Check out this learning pathway to learn how they work.
Swift
Persist Codable to Markdown with MarkCodable
Using Markdown as a storage format for your data? What sounds like an April's Fools joke might actually be much more useful than you think. I especially like the idea of using the different rows in a Markdown table to specify the different settings for the test, QA, and production version of an app.
A complete guide to the Swift defer statement
Swift's defer
keyword allows you to specify code that will be executed before leaving the current scope - even when an error is thrown. This sound like it should help us to write code that is easier to read - so why is it that defer
is used in so few projects? According to Rudrank, the reason might be that there aren't very many good examples for how to use it. Check out his article for some good use cases, such as networking, locking, progress indicators, and more.
SwiftUI
Add a shimmering effect to your SwiftUI views
Sometimes, you need to display a placeholder for a UI element, for example when the app is waiting for a response from the backend. Of course, there is the .redacted
view modifier, but it looks a bit bland.
With SwiftUI-Shimmer, you can add a nice shimmering effect to any SwiftUI view - including views that you marked as .redacted
.
AI and ML
Can ChatGPT build a guitar pedal plugin?
I guess if you've been watching all the other videos about ChatGPT, you might know the answer already, but even if you do, check out this video by Burned Guitarist.
As with many of the other coding sessions we've seen in the past couple of weeks, I think the bottom line is that ChatGPT is a great kick-starter for a creative / exploratory coding session, and it will definitely work better if the human part of the conversation plays an active role, and doesn't just give prompts.
Tools
Edit Markdown tables easily with TableFlip
Markdown is fantastic for writing text, but typing table markup sucks. Tableflip takes the pain out of this.
How does macOS tell the type of a file?
Did you ever wonder how macOS is able to tell the type of a file? Or why it isn't? Check out this Eclectic Light Company article to find out.
But be careful - you might easily get lost in the plethora of amazing tidbits and details about macOS, and even some art. Great stuff as always by Howard Oakley.
Podcasts
CoRecursive Podcast: Apple 2001 w/ David Shayer
This is a great CoRecursive episode with David Shayer, who wrote the file system (and SQLite implementation) for the iPod. As you can imagine, lots of cool stuff to geek out about, including a top secret iPod - TidBITS that some DOD contractors built.
Comment
I hope you've been able to disconnect from work and relax for a couple of days.
In case you'd like to extend the festive spirits a little bit longer, this issue of Not Only Swift brings you just what you need - the annual Firebase Holiday video! This year, we collected some of our most hilarious bloopers, including an assault on my MacBook!
But the other topics in this issue are noteworthy as well: you will learn about multi-factor auth and blocking functions in Firebase Authentication, we cover some creative uses of Markdown (and learn how to be more efficient at creating tables in Markdown), and there also is some SwiftUI: how would you like some festive sparkle for your SwiftUI views, for example? Or would you rather prefer perusing the source code for a new Mastodon client, entirely written in Swift and SwiftUI? Well, we've got both!
Thanks to everyone who replied last time when I asked what are some of the missing features in Firebase - it's great to hear from you, and I learned a lot from your feedback. So please keep it coming!
Thanks for being a subscriber!
Peter ❤️🔥