Welcome to another issue!
Subscribe to iOS Dev Jobs! 👇
Everyone! 👋
As I promised last week I'm launching a new newsletter next week - iOS Dev Jobs
The goal is to share remote/hybrid job opportunities for iOS devs. Those who want to work remotely and from anywhere.
My long-term goal is to work with companies to get exclusive job offers to my community that aren't available anywhere else. Or at least get them earlier. Help developers prepare for job interviews, help them improve their CV/portfolio and many more.
I appreciate your support and let's dive into this week's news! 👇
Sponsored Link
![Appfigures - Actionable insights for data-driven mobile growth](https://dxj7eshgz03ln.cloudfront.net/production/link/image/951114/original_ratio_extra_large_46cc2e8f-bf7a-4b80-a2cb-50ef98ca148b.jpeg)
Appfigures - Actionable insights for data-driven mobile growth
Appfigures unlocks the full potential of your marketing with comprehensive business analytics, industry leading tools for App Store Optimization tools, and accurate app intelligence.
Swift Around the Web
Swift Concurrency: Safeguarding Data with @Sendable and Actors
Tools for safer concurrent programming in Swift. Article explores data races, a common issue with multiple threads accessing data simultaneously.
Here's the key takeaway:
- Sendable protocol: Ensures types are safe for concurrent use, preventing race conditions.
- @Sendable closures: Guarantees closures can be used safely in concurrent contexts.
- Actors: Provide built-in synchronization, eliminating the need for manual locking.
By understanding these concepts and best practices, you can write more robust and reliable concurrent code in Swift.
Coding
Xcode Build Insights: Keep track of project compilation times
Antoine explains why monitoring Xcode build times is crucial for developer productivity. Slow builds waste valuable time waiting to compile.
RocketSim tracks build times for months (unlike Xcode's limited history) and offers insights to identify sudden slowdowns. It even lets you compare build times across Xcode versions.
RocketSim helps teams pinpoint high-performing developer machines and understand overall team build time. This can inform decisions about hardware upgrades based on potential time savings.
In-Depth Exploration of Overlay and Background Modifiers in SwiftUI
Article explains the unique attributes of these two overlay and background modifiers, clarifies their fundamental differences from ZStack, helping us to choose the right tool for our layout challenges.
Key Differences from ZStack:
- overlay and background establish a parent-child relationship with the modified view, unlike ZStack's sibling elements.
- This impacts alignment, size calculations, and overall layout behavior.
When to Use overlay and background:
- Manage views around a primary view. They simplify structure and modifications compared to multiple ZStacks.
- Access the main view's geometry with GeometryReader without affecting its size.
Hot Reloading In SwiftUI
This short guide introduces hot reloading for SwiftUI, a technique that speeds up your development workflow. Hot reloading automatically updates your running SwiftUI app upon code changes, significantly for accelerating development.
Two ways to do this:
- Swift Package: easy to set up, but requires package removal before app submission
- Injection III App: Offers hot reloading without modifying the project, but requires a separate app.
It eliminates the need for frequent recompiles in Xcode and saves your time by automatically updating the running app on code changes.
Design
SwiftUI: Sound Effect 2 Ways
Guide explains two methods for incorporating sound effects into your SwiftUI app. Whether you want to add short system sounds like clicks or alerts, or integrate longer background music, you'll find the right approach here.
Key Points:
- AudioToolbox: Perfect for playing short system sounds or triggering vibrations. It's simple to use but has limitations like no looping or volume control.
- AVFoundation: Offers more control and flexibility for playing longer sound files. You can pause, stop, and adjust playback timing with AVFoundation. However, it requires a slightly more complex setup compared to AudioToolbox.
We can enhance user experience with engaging sound effects and make our app more interactive and dynamic. You can choose the method that best suits your sound needs.
SwiftUI: Save And Share a View
Another article by the same author in design section dives into how to incorporate image saving and sharing functionalities into your SwiftUI app.
Whether you want users to save a coupon, a cool badge, or a unique UI element, you can achieve UI with this post.
The guide will explain everything in clear steps, including:
- Converting SwiftUI views into images
- Saving images to the user's photo library
- Sharing images with ease
- Permissions and considerations
Other Cool Stuff
Asking AI to Refactor Swift Code
This post explores using AI tools to improve code readability. The author compares refactoring suggestions from three AI models (chatGPT 4, meta.ai, Claude) for a function managing dynamic quick actions in an app.
All three models improve readability by:
- Using cleaner syntax (guard statements, etc.)
- Separating logic into smaller functions (optional)
- Filtering and removing unnecessary elements
The author finds Meta's refactored code the easiest to read, despite preferring a more function-oriented approach like chatGPT 4's in their own coding.
In Case You Missed It
Combine Fundamentals
Combine, Apple's framework for reactive programming in Swift, is explored in this post. They focus on all the core concepts to get started with it.
- Publishers are like stations sending updates (like rain or shine) down the river.
- Subscribers are like little boats waiting for the updates. They only care about specific things, like sunshine updates.
- Operators act like filters along the river. They can remove unwanted updates (like rain) and only let sunshine updates reach the boats.
This is a basic idea of Combine. It helps apps send updates and lets you choose what you want to see, just like filtering news on your phone. There's more to it, but this gives you a good starting point.
Videos
Swift Server Side Meetup
Live meet-up of developers who are interested in using Swift for server-side development.
The meetup covers two main topics:
- Using Swift on various platforms, including Linux devices and the cloud.
- Building server-side applications with the Vapor framework.
There's also a Q&A session where you can ask questions about server-side Swift development.
Add, Delete, Modify SwiftData Part
Video concludes the introduction to SwiftData by demonstrating the remaining Create, Read, Update, and Delete (CRUD) functionalities.
Specifically, it will showcase how to add, delete, and modify a meeting data of employees using SwiftData.