Welcome to another issue!
Subscribe to my other newsletter!
Nearly 5000 subscribers! 🚀
Added nearly 1000 subscribers in 6 months. 🤯
Weekly newsletter featuring the best tools for iOS developers. Subscribe 👉 iOS Dev Tools Newsletter
Swift Around the Web
Server-Side Swift 2024 Recap
The Server-Side Swift conference showcased the language's growing role in backend development.
Key takeaways include:
- Interoperability: Apple is making it easier to use Swift with other languages like Java.
- Community: There are many tools and frameworks for Server-Side Swift, thanks to Apple and other developers.
- Real-World Use: Companies are successfully using Server-Side Swift in their products.
This event solidified Server-Side Swift's position as a viable option for backend development, particularly for those with existing Swift expertise.
Retrieve Daily Step Count from HealthKit in Swift
Learn how to use Swift and HealthKit to get a user's daily step count from the Health app using Swift. It covers steps like turning on the feature in Xcode, setting up permissions, and writing the code.
This information is valuable for developing fitness applications that monitor users' health and track their progress.
@available attribute in Swift
Check how to use the @available attribute in Swift to check for different iOS versions and platform features. You can mark classes, methods, and properties with @available to make them available for specific versions.
it helps you to write code that works across different iOS devices and versions.
Coding
New in Xcode16: the macro @Previewable
Explore a new feature in Xcode 16 called @Previewable.
Macro allows you to use @State properties within previews, which was previously not possible. This simplifies the testing of SwiftUI views that involve state changes.
The article also includes a code example demonstrating how to use the @Previewable macro.
Understanding localization with LocalizedStringKey in SwiftUI
This post explains how to use two different ways to translate text in SwiftUI apps. One way is to use a special type called LocalizedStringKey. The other way is to use a function called NSLocalizedString.
LocalizedStringKey is easier for simple text, but NSLocalizedString is better for more complex translations with formatting.
How to run Swift Data and Core Data operations in the background and share models across concurrency contexts
Pol addresses the challenges of managing data operations in Swift Data and Core Data across different threads. He recommends using a single container, background context, and a Sendable type for data.
This approach ensures thread safety and performance improvements, allowing for smoother UI interactions.
SwiftUI: Custom Container View + Editable
Check how to create a custom container view in SwiftUI that supports editable drag and drop.
The author explores two approaches: using ForEach with editActions or directly passing the data update closure. Both approaches use onDrag and onDrop modifiers for drag and drop. Inside, you'll find implementation details along with the integration of the custom container view into the BoardView.
visionOS
Building a 3D experience in visionOS: Immersive Spaces
Author explains how to create a 3D experience in visionOS using immersive spaces.
It covers the following steps:
- Define a new immersive space using ImmersiveSpace.
- Create a SwiftUI view to display the content of the immersive space.
- Implement user interactions in the immersive space.
- Manage the lifecycle of the immersive space.
Apple News
Announcing the Swift Student Challenge 2025
Apple invites students to showcase their Swift coding skills in the Swift Student Challenge 2025.
Applications will open in February 2025.
Design
Crafting a Typewriter Text Animation in SwiftUI
Explore how to make text appear letter by letter in SwiftUI, like a typewriter.
Explore how to use the special text type, AttributedString, to control the visibility of individual letters. The provided code includes a function that gradually reveals the letters over time.
Other Cool Stuff
Elite Hoops Year One: 12 Bite-Sized Lessons
This post explores the challenges of using AirDrop for custom data models in iOS 17. The author describes how Apple's changes to UTType ownership have made it difficult for developers to handle AirDrop transfers within their apps.
You will find potential solutions, such as implementing action extensions or improving Apple's handling of multiple apps claiming ownership of the same UTType.
Transcribing audio from live audio using the Speech framework
Learn to use SwiftUI and the Speech framework to transcribe audio from a microphone in real time.
Article covers steps like setting up properties, requesting permission, starting and stopping the recognition process, and updating the recognized text. You will find code examples to explain each step of the process.
Tools
App Store Connect Swift SDK
The App Store Connect Swift SDK enables developers to automate app management tasks, such as managing app metadata, replying to reviews, and tracking app performance. It provides model-based API access, OpenAPI generation, JWT authentication, and error handling.
To use it, you'll need to set up an API key and configuration. The library is actively maintained and used by various community-developed applications.
Tutorials
A New Coding Paradigm: Declarative Domain Programming
Declarative Domain Programming (DDP) is a new programming paradigm that uses type declarations to model logic, behavior, and relationships. It's similar to OOP and FP, with messages for communication and immutability.
DDP uses a DSL to define changes to objects, making code more readable and maintainable. The author demonstrates DDP with a project management example, showing how to model projects, tasks, and collaborators using DDP.
Videos
The Success Story of Server-Side Swift at Cultured Code
This talk discusses Cultured Code's experience using Swift for its backend services. They migrated from a legacy system based on Python and Google App Engine to a new architecture using Swift and AWS.
The new architecture has improved performance, maintainability, and scalability.