⏳ Async await in Swift and Building Swift Executables 👷
Welcome to the 8th issue of the iOS Coffee Break Newsletter 📬. Last week, my company organized a fantastic team-building event with all team members, including me!
Since our office is in Aveiro, we took advantage of the good weather ☀️ and headed to a beachside bar 🏖️. We enjoyed plenty of food, drinks, music and fun activities like target archery, beach volleyball, and karaoke. I find these events crucial because they bring people together (we miss some human interaction with remote work right ?) and help build stronger bonds among team members. What kinds of team-building events have you attended? Let me know!
Enough about me, let's dive into some iOS development topics, shall we? Here are this week's highlighted resources. Hope you enjoy 🙌.
🧰 Async await in Swift: The Full Toolkit
Jacob from Emerge Tools has written an article that delves into the tools available in Swift Concurrency, explaining when and how to use them. This well-crafted piece quickly became one of my top reads on the subject, thanks to its clear, concise explanations and practical code examples. Jacob begins by discussing the theoretical aspects where necessary and, for each tool, concludes with a context where it might be the ideal solution. If you are looking for a thorough yet straightforward guide on Swift Concurrency, this article is a must-read 🔥!
For those seeking a more introductory overview on the topic, check out my guide on Swift Concurrency!
⛔ Memory consumption when loading UIImage from disk
Loading images from disk into an in-memory array can significantly increase memory usage. In Antoine's latest article, he discusses techniques to optimize memory consumption: by rewriting code to use non-system caching APIs and implementing an NSCache-based solution for apps requiring image processing, you can drastically improve your app's memory efficiency.
📓 Using @DebugDescription in Xcode 16
Debugging custom types can be challenging, but having clear and informative debug output is crucial for understanding your code's behavior. The CustomDebugStringConvertible protocol and the new @DebugDescription macro in Xcode 16 can greatly assist with this. In Aryaman's article, you will learn how to effectively use this protocol and macro to simplify and enhance your debugging process.
🧞 Exploring Indie Life: Reducing Friction by CI/CD
Manually shipping apps is a tedious and repetitive task that Rudrank believes should be automated as soon as possible. He fully embraces the "automate first, code later" principle, which he says has greatly reduced the friction of shipping apps. In this article, Rudrank leverages the free minutes of his Xcode Cloud Apple Developer membership to push builds simultaneously to three platforms: iOS, macOS, and visionOS.
👷 Building Swift Executables
You have developed your Swift CLI executable, and now you are wondering how to make it available to other people? In this article, Swift Toolkit.dev covers key considerations and provides detailed build instructions, including how to create universal binaries and support Linux.
Although the article doesn't mention Windows support, I outlined a solution from a previous project. Using GitHub Actions, I built a CLI executable in a Windows environment, uploaded the artifact to the Action run, and downloaded it from there.