Welcome to another issue!
I'm looking forward to 2025!
I spoke with my new colleague this week about how we can improve the newsletter in 2025. As a team, we came up with a lot of ideas and improvements that need to be made.
We will add categories, work on social media, and improve content starting in 2025.
The best motivation for us is your support and reading the newsletter!
π
Sponsored Link
Forget about Ruby and Fastlane installation issues!
Discover Codemagic CLI tools β the free, open-source Fastlane alternative for automating iOS builds, code signing and publishing.
Swift Around the Web
Sending vs Sendable in Swift
This post explores the key differences between Sendable
and sending
in Swift 6. While Sendable
ensures type safety across isolation contexts, sending
allows you to pass non-sendable values into closures intended for concurrent execution.
This change enhances concurrency safety and empowers developers to write more robust and efficient concurrent code in Swift.
Noncopyable types in Swift
The noncopyable types in Swift, a powerful feature for ensuring unique ownership of values. By marking a type as ~Copyable, you prevent unintended duplication and enhance the safety and efficiency of your code.
This post explores key concepts like borrowing, mutating, and consuming methods, and provides practical examples and best practices for effectively using noncopyable types in your Swift projects.
How to unit test async/await functions in Swift
Learn to effectively unit test asynchronous functions in Swift using the async/await syntax. It simplifies the testing process by eliminating the need for XCTestExpectation and provides clear examples of how to handle both successful and error scenarios.
By marking test functions with async and using the await keyword, you can write concise and maintainable unit tests for your asynchronous code, ensuring its correctness and reliability.
Coding
Model Inheritance in Core Data
Explore model inheritance in Core Data, a powerful feature with both advantages and limitations. Learn how to leverage inheritance effectively, understand its underlying mechanisms, and explore alternative approaches for data modeling.
This guide will help you make informed decisions about data structure design in your Core Data projects.
Introducing UIGestureRecognizerRepresentable protocol in SwiftUI
UIGestureRecognizerRepresentable is a protocol that allows you to integrate custom gesture recognition into your SwiftUI views. Learn to create and customize unique gestures, utilize a Coordinator for customization, and leverage CoordinateSpaceConverter for precise control.
This protocol expands SwiftUI's gesture capabilities, enabling you to build highly interactive and engaging user interfaces.
Mastering Forms in SwiftUI: Text Fields
Explores the use of text fields and secure fields in SwiftUI forms. Learn how to effectively collect user input, customize their appearance, handle user interactions, and implement validation checks.
Following the guidelines and utilizing SwiftUI's features you can create user-friendly and efficient text input experiences within your applications.
Apple News
Get ready with the latest beta releases
The beta versions of iOS 18.3, iPadOS 18.3, macOS 15.3, tvOS 18.3, visionOS 2.3, and watchOS 11.3 are now available.
Developers are encouraged to update their apps to ensure compatibility with these latest releases and take advantage of the advancements in the Xcode 16.2 SDK by building and testing their apps with the latest tools.
Design
SwiftUI Button: Custom Styles, Variants, and Best Practices
Create custom buttons in SwiftUI, covering styles, roles, and interactions. Learn how to use built-in styles, define custom button styles for reusable designs, and even create custom label views for unique appearances.
The guide by Antoine helps you to explore button customization in SwiftUI, enabling you to design visually appealing and interactive buttons to enhance your apps.
Other Cool Stuff
Traps and Countermeasures for Abnormal onAppear Calls in SwiftUI
Another great article by Fatbobman investigates unexpected behavior in SwiftUI's onAppear
lifecycle method, particularly when used within conditional branches containing navigation containers.
It explores potential causes, including a possible SwiftUI bug, and provides practical workarounds to ensure consistent and predictable behavior in your SwiftUI views.
Exploring MLX Swift: Working with Generate Parameters for Language Models
Rudrank has explored the power of GenerateParameters
in MLX Swift, enabling you to fine-tune text generation. Learn how to adjust parameters like temperature, top-p, and repetition penalty to control creativity, diversity, and coherence.
Its code example demonstrates how to generate text with different parameter sets for a side-by-side comparison, allowing you to unlock a wider range of creative and informative applications.
Artificial intelligence (AI)
Dail and text to ChatGPT
OpenAI introduces an exciting new update on Day 10! In collaboration with WhatsApp, users can now add 1-800-CHAT-GPT (1-800-242-8478) to their contacts to call or message the bot. Get responses in text or voice format for a seamless experience.
In Case You Missed It
Appleβs use of Swift and SwiftUI in iOS 18
The analysis reveals a significant increase in Swift and SwiftUI adoption within iOS 18. It includes:
- Swift usage has grown by 50%
- SwiftUI powers core apps and the SwiftUI-based app lifecycle has expanded significantly.
- iOS 18 introduces new BlastDoor components and potential Swift integration within the Secure Enclave.
This analysis demonstrates Apple's continued commitment to Swift and SwiftUI for modern iOS development.
Tutorials
The Ultimate Guide to Validation Patterns in SwiftUI
A detailed guide to implementing robust validation in SwiftUI forms. Explore techniques like utilizing view modifiers, leveraging property wrappers, and implementing validation summaries to ensure data accuracy and enhance the user experience.
Learn how to create user-friendly forms that guide users toward correct input and improve the overall reliability of your SwiftUI applications.
Videos
Xcode + ChatGPT, @MainActor Gotcha, SwiftUI Container Views, SwiftUI Custom Modifiers & More
The Swift News episode by Sean Allen covers key developments in the iOS ecosystem:
- ChatGPT in Xcode: Enhance coding with ChatGPT.
- EU App Store Compliance: Update Trader status by February 17th, 2025.
- SwiftUI Best Practices: Utilize custom views and modifiers.
- Indie Dev Tips: Gain insights on user acquisition.
- Tinted App Icon Design: Adapt app icons for iOS 18.