Sponsored Link
Scalable Apple silicon M1 in the cloud, for your iOS CI/CD by Bitrise
Accelerate your transition to Apple Silicon through our fully virtualized, scalable M1 compute options, and build and test faster than ever.
News
Behind the times?
It’s easy to think that if you’re not already adopting every new SwiftUI API, you’re falling behind. You’re not! I try and link to something that reinforces this message at this point in the beta cycle every year, and Matt Ronge gave me the perfect tweet to link to this year.
I also get regular emails from readers asking if I would link to more Objective-C blog posts. The reality is that very few (if any!) people are still writing about Objective-C, but that doesn’t mean no one is using it. It may not be in the limelight anymore, but it’s not dead.
Tools
Swift Regex
There are plenty of online regular expression tools, so why would I link to another? Because none of them, apart from this one from Kishikawa Katsumi, supports the new Swift RegexBuilder
DSL! It's running the expressions server-side, too, so you're getting an accurate representation of how your regular expression will work.
X-SwiftFormat
You won’t get an Apple-defined formatting style or auto-format on saving your files, but you can run either swift-format or Nick Lockwood’s SwiftFormat on your currently open file with an Xcode extension. Thanks to Rui Aureliano for creating this!
Multiliner
Talking of Xcode extensions, here’s a new one from Andrew Zheng that does only one thing, but it’s something you might find yourself doing several times every day. Take an array, initialiser, or function call you wrote on one line and expand it to cover multiple lines. Simple!
Code
Get URLs for system folders in iOS 16
Finally!
It wasn't a huge pain to use the full APIs for getting to commonly used directory paths, but it was long-winded enough that I'd usually make a helper method that effectively did what this new API provides. The changes to directory checking when appending to a file system URL are also fantastic. Thanks to Natalia Panferova for writing this up!
Creating custom extension points for Mac apps with ExtensionKit
I had completely missed the announcement of ExtensionKit during this year’s WWDC. It’s an entirely new framework that, to quote Apple, allows you to “extend the functionality of other apps by presenting a user interface”. That sounds exciting, and if you think that’d be the kind of framework Gui Rambo would be interested in, you’d be right. 🕵️♂️
Understanding SwiftUI's ViewThatFits container
Is the ViewThatFits
the most significant step forward in writing apps that adapt well to device/window sizes? I think it might be! Natascha Fadeeva has an excellent summary of how you can start using this new view.
Plurals
Pluralising a number in a string is easy, right? Well, as Danielle Grenier explains, it depends on how far you take it. I love a deep dive into a problem like this. 🚀
Jobs
Senior iOS Engineer (Swift) @ GoodNotes – GoodNotes is a top-rated paid-for productivity app, available to use on iPad, iPhone and Mac devices with over 10m MAU. You will own your projects and work alongside a high-calibre cross-functional team to continue delivering a product our users love! – Remote (within European or Asia-Pacific timezones) or on-site (Hong Kong or United Kingdom)
Senior iOS Engineer @ DuckDuckGo – An opportunity to work on a fast growing suite of privacy products (iOS & macOS browsers, upcoming new products for mobile/desktop) that will genuinely make the Internet a better place and that will bring it back to its core ideals. And all of that in an environment built for remote from ground up! – Remote (Anywhere)
Senior iOS Developer @ Dwell – Dwell App helps 100K+ believers cultivate a habit of living in the Bible. We love helping people connect more deeply with God through Scripture, and we enjoy the challenge of using technology to accomplish that mission. Our team is on the hunt for a new iOS team member who aligns with our mission. – Remote (within US timezones)
Senior iOS Developer @ Flightradar24 – Join the team at Flightradar24, working on the world's most popular flight tracking service. This is your chance to be part of our small but mighty mobile team, work on every part of our iOS app and have a big impact on over 3 million daily users. – Remote (within European timezones)
iOS Developer @ Rethink First – Join our team: Rethink First is a pioneer and market leader with an award-winning B2B and B2B2C SaaS solutions to drive mental and behavioral. You can expect a healthy work life balance with flexible hours, fully remote work, and a competitive benefits and comp plan. – Remote (within US timezones)
Senior iOS Engineer @ onX – Are you a Software Engineer that loves the outdoors? onX is hiring iOS Engineers. If you’re passionate about building great software, love playing outside, and believe in protecting access to public lands - then join onX, where we empower millions of outdoor enthusiasts to explore the unknown! – Remote (within US timezones) or on-site (United States in MT)
Senior iOS Developer @ E-gineering, Inc. – E-gineering is 100% employee-owned. We value our people and serve with excellence and integrity. For 12+ years, we have been recognized as the Best Places to Work in Indiana, consistently ranking in the top 3 of our category. – Remote (within US timezones)
Senior iOS Engineer @ Doximity – Doximity, the medical network used by over 80% of US clinicians, is hiring passionate iOS engineers (fully remote!). Come be part of an amazing product team + work on an app that is constantly evolving. Use your skills (Swift, MVVM, FRP) to be an integral part of our newly launched telemed feature. – Remote (within US timezones)
Senior iOS Developer @ Chariot Solutions – Chariot Solutions is a Philly based consulting company that strives to create a product company culture. Celebrating our 20th year in business, we work hard to win exciting projects with some of the top companies in the world, while helping our employees maintain a great work life balance. – Remote (within US timezones)
Senior iOS Developer @ Covenant Eyes – The combination of competitive compensation, family atmosphere, low turnover, and a people-first culture make this an excellent place to work. We are proud to have been named #2 in Mid-Sized company category of Michigan Top Workplaces 2021 (Detroit Free Press). We are a 100% Employee Owned company! – Remote (within US timezones) with some on-site work (United States in MI)
Mobile Full Stack Engineer @ Expensify – Join our passionate team of top-notch engineers to solve a real-world problem, and help people spend less time managing expenses and more time pursuing their real goals. – Remote (Anywhere) with some on-site work (Australia, United Kingdom, or United States in CA, MI, NY, or OR)
There are many more jobs available over on iOS Dev Jobs. Sign up for a filtered email digest of jobs that match what you're looking for and get a fresh set of jobs in your inbox every Monday.
And finally...
Did you hear about that new programming language, Swift?
I did consider putting a calendar reminder for five years from now instead of linking to it this week. But I don't have the patience for a joke with that long a payoff! 😂
Comment
I’ve seen a few people talking positively about Xcode 14’s slightly firmer hand in re-indenting code as you type or paste code into the editor. I’m a fan of these new features, too, but in my opinion, they don’t go anywhere near far enough.
Brace yourselves for a potentially controversial opinion!
As part of my “you know what” work, I do a fair amount of editing of CSS and JavaScript files, and I use Prettier to format my files automatically. I also configured my editor, Nova, to run prettier every time I save a file using this extension. I have no way to opt-out, either. If I save a file to disk, Prettier formats it.
Prettier is an opinionated code formatter, and I love it. There are a couple of configuration options, but not that many. I know that many of you will have strong views on formatting Swift code and would happily argue a case on why one formatting style is better than another. In my opinion, the specific style genuinely doesn’t matter. The primary thing that matters is consistency.
It’s wild how freeing it is never to have to format code, and I love it. I’m now at the stage where I don’t even try to indent or format JavaScript or CSS. I just put the cursor in roughly the right place and start typing, hit save, and see my code instantly formatted. I also miss this feature every time I write in Swift. 😅
I’d love to see an option to auto re-indent on every save in a future version of Xcode. I’d even like it to go further and use swift-format to bring in much stricter rules for formatting Swift code, and I don’t care what the rules are. If someone at Apple chooses that there should be seven blank lines in between function definitions, I’m okay with that, and you probably would be, too, after a couple of weeks of living with it.
There would be several advantages to this. From experience, I can confidently say that code is easier to write this way, and while you might feel a desire to fight against it at first, it passes. Pull requests are also more straightforward as you wouldn’t be able to save an unformatted Swift file, let alone get it into git. But that’s not all. It’s also easier for everyone (rather than just the people on your team) to understand code if we have a formatting standard.
Apple would need to lead this effort, though. They’re the only ones who can define a style everyone would widely adopt, and wide adoption is critical. It may sound far-fetched, but they wouldn’t be the first to do it. Prettier is very popular, and I believe the Go community has embraced standard formatting that
go fmt
applies.What do you say, Apple? Will you make my wish come true in Xcode 15?
Dave Verwer