What I am working on
Confirmation Dialogs in SwiftUI
On my quest to replicate Apple’s Reminders app using just pure SwiftUI and Firebase, I spent some time this week to implement a confirmation dialog for Make It So. The idea is to prevent the user from accidentally losing any changes when they leave the edit dialog for a reminder. What seemed like something you might be able to implement in an hour or so ended up being a lot more complex than I would’ve thought in the beginning. Along the way, I discovered a couple of interesting things:
actionSheet
is deprecated in iOS 15, and has been superseded byconfirmationDialog
- You can now prevent the user from dismissing a sheet by using the new
interactiveDismissDisabled
view modifier. - Unfortunately, this view modifier lacks one crucial feature.
In the article, I go into more detail how to build a reusable solution for adding confirmation dialogs to your edit dialogs. I also implement a better version of interactiveDismissDisabled
, but then I go on to tell you not to use it. Why? Read the article to find out!
SwiftUI
EasyFocus Example: Making it easier to set/get focus in your Lists.
What started as a discussion with a couple of other SwiftUI developers on the thread about replicating Apple’s Reminders app has already turned into a reusable utility for implementing focus handling on SwiftUI List views.
Great stuff, I love how working in the open inspires people to make contributions to the community!
SwiftUI Environment When Presenting Views
I guess most of us. have pulled their hair out at this: SwiftUI inherits the environment down the view hierarchy - mostly! When opening a sheet, this doesn’t seem to be the case - at least on iOS 13 and iOS 14. Here is a quick article by @kharrison that brings some much needed clarity.
Productivity
MacBooks with an afterburner?
I already covered benchmarks comparing Intel-based Macs to M1-based Macs in issue #12, but the thermal photography in this tweet was too good to not add to this newsletter. It looks like Intel-based MacBooks have an afterburner!
Authentication
Moving from 1Password to iCloud Keychain
Transferring your passwords and other credentials from one password manager to another one is a delicate and intricate process that might cause many of us quite a bit of anxiety. Most people I know stick with their password manager as long as possible. I have several hundred credentials in my password manager, and the idea of migrating them to a different password manager isn’t something I’d take lightly. At 1Password’s recent announcement to use Electron for their upcoming version 8 a lot of Mac users got pretty upset. If you’re on the market for a native password manager, check out this article by @simonbs - it walks through the process of migrating all passwords from 1Password to iCloud Keychain. Simon also discusses how to handle software licenses and backup codes. Definitely worth reading if you want to get an idea how much work is involved to migrate.
Podcasts
Why the future of work is the future of travel, with Airbnb CEO Brian Chesky
Decoder is one of my favourite podcasts about the tech industry. In this episode, @reckless talks with the CEO of AirBnB about the future of work. Yep, that’s right - according to Brian Chesky, during the pandemic AirBnB has seen more and more people rent AirBnBs to work remotely. After all, if you can work remotely, you can work from anywhere.
Comment
👋🏻 Hello everyone!
Thanks to everyone who replied to my newsletter last week - it’s lovely to hear from you, and I appreciate the feedback. As my dear colleague @puf always says, “feedback is a gift”, so keep it coming!
Last week, I mentioned that I was planning to work on something really cool for Firebase Hackweek together with @mbleigh, and I am pleased to say we were able to achieve our goals for the week. If things go well, this will be the beginning of something a lot of you have been asking us for many times. It’s still early days, though, so stay tuned for updates - you’ll hear it here first.
This week, I spent some time on Make It So, the task list app that is a replica of Apple’s Reminder app. Read more about it in the blog post of the week.
As always, don’t forget to let me know if you liked the newsletter (there’s a little yes/no link at the end), and if you did, share it with a friend. If you didn’t like it, why don’t you write me a quick note what you’d like to see improved, and I’ll try to do better next week!
Thanks for reading,
Peter 🔥