1 min read

Issue #35

Hi there,

Welcome to the issue #35 👋 Enjoy!

Better test assertions

We all want the tests to immediately tell us that something is wrong, and here's some advice on how to achieve that by using XCTAssertEqual instead of just XCTAssert:

Multiple accessibility labels

With accessibilityUserInputLabels, we can provide multiple strings by which the user can address an element.

And a reminder not to use accessibilityLabel for internal strings for UI tests, there's accessibilityIdentifier for that.

System background

Reminder that UIColor.systemGroupedBackground exists, reflecting system background you see on grouped table views, for example in Settings. We can use it in both UIKit and SwiftUI:

More formatters

Remember ListFormatter I mentioned last time? Here's an infographic with even more examples of different native formatter APIs.

The traps of Swift Concurrency

There's many things the compiler doesn't check, and often the behaviour of async/await is not what you'd expect. Lots of traps to fall into... For example, actors are not as protective as they seem at first glance. Many examples of problems and solutions in this article by @kulik_wojciech.

It's a longer article going deep into how concurrency works, make sure to save it if you don't have time to read it yet :)

Swift Concurrency – Things They Don’t Tell You

Codelime is a powerful code snippet manager with many dev tools for iOS development. Save and manage your code snippet across iPhone, iPad and Mac with Codelime.

Take advantages of many dev tools available in Codelime (Hash, Text Case, Color Picker, Generate Asset Catalog, Make Pretty Code Snippet, ...) to boost your every day iOS development workflow.

The app is made by 2 indie developers Khoa 🔥 and Kenny 🌴

Codelime - Powerful code snippet manager

Powerful code snippet manager


Alright, that’s it for today.

Did you enjoy this issue? Let me know by pressing the buttons below. If you enjoyed it, you can help grow the newsletter by spreading the word ☺️

Got feedback? Want to see more, or less of certain kinds of tips? I’d love to hear from you. Reply to this email or reach out on Twitter via @ios_code_review 🙌