🚨 Course alert!
We're live! Practical Swift Concurrency the video course is finished and available in full right now. Check out the course and purchase it right here:
If you're an owner of the book, let me know and you can get 20% off on the course!
iOS job interviewers be like: “So you’re good with people, deliver on time, have a vast understanding of UIKit and the iOS platform, know both Objective-C and Swift, and you’ve tamed the beast called Xcode and code signing? Cool! Now do a binary sort please.”
Remember that teaser tweet from earlier? I'm ready to share the news!
I quit my job and starting in July I'm off on my own. My plan is to focus more on my blog, books, and workshops, combined with contracting (got to pay those bills). Super excited about this new adventure 😱
Don’t think for a second that not having a CS degree automatically means you’re less of a programmer. I never got a CS degree and I’d say I’m doing just fine 👍🏼
Some personal news 😱
This morning my wife gave birth to an amazing and beautiful little girl. Welcome to the world, Sofia Rosalie Wals!
Both mother and baby are doing fantastic, I'm so proud of them both ❤️
In Xcode 14.0 Beta 2 Combine has received a super welcome update! They've added primary associated types to Publisher so now we can write "some Publisher<Output, Error>" instead of erasing to AnyPublisher!
Learn more about primary associated types here:
The iOS Developer experience:
🥱 Preparing Device for development...
😴 Building...
👀 Hit breakpoint
😴 Waiting for LLDB to attach...
👀 po someVariable
😭 Couldn't IRGen expression. Please check the above error messages for possible root causes.
😒 Add print statement instead
My new book "Practical Combine" is now officially available! 🚀 Learn how to build real features for your apps with Apple's Combine framework through 11 chapters that are filled with useful code samples and explanations. Get it now!
Just saw someone offering to share my Combine book for free. In a Slack community where I’m an admin 🤦♂️ don’t do that stuff folks, support independent authors and buy their work. Can’t afford it? Reach out. Most of us aren’t horrible about discounts for those that need them.
I’ve got a feeling we might get some huge Xcode news tomorrow. And I’m not thinking of Xcode on the iPad. I’m thinking about an overhaul of Xcode on macOS 🤞🏼
Ohh this is really cool! Xcode 15 will gray out
#if
paths that don't apply based on your current compilation target. In this case I'm not targeting macOS so that
#if
path is gray!
#WWDC23
Just wanted to give a big shoutout to the iOS developer community. I don't think I've seen any developer community as supportive and welcoming as ours (and of course there's still room for improvement).
Y'all rock 🤘🏼😎
I don't think I've ever been this unprepared for WWDC. Here's a couple of last minute things to keep in mind during the madness of the upcoming days...
1. You don't need to watch or know it all by the end of the week. Trust me. There's PLENTY of time to digest all the goodies.
"Run without building" has saved me so much time, it's ridiculous. Definitely my go-to option when I only added a couple of breakpoints and want to test something real quick in a big project that takes ages to compile/install (looking at you, watchOS).
Swift pro-tip for passing around ids for your identifiable objects. Use instead of the actual type when possible to make refactoring easier, and to make your intent clearer.
I just released the full version of Practical Core Data! 🎉 If you've bought the book's pre-release, download the full version from your Gumroad Library. If you haven't bought the book yet, you can get it at 😁
Exporting app icons can be quite a chore, so I wrote a little bash script that uses imagemagick to convert a 1024x1024 png to all required app icon sizes 😌
Gist:
Did you know that SwiftUI apps don’t use an AppDelegate anymore on iOS14? And that Xcode 12 can’t automatically add Core Data to projects with the new lifecycle?
In this week’s post I explain how you can add Core Data to a new SwiftUI project 😎
If Facebook collecting your user's data through their SDK wasn't enough reason to remove them from your app, maybe them making your apps crash on launch for the second time in a few months is?
Ever wanted to edit multiple lines of code at once in Xcode? You can! Hold option + drag across the lines you want to edit. You get multiple cursors and can edit multiple lines at the same time 🤯
I really wish Apple would start making sure that any advice and best practices taught in WWDC videos end up in their documentation... there’s lots of information about their frameworks that’s only available in videos and not in the docs.
Did you ever write a
#available
check to see if an iOS version is unavailable like this?
`if
#available
(iOS 13.0, *) {} else { /* logic here */ }`
A new Swift version might allow this😁
`if
#unavailable
(iOS 13.0, *) { /* logic here */ }
With `UICollectionView.CellRegistration` you no longer need to specify Strings as reuse identifiers for your collection view cells 😱 (and they also configure your cells for you).
This rocks! Finally we’ll have proper support for push notifications in the simulator rather than having to use a local json payload to simulate one 😁
#WWDC22
WWDC tip: If you're mostly interested in which new frameworks and APIs Apple's introducing for iOS 15 make sure you don't miss the "State of the Union" at 2PM PDT next week. It's after the main Keynote and is much more developer focussed 👍🏼
#wwdc2021
Dang, Dutch COVID test company uses Firestore and allows their browser client unlimited read and write access. Means all customer data can be queried, and you can write a positive/negative test result to the database right from the browser console + obtain an official certificate
Het lek deed zich voor bij Testcoronanu, dat tien locaties in Nederland en drie in België heeft. Het bedrijf heeft ruim 60.000 klanten.
De frontend van de website communiceert direct met Googles database Firestore. En je kan dus vanuit de browser direct de database raadplegen.
Good morning and a happy Monday, Twitter! A little bit later than usual, but what are your plans for the week? Are you learning anything new? Or maybe building something cool? Tell me all about it! My plan for the week is taking care of our baby Oliver ❤️ he was born last Friday
If you feel like you’re way behind because SwiftUI is already in its third year and you haven’t mastered it yet, please know that lots of companies and developers have only started digging in in the last year or so. There’s still a lot of SwiftUI to discover for most of us!
If you've had a bunch of Xcode versions installed on your machine you probably have a lot of Device Support folders and simulators for iOS versions you never use anymore. I just regained 15Gb of disk space by deleting old Device Support and removing unavailable simulators.
While everybody else is waiting for their studio displays I decided to get this 32” Dell Ultrasharp instead. Loving it so far. Huge upgrade from using my iMac as a display for the past 8 years or so 😅
So, turns out I caught COVID 😕 went for a test yesterday after feeling not well on Monday and got the result this morning. Luckily I don’t feel very ill. My throat hurt a lot yesterday but it’s getting better. No fever. I reckon that first vaccine is helping my body fight this
Heck yeah! We can use `.focused` and `
@FocusState
` in iOS 15 to programmatically activate/focus textfields and more. This is basically the first responder APIs I was hoping for 😁
#WWDC21
Pre-orders for Practical Core Data are open!
You can pre-order the book for $24,99. I will pre-release chapters 1-5 on Dec 14 and the full book on Jan 4. Price will be $34,99 after Jan 4.
⚠️Practical Combine owners: check your inbox for a neat discount
If you're learning SwiftUI (on iOS 14), and struggling with some of its property wrappers like
@StateObject
,
@EnvironmentObject
and others you might want to check out for a comprehensive overview 👌🏼
SwiftUI has 100% become my quick prototype framework of choice. So nice to be able to whip up a quick UI and focus on the logic that I want to play with rather than spending a bunch of time setting up constraints in UIKit.
Instead of writing a long NSPredicate with OR, AND or NOT clauses you can write several smaller predicates and join them togethether using an NSCompoundPredicate. This has helped me tons in the past when building complex filter options for an app I worked on 😌
Quick tip: Use DateFormatter's setLocalizedDateFormatFromTemplate to easily get a formatted date string that matches your user's locale
#Swift
#iOSProgramming
You don’t need to learn all the iOS architectures, read 20 books and launch 5 side projects in 2020. Just do what’s reasonable and what makes you happy.
And we're live! The pre-release for Practical Swift Concurrency is now available. First four chapters are available today, the remaining seven will become available over the next two weeks.
You can grab the book right here:
Pricing info and more in 🧵
Wow, I tried creating a token refresh flow that properly handles concurrency with async/await and this proof of concept was surprisingly to build. Not 100% sure about its correctness but it seems to work well 🙌🏼
#WWDC21
Gist:
We all know that we should reuse DateFormatters because they are expensive to create. How expensive you ask?
@sarunw
did some measurements to answer this question. (spoiler, the answer is very, very expensive)
So cool that Stanford still publishes their CS193p course by Paul Hegarty. This course is the first thing I watched when I first became interested in iOS about 8-ish years ago. This year the course uses SwiftUI and I’m sure it’s going to be great.
"My code is self documenting" is the biggest lie any developer can tell themselves. Try coming back to that complex logic a few months after you last touched it.
To give you an idea of how awesome `UICollectionView.CellRegistration` is, I threw together a quick minimal demo. Looks so much cleaner than the old way. Notice how the cell is strongly typed and no casting is needed...
#wwdc2020
Ever wondered how you'd future-proof a Decodable enum to account for unknown cases being returned by your back-end? A custom init(from:) will work wonders 😁
Gist:
Xcode 13.3 ships with Swift 5.6 which contains an interesting new keyword: "any". Learn everything you need to know about Swift's new "any" keyword in this post 😄:
And it's out! Practical Core Data is now officially updated for iOS 15. If you've bought the book, you can download the update for free from Gumroad right now 🎉
Big milestone 🎉 Practical Core Data sold it's 1.000th copy this morning and I'm celebrating with a discount. The first 20 people to use the link below can grab the book with 35% off 🙌🏼
We're officially one month out from WWDC 2020 and I have to admit that I'm starting to get kind of excited for it. Really looking forward to seeing how Apple's going to pull it off 😁
One of the recent things I’ve learned about SwiftUI is that having good data/state modeling skills is a huge benefit when building complex flows. Being able to represent your state in an efficient way makes your views way easier to reason about.
Today I’ve reached a final decision on something that’s both bittersweet and nice. But also bad news and good news at the same time.
After about three years one of my longest term contracts will soon come to an end. This means that a steady stream of work is about to dry up.
Whenever someone tells me they have over a decade of programming experience I feel like such a newbie. But then I realize that I too, have over a decade of programming experience by now. 🤯
Apple will start enforcing the account deletion requirement from June 30th onward. If your app supports account creating, users must be able to initiate account deletion from your app: