I hope you enjoy today's content. Let's dive in 👇
Documenting app's footprint
Here's an interesting thread where people share how they document where the app saves things and how they like to organise constants. Lots of opinions - some prefer enums, others prefer extensions on
UserDefaults. I personally like to use enums as shown in this tweet - making one per-app or per-module depending on the size of the codebase.
If you have nested loops, you can label them, and use the label as part of your
continue statements. This also works for
do statements. Here's an article with more detailed examples: Swift’s Break and Continue Statements by Andy Bargh
Text or String?
If you also get tired of wrapping strings in
Text all the time, here's a tiny extension to make it easier:
Some wise words
On passing App Store review
This one is not about improving the code, but improving the release cycle of the app. In this thread @jordibruin shares how he organises his App Store review submissions to minimise chances of getting rejected. Such wonderful advice that I couldn't not share!
He explains what he writes in the messages, attachments he makes, and most interestingly about his FAQ page he shares with the review team.
Alright, that’s it for today.
Did you enjoy this issue? Let me know by pressing the buttons below, so I can improve the newsletter.
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 🙌